GithubHelp home page GithubHelp logo

jsheffie / covid_19_data_parser Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 4.92 MB

A utility to parse the COVID 19 data from Johns Hopkins

License: MIT License

Makefile 5.61% Python 93.43% Shell 0.96%

covid_19_data_parser's People

Contributors

jsheffie avatar

Stargazers

 avatar

Watchers

 avatar  avatar

covid_19_data_parser's Issues

Stitch old data into a combined data into lat,long csv output

The daily data changed on 03/21/2020
Figure out of the unified file is:

  • US by state ( I don't think so )
  • US by lat long ( I think this is what I want long term for the heat map over time )

03/21/2020 - it was
Province/State,Country/Region,Last Update,Confirmed,Deaths,Recovered,Latitude,Longitude

03/22/2020 - it became
FIPS,Admin2,Province_State,Country_Region,Last_Update,Lat,Long_,Confirmed,Deaths,Recovered,Active,Combined_Key

Modify DailyReportsParser to do the data downloads under the covers

Old Interface

filename = "{}/{}.csv".format(daily_data_dir, date_str)
download_url = "{}/{}.csv".format(base_url, date_str)

daily_parser = DailyReportsParser()
daily_parser.set_cachefile(filename)
if not daily_parser.cached_csv():
     client = Client()
     ( res_code, data ) = client.get(download_url)
     if res_code == 200:
         res = daily_parser.write_csv_file(filename, data)

New Interface

daily_parser = DailyReportsParser()
daily_parser.set_cachefile(filename)
data = daily_parser.get_data(download_url, cached=True)

also modify the parse method to receive the data ( and not require extra file opening )

old:
daily_parser.parse(date_str, needle_array, filename )
new:
daily_parser.parse(date_str, needle_array, data )

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.