Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,16 @@ def plot_taraf_map(yaxis,min_year = 0, max_year = 400):
|
|
31 |
temp[f'{yaxis}_CubeRoot'] = temp[yaxis].apply(np.cbrt)
|
32 |
filtered = geopandas.GeoDataFrame(temp, geometry= 'Coordinates').reset_index()
|
33 |
fig = px.scatter_mapbox(data_frame = filtered, lat = filtered.geometry.y, lon = filtered.geometry.x,size = f'{yaxis}_CubeRoot',color = yaxis, title = f'Map of {yaxis}', opacity = .5, zoom = 0, hover_data = 'City')
|
34 |
-
fig.update_layout(title_font_color = 'red', title_x = .5, mapbox_style="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
fig.update_layout(
|
36 |
margin=dict(l=0,b=0),
|
37 |
)
|
|
|
31 |
temp[f'{yaxis}_CubeRoot'] = temp[yaxis].apply(np.cbrt)
|
32 |
filtered = geopandas.GeoDataFrame(temp, geometry= 'Coordinates').reset_index()
|
33 |
fig = px.scatter_mapbox(data_frame = filtered, lat = filtered.geometry.y, lon = filtered.geometry.x,size = f'{yaxis}_CubeRoot',color = yaxis, title = f'Map of {yaxis}', opacity = .5, zoom = 0, hover_data = 'City')
|
34 |
+
fig.update_layout(title_font_color = 'red', title_x = .5, mapbox_style="white-bg",
|
35 |
+
mapbox_layers=[
|
36 |
+
{
|
37 |
+
"below": 'traces',
|
38 |
+
"sourcetype": "raster",
|
39 |
+
"sourceattribution": "United States Geological Survey",
|
40 |
+
"source": [
|
41 |
+
"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}"
|
42 |
+
]
|
43 |
+
})
|
44 |
fig.update_layout(
|
45 |
margin=dict(l=0,b=0),
|
46 |
)
|