Git Product home page Git Product logo

covid-19-data-south-carolina's Introduction

covid-19-data-south-carolina

Daily COVID-19 data breakdown by zip code for the state of South Carolina.

Prior to July 22, I wasn't aware of the Open Data API, so I was generating data based on PDF exports from SC DHEC.

Installation

This runs with Node.js and dependencies are managed by NPM, which comes with Node.

  1. Clone this repo and move into the newly-created directory: git clone [email protected]:davidcalhoun/covid-19-data-south-carolina.git && cd covid-19-data-south-carolina
  2. Install dependencies by running npm i. This will create a node_modules directory, containing all package dependencies.
  3. Take a look at the scripts section of package.json, which are available scripts you can run. For instance, to version bump dependencies automatically, you can run npm run bump.

Usage

  • To update data/casesMerged.json with the most current data, run $ npm run download-from-api.
  • To update and redeploy the map visualization, run $ npm run daily-update

data

All data exports live here. Prior to July 22, I was converting PDF exports into JSON from the SC DHEC updates - the original PDF is preserved here alongside its TXT and JSON translations.

  • data/countyFormat - old exports in "County Format" (prior to April 10).
  • data/casesMerged.json - data for all days merged, including quantile distributions for the map visualization. This quantile computation used to be performed clientside, but started to become sluggish as the dataset increased (especially noticeable on mobile devices).
  • data/scZipMeta.json - zip code metadata via simplemaps.com. Necessary for per capita calculations.

scripts

There are several helper scripts to retrieve and process data. Some scripts are used daily, while others are more experimental or legacy.

  1. daily-download-from-api.js - Downloads from the SC DHEC Open Data API and generates casesMerged.json.
  2. daily-update.sh - updates and pushes the casesMerged.json file to Github, which automatically redeploys the map visualization
  3. utils.js - shared utilities (for file reading, data manipulation, etc)

Legacy scripts (no longer used)

  1. convertToZipFormat.js - (legacy) Translates data sorted by County into Zip code format. Needed for data PDFs prior to April 10
  2. daily-download.js - (legacy) Automation to download PDFs from the Tableau dashboard.
  3. merge.js - (legacy) Merges all JSON data files and outputs data/casesMerged.json
  4. pdfToJSON.js - (legacy) (experimental WIP) - initial attempts to run OCR on PDFs, to avoid needing to use pdftotext.com
  5. stats.js - (legacy) helper script to determine which zip codes are newly affected. Not used much now, as most all zip codes are affected.
  6. txtToJSON.js - (legacy) converts TXT data to JSON format.

covid-19-data-south-carolina's People

Contributors

davidcalhoun avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.