Spaces:
Sleeping
Sleeping
testing
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ m.add_cog_layer(deforest, palette="reds", name="deforested", transparent_bg=True
|
|
| 42 |
|
| 43 |
|
| 44 |
# +
|
| 45 |
-
|
| 46 |
m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif",
|
| 47 |
palette="greens",
|
| 48 |
name="irreplacable carbon",
|
|
@@ -52,10 +52,12 @@ m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_t
|
|
| 52 |
'''
|
| 53 |
|
| 54 |
|
| 55 |
-
|
| 56 |
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.011169,40.728527],[-123.011169,40.798217],[-122.956924,40.798217],[-122.956924,40.728527],[-123.011169,40.728527]]]}}
|
| 57 |
'''
|
| 58 |
|
|
|
|
|
|
|
| 59 |
|
| 60 |
# +
|
| 61 |
## Map controls sidebar
|
|
@@ -75,7 +77,7 @@ with st.sidebar:
|
|
| 75 |
|
| 76 |
polygon = st.text_area(
|
| 77 |
label = "geometry",
|
| 78 |
-
value =
|
| 79 |
height = 400)
|
| 80 |
|
| 81 |
|
|
@@ -83,7 +85,7 @@ with st.sidebar:
|
|
| 83 |
|
| 84 |
code = st.text_area(
|
| 85 |
label = "Python code",
|
| 86 |
-
value =
|
| 87 |
height = 400)
|
| 88 |
|
| 89 |
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
# +
|
| 45 |
+
code_ex = '''
|
| 46 |
m.add_cog_layer("https://data.source.coop/cboettig/carbon/cogs/irrecoverable_c_total_2018.tif",
|
| 47 |
palette="greens",
|
| 48 |
name="irreplacable carbon",
|
|
|
|
| 52 |
'''
|
| 53 |
|
| 54 |
|
| 55 |
+
polygon_ex = '''
|
| 56 |
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.011169,40.728527],[-123.011169,40.798217],[-122.956924,40.798217],[-122.956924,40.728527],[-123.011169,40.728527]]]}}
|
| 57 |
'''
|
| 58 |
|
| 59 |
+
polygon_ex ='{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-125.81543,48.312428],[-125.81543,52.935397],[-113.818359,52.935397],[-113.818359,48.312428],[-125.81543,48.312428]]]}}'
|
| 60 |
+
|
| 61 |
|
| 62 |
# +
|
| 63 |
## Map controls sidebar
|
|
|
|
| 77 |
|
| 78 |
polygon = st.text_area(
|
| 79 |
label = "geometry",
|
| 80 |
+
value = polygon_ex,
|
| 81 |
height = 400)
|
| 82 |
|
| 83 |
|
|
|
|
| 85 |
|
| 86 |
code = st.text_area(
|
| 87 |
label = "Python code",
|
| 88 |
+
value = code_ex,
|
| 89 |
height = 400)
|
| 90 |
|
| 91 |
|