MCPcopy Create free account
hub / github.com/gto76/python-cheatsheet / scrape_covid

Function scrape_covid

web/update_plots.py:52–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51 def scrape_data():
52 def scrape_covid():
53 url = 'https://covid.ourworldindata.org/data/owid-covid-data.csv'
54 df = pd.read_csv(url, usecols=['location', 'date', 'total_cases'])
55 return df[df.location == 'World'].set_index('date').total_cases
56 def scrape_yahoo(slug):
57 url = f'https://query1.finance.yahoo.com/v7/finance/download/{slug}' + \
58 '?period1=1579651200&period2=9999999999&interval=1d&events=history'

Callers 1

scrape_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected