Spaces:
Sleeping
Sleeping
demo
Browse files
app.py
CHANGED
|
@@ -27,15 +27,11 @@ st.set_page_config(layout="wide", page_title="Leafmap Explorer", page_icon="⚡"
|
|
| 27 |
'''
|
| 28 |
# Demo Carbon Calculator
|
| 29 |
|
| 30 |
-
|
| 31 |
Use the map tools to draw a polygon (pentagon tool), bounding box (square tool) or other shape anywhere on the map.
|
| 32 |
-
Click inside the box when you are done to show the coordinates.
|
| 33 |
Please copy-paste those coordinates (or any geojson of your choosing) into the polygon selector.
|
| 34 |
Map will zoom in on selected area and display the tons of carbon lost between 2002 - 2022 below.
|
| 35 |
-
|
| 36 |
-
Based on data from Vizzuality published on [source.coop](https://beta.source.coop/repositories/vizzuality/lg-land-carbon-data/description/),
|
| 37 |
-
containing cloud-optimized geotiff data for de-forested carbon loss at 100m pixels in these years. Licensed CC-BY. See link for details.
|
| 38 |
-
|
| 39 |
'''
|
| 40 |
|
| 41 |
|
|
@@ -139,12 +135,12 @@ To explore further, simply modify the Streamlit app.py file from the Files menu
|
|
| 139 |
st.code('''
|
| 140 |
|
| 141 |
# irrecoverable carbon (Conservation International):
|
| 142 |
-
"https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif"
|
| 143 |
-
m.add_cog_layer(, palette="reds", name="irrecoverable carbon", transparent_bg=True, opacity = 0.8, zoom_to_layer=False)')
|
| 144 |
|
| 145 |
# Human Impacts, Vizzuality
|
| 146 |
-
|
| 147 |
-
m.add_cog_layer(
|
| 148 |
|
| 149 |
# Fire Polygons, USGS
|
| 150 |
usgs = "https://data.source.coop/cboettig/fire/usgs-mtbs.pmtiles"
|
|
|
|
| 27 |
'''
|
| 28 |
# Demo Carbon Calculator
|
| 29 |
|
|
|
|
| 30 |
Use the map tools to draw a polygon (pentagon tool), bounding box (square tool) or other shape anywhere on the map.
|
| 31 |
+
Click inside the box when you are done to show the coordinates.
|
| 32 |
Please copy-paste those coordinates (or any geojson of your choosing) into the polygon selector.
|
| 33 |
Map will zoom in on selected area and display the tons of carbon lost between 2002 - 2022 below.
|
| 34 |
+
Data comes from Vizzuality repo on [source.coop](https://beta.source.coop/repositories/vizzuality/lg-land-carbon-data/description/).
|
|
|
|
|
|
|
|
|
|
| 35 |
'''
|
| 36 |
|
| 37 |
|
|
|
|
| 135 |
st.code('''
|
| 136 |
|
| 137 |
# irrecoverable carbon (Conservation International):
|
| 138 |
+
carbon = "https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif"
|
| 139 |
+
m.add_cog_layer(carbon, palette="reds", name="irrecoverable carbon", transparent_bg=True, opacity = 0.8, zoom_to_layer=False)')
|
| 140 |
|
| 141 |
# Human Impacts, Vizzuality
|
| 142 |
+
hi="https://data.source.coop/vizzuality/hfp-100/hfp_2021_100m_v1-2_cog.tif"
|
| 143 |
+
m.add_cog_layer(hi, palette="purples", name="human impact", transparent_bg=True, opacity = 0.8, zoom_to_layer=False)
|
| 144 |
|
| 145 |
# Fire Polygons, USGS
|
| 146 |
usgs = "https://data.source.coop/cboettig/fire/usgs-mtbs.pmtiles"
|