Exemplo n.º 1
0
                          'Q_Symptoms','Q_Voluntary','Q_Personal','Q_General','Left_Quarantine']
'''

# Generate the area data
print('Generating the Area data')
wiki_scraper = covid19_WebScrapes.Wiki_Scrape()
county_areas = wiki_scraper.Scrape_Counties()
County_Areas = pd.DataFrame(
    county_areas, columns=['State', 'County_FIPS', 'County', 'Area (sqmi)'])
County_Areas['Area (sqmi)'] = County_Areas['Area (sqmi)'].apply(
    lambda x: str(x).replace(',', ''))
County_Areas['Area (sqmi)'] = County_Areas['Area (sqmi)'].astype(float)

# Generate the Google Mobility time series data
print('Generating the Google Mobility Data')
google = covid19_WebScrapes.Alphabet_Scrape_V2()
google_df = google.get_Data(country='United States',
                            country_only=False,
                            state_only=False)  #pulls county info only

# Generate the Orders Data
print('Generating the Orders Data')
orders = covid19_WebScrapes.OrdersScrape()
orders_df = orders.getzip()

# Clean and merge data.
print('Cleaning all data')
data_cleaner = covid19_WebScrapes.Clean_Data(
    './manually_pulled/FIPS_Codes_USDA.csv',
    './manually_pulled/new_state_mapping.txt')
area_data_cleaned = data_cleaner.Clean_Area_Data(County_Areas)