cassiebuhler commited on
Commit
e5c3ed4
·
1 Parent(s): e1041f5

fixed pmtiles zoom levels, fixed pmtiles filter

Browse files
app/footer.md CHANGED
@@ -13,6 +13,7 @@ Data: https://huggingface.co/datasets/boettiger-lab/ca-30x30
13
 
14
  - Fire polygons by CAL FIRE (2023), reprocessed to PMTiles on https://beta.source.coop/cboettig/fire/. License: Public Domain
15
 
16
- - Climate and Economic Justice Screening Tool, US Council on Environmental Quality, Justice40. Data: https://beta.source.coop/repositories/cboettig/justice40/description/, License: Public Domain
 
 
17
 
18
- - CDC 2022 Social Vulnerability Index by US Census Tract. Description: https://www.atsdr.cdc.gov/place-health/php/svi/index.html. Data: https://source.coop/repositories/cboettig/social-vulnerability/description. License: Public Domain
 
13
 
14
  - Fire polygons by CAL FIRE (2023), reprocessed to PMTiles on https://beta.source.coop/cboettig/fire/. License: Public Domain
15
 
16
+ - Climate and Economic Justice Screening Tool, US Council on Environmental Quality, Justice40. Archived description: https://web.archive.org/web/20250121194509/https://screeningtool.geoplatform.gov/en/methodology#3/33.47/-97.5. Data: https://beta.source.coop/repositories/cboettig/justice40/description/, License: Public Domain
17
+
18
+ - CDC 2022 Social Vulnerability Index by US Census Tract. Archived description: https://web.archive.org/web/20250126095916/https://www.atsdr.cdc.gov/place-health/php/svi/index.html. Data: https://source.coop/repositories/cboettig/social-vulnerability/description. License: Public Domain
19
 
 
app/variables.py CHANGED
@@ -1,6 +1,6 @@
1
  # urls for main layer
2
  ca_parquet = "https://huggingface.co/datasets/boettiger-lab/ca-30x30/resolve/1bc81f4f0678143421f73645f0ba830aa1cb8617/ca-30x30.parquet"
3
- ca_pmtiles = "https://huggingface.co/datasets/boettiger-lab/ca-30x30/resolve/c08b22b9b506d444d0429a82f96f13e214341912/ca-30x30.pmtiles"
4
 
5
 
6
  ca_area_acres = 1.014e8 #acres
@@ -123,7 +123,7 @@ ecoregion = {
123
  ['Southeastern Great Basin', "#2ca02c"],
124
  ['Southern California Mountains and Valleys', "#d62728"],
125
  ['Sonoran Desert', "#9467bd"],
126
- ['Northwestern Basin', "#8c564b"],
127
  ['Colorado Desert', "#e377c2"],
128
  ['Central Valley Coast Ranges', "#7f7f7f"],
129
  ['Great Valley (South)', "#bcbd22"],
@@ -142,8 +142,6 @@ ecoregion = {
142
  }
143
 
144
 
145
-
146
-
147
  style_options = {
148
  "Year": year,
149
  "GAP Code": gap,
 
1
  # urls for main layer
2
  ca_parquet = "https://huggingface.co/datasets/boettiger-lab/ca-30x30/resolve/1bc81f4f0678143421f73645f0ba830aa1cb8617/ca-30x30.parquet"
3
+ ca_pmtiles = "https://huggingface.co/datasets/boettiger-lab/ca-30x30/resolve/c58913a279d13c414722c4299b0e0867e923946a/ca-30x30.pmtiles"
4
 
5
 
6
  ca_area_acres = 1.014e8 #acres
 
123
  ['Southeastern Great Basin', "#2ca02c"],
124
  ['Southern California Mountains and Valleys', "#d62728"],
125
  ['Sonoran Desert', "#9467bd"],
126
+ ['Northwestern Basin and Range', "#8c564b"],
127
  ['Colorado Desert', "#e377c2"],
128
  ['Central Valley Coast Ranges', "#7f7f7f"],
129
  ['Great Valley (South)', "#bcbd22"],
 
142
  }
143
 
144
 
 
 
145
  style_options = {
146
  "Year": year,
147
  "GAP Code": gap,
preprocess/preprocess.ipynb CHANGED
@@ -485,11 +485,11 @@
485
  "\n",
486
  "#can't go directly from parquet -> pmtiles, need to go parquet -> geojson -> pmtiles \n",
487
  "ca_4326.execute().set_crs(\"epsg:4326\").to_file(path + 'ca-30x30.geojson') \n",
488
- "pmtiles = to_pmtiles(path+ 'ca-30x30.geojson', ca_pmtiles)\n",
489
  "\n",
490
  "# upload pmtiles to minio and HF\n",
491
  "hf_upload('ca-30x30.pmtiles', ca_pmtiles)\n",
492
- "s3_cp(ca_pmtiles, \"s3://public-ca30x30/ca-30x30.pmtiles\", \"minio\")\n"
493
  ]
494
  }
495
  ],
 
485
  "\n",
486
  "#can't go directly from parquet -> pmtiles, need to go parquet -> geojson -> pmtiles \n",
487
  "ca_4326.execute().set_crs(\"epsg:4326\").to_file(path + 'ca-30x30.geojson') \n",
488
+ "pmtiles = to_pmtiles(path+ 'ca-30x30.geojson', ca_pmtiles, options = ['--extend-zooms-if-still-dropping'])\n",
489
  "\n",
490
  "# upload pmtiles to minio and HF\n",
491
  "hf_upload('ca-30x30.pmtiles', ca_pmtiles)\n",
492
+ "s3_cp(ca_pmtiles, \"s3://public-ca30x30/ca-30x30.pmtiles\", \"minio\")"
493
  ]
494
  }
495
  ],