|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import leafmap.foliumap as leafmap |
|
|
|
|
|
url = "https://huggingface.co/datasets/boettiger-lab/pad-us-3/resolve/main/pad-mobi.pmtiles" |
|
|
|
private_color = "#DE881E" |
|
tribal_color = "#BF40BF" |
|
mixed_color = "#005a00" |
|
public_color = "#3388ff" |
|
|
|
bucket = { |
|
"fill-color": |
|
['case', |
|
['==', ['get', 'bucket'], 'public'], |
|
public_color, |
|
['==', ['get', 'bucket'], 'private'], |
|
private_color, |
|
['==', ['get', 'bucket'], 'tribal'], |
|
tribal_color, |
|
mixed_color |
|
], |
|
"fill-opacity": 0.5} |
|
style = { |
|
"version": 8, |
|
"sources": { |
|
"source1": { |
|
"type": "vector", |
|
"url": "pmtiles://" + url, |
|
"attribution": "US PAD v3"}}, |
|
"layers": [{ |
|
"id": "pad-mobi", |
|
"source": "source1", |
|
"source-layer": "pad-mobi", |
|
"type": "fill", |
|
"paint": bucket}]} |
|
|
|
m = leafmap.Map(center=[35, -100], zoom=4) |
|
m.add_basemap("Esri.WorldGrayCanvas") |
|
m.add_pmtiles(url, name="pad", style=style, overlay=True, show=True, zoom_to_layer=False) |
|
m |
|
|
|
|
|
total = 139 |
|
n = 10 |
|
[i for i in r)] |
|
|
|
|
|
import numpy as np |
|
for i in range(0,total,n): |
|
end = np.min([i + n,total]) |
|
print(i,end) |
|
|