Beispiel #1
0
 def get_latest_case_info(url, column_name):
     df = fetch_df(url)
     col = df.columns[-1]
     if date is not None:
         if not date in df.columns:
             raise Exception(
                 'Date {} not in dataset or not in proper format'.format(
                     date))
         col = date
     per_county_counts = df[col]
     df['{} Last Updated'.format(column_name)] = df.columns[-1]
     df[column_name] = per_county_counts
     return df[[
         'countyFIPS', 'County Name', 'State', 'stateFIPS', column_name,
         '{} Last Updated'.format(column_name)
     ]]
Beispiel #2
0
def get_nytimes_cases_by_state():
    return fetch_df(NYTIMES_STATE_URL)
Beispiel #3
0
def get_usafacts_deaths_by_county():
    return fetch_df(USAFACTS_DEATHS_URL)
Beispiel #4
0
def get_nytimes_cases_by_county():
    return fetch_df(NYTIMES_COUNTY_URL)
Beispiel #5
0
def get_usafacts_cases_by_county():
    return fetch_df(USAFACTS_CASES_URL)