FDSRashid commited on
Commit
8cd05ac
·
verified ·
1 Parent(s): eb5c941

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -34,17 +34,12 @@ def plot_taraf_map(yaxis,min_year = 0, max_year = 400, heat=False):
34
  fig = px.density_mapbox(data_frame = filtered, lat = filtered.geometry.y, lon = filtered.geometry.x,z = yaxis, title = f'Map of {yaxis}', opacity = .5, hover_data = 'City',center=dict(lat=21.4241, lon=39.826168), radius=17, zoom=2)
35
  else:
36
  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, hover_data = 'City',center=dict(lat=21.4241, lon=39.826168), zoom=2 )
37
- fig.update_layout(title_font_color = 'red',margin=dict(l=0, r=0, b=0), title_x = .5, mapbox_style="white-bg",)
38
  mapbox_layers=[
39
- {
40
- "below": 'traces',
41
- "sourcetype": "raster",
42
- "sourceattribution": "United States Geological Survey",
43
- "source": [
44
- "https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}"
45
- ]
46
- }
47
- ])
48
  return fig
49
 
50
 
 
34
  fig = px.density_mapbox(data_frame = filtered, lat = filtered.geometry.y, lon = filtered.geometry.x,z = yaxis, title = f'Map of {yaxis}', opacity = .5, hover_data = 'City',center=dict(lat=21.4241, lon=39.826168), radius=17, zoom=2)
35
  else:
36
  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, hover_data = 'City',center=dict(lat=21.4241, lon=39.826168), zoom=2 )
37
+ fig.update_layout(title_font_color = 'red',margin=dict(l=0, r=0, b=0), title_x = .5, mapbox_style="white-bg",
38
  mapbox_layers=[
39
+ {"below": 'traces',
40
+ "sourcetype": "raster",
41
+ "sourceattribution": "United States Geological Survey",
42
+ "source": ["https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}"] }])
 
 
 
 
 
43
  return fig
44
 
45