Skip to content

staedi/Streamlit_nCov19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit_nCov19 (v2)

Streamlit App

Interactive Dashboard of COVID-19 infections and vaccinations employing Streamlit module . You can try here.

Primary objectives

  • Basic options for users to choose
    • Cumulative or daily changes measures
    • Global aggregate stat or per-country information
  • Display a basic statistics for selected area (Global or for specific country)
  • Draw a heatmap detailing given a region and measure (e.g., Daily confirmed patients increases in the US)
  • Draw a Choropleth with the same selection (Country-level or state-level comparisons)

Data sources and helpful resources

  • Infections data source
  • Vaccinations data source
  • Geographic data
    • NaturalEarth: Geographical shapedata for countries (admin0) and states-level (admin1) data to be used (1:10m data is used for selected countries for states details while 1:50m used for others)
  • Useful resources
    • polygon conversion: To convert MultiPolygon geojson to Polygon form (Nick Doiron)
    • simplify: Using rmapshaper::simplify() in R to greatly reduce file sizes (Phil Mickey Johns)
    • dissolve: Merge small-scale districts into larger level ones (e.g., counties -> states) (Phil Mickey Johns)

Descriptions of objects

  • Heatmap
    • Two separate charts are drawn (Infections: confirmed, casualties / Vaccinations: administered, fully vaccinated)
    • Regions on y-axis are pre-sorted by the figures (ordered in a descending manner for top-25 disricts)
  • Barplot (Vaccinations-only)
    • For countries which don't provide province/state-level data, single stacked barplot with both measures are drawn (administered and fully vaccinated)
  • Choropleth
    • Two measures are drawn on a single choropleth (Color depths: confirmed / administered, Elevations: casualties / fully vaccinated)
    • One measure is shown by the color depth while the other is represented by elevations of the regions

Selected modules used

  • Altair: Altair chart module used to draw heatmap (streamlit.altair_chart)
  • Pydeck: Pydeck mapping module used to draw Choropleth/PolygonLayer (streamlit.pydeck_chart)

Snapshots

Main Landing Page

main

Heatmap - Infections

infections_heatmap

Heatmap - Vaccinations

vaccinations_heatmap

Barplot - Vaccinations (Country-level)

barplot

Choropleth - Infections

infections_choropleth

Choropleth - Vaccinations

vaccinations_choropleth