Skip to content

booringreader/covidD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19 Dashboard

disease.sh API (Johns Hopkins CSSE data source)

Dashboard

  • Real-Time Data: Fetches up to 365 days of historical COVID-19 data
  • Country: Choose from 15 countries
  • Charts:
    • Time-series line charts with Plotly
    • Bar charts for country comparisons
    • Pie charts for death distribution
    • Death rate comparison charts
  • KPI Metrics: Global statistics at a glance
  • Data Tables: Formatted tables with sorting and filtering
  • Export Options: Download data as CSV or Excel

UI

  • Clean, modern design with Streamlit
  • Sidebar controls for easy filtering
  • Tabbed interface for different views:
    • Visualizations tab
    • Data tables tab
    • Export tab
  • Responsive layout that works in the browser

Use

Sidebar Controls

  • Select Countries: Choose which countries to analyze (default: top 10)
  • Days of Historical Data: Adjust from 30 to 365 days
  • Refresh Data: Click to reload fresh data from the API

Main Dashboard

  • Global Statistics: View total cases, deaths, death rate, and country count
  • Visualizations: Interactive charts showing trends and comparisons
  • Data Tables: Detailed data with regional summaries and timelines
  • Export: Download your data in CSV or Excel format

Countries available rn

USA, India, Brazil, UK, France, Germany, Italy, Spain, Canada, Australia, Mexico, Russia, Japan, South Korea, Indonesia

Data Source

uses the disease.sh API, which aggregates data from Johns Hopkins CSSE.

Note: Recent data may not include recovery figures as the API no longer tracks recoveries for most regions.

Project Structure

.
├── app.py              # Streamlit dashboard application
├── data_service.py     # Data fetching and processing logic
├── main.py             # legcay console script
├── pyproject.toml      # dependencies
├── outputs/            # Excel reports
└── README.md           # this file

Dependencies

  • streamlit: Web dashboard framework
  • plotly: Interactive visualizations
  • pandas: Data manipulation
  • requests: API calls
  • openpyxl: Excel export

All dependencies are automatically installed via pyproject.toml.

Command-Line Usage

If you want to run the console version instead:

python main.py

This will generate PNG charts and an Excel file instead of running the web interface.

Error Handling

The dashboard includes robust error handling:

  • API request failures are caught and displayed
  • Missing data is handled gracefully
  • Date parsing errors are automatically corrected
  • Recovery data defaults to 0 when unavailable

Performance

  • Data is cached for 1 hour to reduce API calls
  • Supports analysis of up to 5,475 data points (15 countries × 365 days)
  • Dashboard loads in 5-10 seconds depending on data range

Notes

  • The dashboard automatically refreshes when you change filters
  • Data is updated hourly from the source API
  • Recovery statistics may show 0 for recent data (API limitation)
  • Browser console warnings about WebSocket are normal and can be ignored

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages