groupings
Browse files- map.py +21 -21
- pad-stats.pmtiles → pad-groupings.parquet +2 -2
- pad-stats.parquet +2 -2
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 |
-
|
15 |
|
16 |
# +
|
17 |
-
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
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
|
45 |
"source": "source1",
|
46 |
-
"source-layer": "pad-
|
47 |
"type": "fill",
|
48 |
-
"paint":
|
|
|
|
|
|
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ac89736cc42bb2390853137b2793b9e9f1d4d11cefc34f307a1280043243ca1
|
3 |
+
size 894911787
|