Browse Source

Changed background of plot PNGs

pull/116/head
Jure Šorn 3 years ago
parent
commit
520cf4ca2d
4 changed files with 1382 additions and 0 deletions
  1. BIN
      web/covid_cases.png
  2. BIN
      web/covid_deaths.png
  3. 1380
      web/empty_script.py
  4. 2
      web/update_plots.py

BIN
web/covid_cases.png

Before After
Width: 960  |  Height: 315  |  Size: 60 KiB Width: 960  |  Height: 315  |  Size: 60 KiB

BIN
web/covid_deaths.png

Before After
Width: 960  |  Height: 340  |  Size: 50 KiB Width: 960  |  Height: 340  |  Size: 50 KiB

1380
web/empty_script.py
File diff suppressed because it is too large
View File

2
web/update_plots.py

@ -36,6 +36,7 @@ def update_covid_deaths():
f = line(df, x='Date', y='Total Deaths per Million', color='Continent') f = line(df, x='Date', y='Total Deaths per Million', color='Continent')
f.update_layout(margin=dict(t=24, b=0), paper_bgcolor='rgba(0, 0, 0, 0)') f.update_layout(margin=dict(t=24, b=0), paper_bgcolor='rgba(0, 0, 0, 0)')
update_file('covid_deaths.js', f) update_file('covid_deaths.js', f)
f.layout.paper_bgcolor = 'rgb(255, 255, 255)'
write_to_png_file('covid_deaths.png', f, width=960, height=340) write_to_png_file('covid_deaths.png', f, width=960, height=340)
@ -44,6 +45,7 @@ def update_confirmed_cases():
df = wrangle_data(*scrape_data()) df = wrangle_data(*scrape_data())
f = get_figure(df) f = get_figure(df)
update_file('covid_cases.js', f) update_file('covid_cases.js', f)
f.layout.paper_bgcolor = 'rgb(255, 255, 255)'
write_to_png_file('covid_cases.png', f, width=960, height=315) write_to_png_file('covid_cases.png', f, width=960, height=315)
def scrape_data(): def scrape_data():

Loading…
Cancel
Save