Giter Site home page Giter Site logo

staedi / streamlit_ncov19 Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 13.07 MB

Interactive Dashboard of Novel COVID-19 Using Streamlit for Python

Home Page: https://share.streamlit.io/staedi/streamlit_ncov19/app.py

License: MIT License

Python 99.08% Shell 0.77% Procfile 0.15%
covid19-tracker streamlit-dashboard streamlit heatmap choropleth infections vaccinations

streamlit_ncov19's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.