Spaces:
Sleeping
Sleeping
random demo
Browse files
app.py
CHANGED
|
@@ -34,7 +34,8 @@ deforest = "https://data.source.coop/vizzuality/lg-land-carbon-data/deforest_car
|
|
| 34 |
irrecoverable = "https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif"
|
| 35 |
vulnerable = "https://data.source.coop/cboettig/carbon/cogs/vulnerable_c_total_2018.tif"
|
| 36 |
|
| 37 |
-
|
|
|
|
| 38 |
# m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif", palette="reds", name="irrecoverable carbon", transparent_bg=True, opacity = 0.8)
|
| 39 |
# m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/vulnerable_c_total_2018.tif", palette="purples", name="vulnerable carbon", transparent_bg=True, opacity = 0.8)
|
| 40 |
|
|
@@ -42,8 +43,12 @@ vulnerable = "https://data.source.coop/cboettig/carbon/cogs/vulnerable_c_total_2
|
|
| 42 |
|
| 43 |
# +
|
| 44 |
code = '''
|
| 45 |
-
m
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
'''
|
| 48 |
|
| 49 |
|
|
|
|
| 34 |
irrecoverable = "https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif"
|
| 35 |
vulnerable = "https://data.source.coop/cboettig/carbon/cogs/vulnerable_c_total_2018.tif"
|
| 36 |
|
| 37 |
+
m = leafmap.Map(center=[35, -100], zoom=5)
|
| 38 |
+
m.add_cog_layer(deforest, palette="reds", name="deforested", transparent_bg=True, opacity = 0.8, zoom_to_layer=False)
|
| 39 |
# m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif", palette="reds", name="irrecoverable carbon", transparent_bg=True, opacity = 0.8)
|
| 40 |
# m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/vulnerable_c_total_2018.tif", palette="purples", name="vulnerable carbon", transparent_bg=True, opacity = 0.8)
|
| 41 |
|
|
|
|
| 43 |
|
| 44 |
# +
|
| 45 |
code = '''
|
| 46 |
+
m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif",
|
| 47 |
+
palette="greens",
|
| 48 |
+
name="irreplacable carbon",
|
| 49 |
+
transparent_bg=True,
|
| 50 |
+
zoom_to_layer=False,
|
| 51 |
+
opacity = 0.8)
|
| 52 |
'''
|
| 53 |
|
| 54 |
|