# Installing covidcast
!pip install covidcast
from datetime import date
import covidcast
covidcast.name_to_fips(["Los Angeles", "Santa Barbara", "Orange"])
covidcast.fips_to_name(["06059", "42003"])
ca_counties_dict = covidcast.fips_to_name("^06.*", ties_method="all")[0]
print(ca_counties_dict)
facts_df = covidcast.signal("usa-facts", "confirmed_incidence_num",
date(2020, 5, 1), date(2020, 6, 30),
geo_type="state", geo_values=["ca", "ny", "tx"])
facts_df
visits_df = covidcast.signal("doctor-visits", "smoothed_cli",
date(2020, 5, 1), date(2020, 6, 30),
geo_type="state", geo_values=["ca", "ny", "tx"])
visits_df
covidcast.aggregate_signals([facts_df, visits_df])