Datasets:

License:
cboettig commited on
Commit
1db70ab
·
1 Parent(s): a1a919f
map.py CHANGED
@@ -11,28 +11,24 @@
11
  # See the License for the specific language governing permissions and
12
  # limitations under the License.
13
 
14
- import leafmap.foliumap as leafmap
15
 
16
  # +
17
- url = "https://huggingface.co/datasets/boettiger-lab/pad-us-3/resolve/main/pad-mobi.pmtiles"
 
18
 
19
- private_color = "#DE881E" # orange #"#850101" # red
20
- tribal_color = "#BF40BF" # purple
21
- mixed_color = "#005a00" # green
22
- public_color = "#3388ff" # blue
 
 
 
 
 
 
23
 
24
- bucket = {
25
- "fill-color":
26
- ['case',
27
- ['==', ['get', 'bucket'], 'public'],
28
- public_color,
29
- ['==', ['get', 'bucket'], 'private'],
30
- private_color,
31
- ['==', ['get', 'bucket'], 'tribal'],
32
- tribal_color,
33
- mixed_color # default (bucket == mixed)
34
- ],
35
- "fill-opacity": 0.5}
36
  style = {
37
  "version": 8,
38
  "sources": {
@@ -41,11 +37,15 @@ style = {
41
  "url": "pmtiles://" + url,
42
  "attribution": "US PAD v3"}},
43
  "layers": [{
44
- "id": "pad-mobi",
45
  "source": "source1",
46
- "source-layer": "pad-mobi",
47
  "type": "fill",
48
- "paint": bucket}]}
 
 
 
 
49
 
50
  m = leafmap.Map(center=[35, -100], zoom=4)
51
  m.add_basemap("Esri.WorldGrayCanvas")
 
11
  # See the License for the specific language governing permissions and
12
  # limitations under the License.
13
 
14
+
15
 
16
  # +
17
+ import leafmap.foliumap as leafmap
18
+ url = "https://huggingface.co/datasets/boettiger-lab/pad-us-3/resolve/main/pad-stats.pmtiles"
19
 
20
+ paint = {
21
+ 'property': 'gap_code',
22
+ 'type': 'categorical',
23
+ 'stops': [
24
+ [1, "rgba(255,0,0,0)"],
25
+ [2, "rgba(1,255,0,0)"],
26
+ [3, "rgba(0,255,150,.4)"],
27
+ [4, "rgba(200,0,200,1)"]
28
+ ]
29
+ }
30
 
31
+ alpha = 1
 
 
 
 
 
 
 
 
 
 
 
32
  style = {
33
  "version": 8,
34
  "sources": {
 
37
  "url": "pmtiles://" + url,
38
  "attribution": "US PAD v3"}},
39
  "layers": [{
40
+ "id": "pad",
41
  "source": "source1",
42
+ "source-layer": "pad-stats",
43
  "type": "fill",
44
+ "paint": {
45
+ "fill-color": paint,
46
+ "fill-opacity": alpha
47
+ }
48
+ }]}
49
 
50
  m = leafmap.Map(center=[35, -100], zoom=4)
51
  m.add_basemap("Esri.WorldGrayCanvas")
pad-stats.pmtiles → pad-groupings.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:43c0042b0982b01ac027ba31bf12029a080b5ad545e32460a9e27a6bd5555333
3
- size 305436949
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0661e34c14378dcbc9b30e203371d4be2bd2e4153fc02116c5757bb90220644d
3
+ size 7248929
pad-stats.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c9585c3c27d05039ff30faae0c9f5244a1a061e722b47ba30b2e45c4f51df8dc
3
- size 882042199
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ac89736cc42bb2390853137b2793b9e9f1d4d11cefc34f307a1280043243ca1
3
+ size 894911787