Skip to content

Displays COVID-19 daily changes, positive cases, and deaths using county based data in table and graph form for Oregon

Notifications You must be signed in to change notification settings

KorynLA/oregonCovd19Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oregon COVID-19 Tracker

Table of Contents

Tools Used

The frontend was created with React using the D3JS libray and the backend was created with Nodejs and Express. The data displayed was scraped using python through opening a connection to the Oregon Health Authority website and using BeautifulSoup. The data is loaded into a PostgreSQL database. This was deployed using Heroku.

Frontend Routes

/

Main page: Displays the daily changes table. The region to view is chosen by the user with a dropdown form. All regional graphs and OR total graphs are displayed below.

Backend Endpoints

/api/total

  • GET
  • Returns Oregon total data
  • Format: JSON
  • Fields: date_of_cases, deaths, positive_cases
    • Returned as: [{"date_of_cases":"2020-05-26T00:00:00.000Z","positive_cases":3967,"deaths":148} ...]

/api/central

  • GET
  • Returns county data for Wasco, Sherman, Gilliam, Jefferson, Wheeler, Crook, Deschutes, Lake and Klamath.
  • Format: JSON
  • Fields:
    • countyName, date_of_cases, deaths, positive_cases
    • Returned as:
      • {"countyName":[{"date_of_cases":"202x-0x-xT00:00:00.000Z","positive_cases":x,"deaths":x}...], ...}

/api/counties

  • GET
  • Returns population data for all counties in Oregon
  • Format: JSON
  • Fields: countyName, population

/api/eastern

  • GET
  • Returns county data for Morrow, Umatilla, Union, Wallowa, Baker, Grant, Harney and Malheur.
  • Format: JSON
  • Fields:
    • countyName, date_of_cases, deaths, positive_cases
    • Returned as:
      • {"countyName":[{"date_of_cases":"202x-0x-xT00:00:00.000Z","positive_cases":x,"deaths":x}...], ...}

/api/metro

  • GET
  • Returns county data for Clackamas, Hood River, Multnomah and eastern Washington.
  • Format: JSON
  • Fields:
    • countyName, date_of_cases, deaths, positive_cases
    • Returned as:
      • {"countyName":[{"date_of_cases":"202x-0x-xT00:00:00.000Z","positive_cases":x,"deaths":x}...], ...}

/api/index

  • GET
  • Returns dummy data
  • Format: JSON

/api/southwestern

  • GET
  • Returns county data for Douglas, Curry, Coos, Josephine and Jackson.
  • Format: JSON
  • Fields:
    • countyName, date_of_cases, deaths, positive_cases
    • Returned as:
      • {"countyName":[{"date_of_cases":"202x-0x-xT00:00:00.000Z","positive_cases":x,"deaths":x}...], ...}

/api/willamette

  • GET
  • Returns county data for Clatsop, Columbia, Tillamook, Yamhill, Polk, Marion, Lincoln, Linn, Benton and Lane.
  • Format: JSON
  • Fields:
    • countyName, date_of_cases, deaths, positive_cases
    • Returned as:
      • {"countyName":[{"date_of_cases":"202x-0x-xT00:00:00.000Z","positive_cases":x,"deaths":x}...], ...}

/

  • GET
  • Returns frontend view

Database Schema

  • There is a table for every county in Oregon. Each county contains the same column names.
    • County tables: Clackamas, hood_river, Multnomah, Washington, Clatsop, Columbia, Tillamook, Yamhill, Polk, Marion, Lincoln, Linn, Benton, Lane, Douglas, Curry, Coos, Josephine, Jackson, Wasco, Sherman, Gilliam, Jefferson, Wheeler, Crook, Deschutes, Lake, Klamath, Morrow, Umatilla, _union, Wallowa, Baker, _grant, Harney and Malheur.
      • CountyName(indexed, date_of_cases, positive_cases, deaths)
        • indexed is the unique identifier
  • Total(indexed, date_of_cases, positive_cases, deaths)
    • indexed is the unique identifier
  • Counties(counties_key, countyname, population)
    • counties_key is the unique identifier

Deployment

This project was deployed using a monorepo. In the main root there is a procfile and package.json file displaying how the project is loaded and ran with Heroku.

  • The backend is initially ran then the frontend is built as a buildpack and called by the backend server when the user calls the site with the '/' route.
  • Due to the frontend running as a route, the user has the ability to view the backend routes by adding the route ending to the URL. i.e. 'SITE_URL/api/total'

About

Displays COVID-19 daily changes, positive cases, and deaths using county based data in table and graph form for Oregon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published