Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

***IMPORTANT NOTICE*** DATA REFORMATTED TO OLD DATA STRUCTURE ***IMPORTANT NOTICE*** #1423

Open
CWrecker opened this issue Mar 24, 2020 · 4 comments

Comments

@CWrecker
Copy link

@CWrecker CWrecker commented Mar 24, 2020


---NOTICE---

Hello all, I know they recently changed to the formatting of the data structure. I have recompiled it at shared it below as a google sheets and CSV file which both upload live as new information is collected. THIS USES THE OLD DATA STRUCTURE

image


If you require the long and lat data, please let me know and I will add it

Ok here we go:

Link to a live google sheets file:
https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vQisxSucfFNfhB_KJg1WmXZW_9_VtW_WxAy4ReE7vsRKDUgg2XwhOO0k1yS4V6tZnwZziRETZ3s1WBP/pubhtml?gid=0&single=true

Link to a live CSV file:
https://docs.google.com/spreadsheets/d/e/2PACX-1vQisxSucfFNfhB_KJg1WmXZW_9_VtW_WxAy4ReE7vsRKDUgg2XwhOO0k1yS4V6tZnwZziRETZ3s1WBP/pub?output=csv

Link to a live JSON file:
https://script.google.com/macros/s/AKfycbzsyQNJwDvQc5SvNGEDZZOoNI3XxNar9PA9sRucZx7mgzfWpFQ/exec

@CWrecker CWrecker changed the title ***IMPORTANT NOTICE*** DATA REFORMATTED TO OLD DATA STRUCTURE ***IMPORTANT NOTICE*** DATA REFORMATTED TO OLD DATA STRUCTURE ***IMPORTANT NOTICE*** Mar 24, 2020
@cortical-iv
Copy link

@cortical-iv cortical-iv commented Mar 24, 2020

long and lat are important, and individual us state data

@CWrecker
Copy link
Author

@CWrecker CWrecker commented Mar 24, 2020

long and lat are important, and individual us state data

I’ll see what I can do

@cedvdb
Copy link

@cedvdb cedvdb commented Mar 24, 2020

I need this as well only for the one of today. I can deal with the next ones..

@hippodribble
Copy link

@hippodribble hippodribble commented Mar 24, 2020

Here's some Python code to reformat it yourself:

import os.path
import pandas as pd
def reformat(infile):
    (dir, file) = os.path.split(infile)
    f = file.replace(".csv","b.csv")
    outfile = os.path.join(dir,f)
    print(infile)
    print(outfile)
    df1 = pd.read_csv(infile, parse_dates=[4],skip_blank_lines=False )
    dic = {
        "Province/State":"Province_State",
        "Country/Region":"Country_Region",
        "Last Update":"Last_Update",
        "Confirmed":"Confirmed",
        "Deaths":"Deaths",
        "Recovered":"Recovered",
        "Latitude":"Lat",
        "Longitude":"Long_"
    }
    temp=df1[list(dic.values())]
    temp.columns=list(dic.keys())
    temp.reset_index(drop=True,inplace=True)
    temp.to_csv(outfile, index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants