dylan-plummer commited on
Commit
d30b80e
·
1 Parent(s): 0ea7c56

update update time and colormap

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -46,7 +46,8 @@ city_county_name_map = cities['county_name'].to_dict()
46
  cached_report = None
47
  cache_time = 0
48
  reload_cache = False
49
- reload_every = 10 * 60 # 10 minutes
 
50
 
51
  def full_report():
52
  global cached_report, cache_time, reload_cache
@@ -118,7 +119,7 @@ def full_report():
118
  total_map = px.choropleth(country_df, locations="iso",
119
  color="jumps",
120
  hover_name="country", # column to add to hover information
121
- color_continuous_scale ="plasma",
122
  projection='natural earth',
123
  template="plotly_dark")
124
  # remove the legend
@@ -131,7 +132,7 @@ def full_report():
131
  county_df = county_df.groupby(['county', 'count_name']).sum().reset_index()
132
 
133
  county_map = px.choropleth(county_df, geojson=counties, locations='county', color='jumps',
134
- color_continuous_scale="plasma",
135
  scope="usa",
136
  hover_name="count_name",
137
  template="plotly_dark"
 
46
  cached_report = None
47
  cache_time = 0
48
  reload_cache = False
49
+ # 6 hours
50
+ reload_every = 6 * 60 * 60
51
 
52
  def full_report():
53
  global cached_report, cache_time, reload_cache
 
119
  total_map = px.choropleth(country_df, locations="iso",
120
  color="jumps",
121
  hover_name="country", # column to add to hover information
122
+ color_continuous_scale ="jet",
123
  projection='natural earth',
124
  template="plotly_dark")
125
  # remove the legend
 
132
  county_df = county_df.groupby(['county', 'count_name']).sum().reset_index()
133
 
134
  county_map = px.choropleth(county_df, geojson=counties, locations='county', color='jumps',
135
+ color_continuous_scale="jet",
136
  scope="usa",
137
  hover_name="count_name",
138
  template="plotly_dark"