This repo contains datasets for spatio-temporal prediction of COVID-19 distribution over the US. The US is represented as a graph where the nodes are associated with states, and edges represent the adjacency of the states.
- Download raw data from the NY times using this link and put it to
./data
. - Install dependencies:
pip install networkx==2.8.8 pandas==1.3.5
- Use
datasets.covid_adjacencies_graph_dataset()
to get graph and temporal data.
import datasets
graph, temp_data = datasets.covid_adjacencies_graph_dataset()
- Enjoy your experiments!
A graph is stored as nx.Graph
object. Read more about it in networkx documentation.
The data are aggregated weekly and in the following format:
temp_data[date][state] = {
"deaths": INT, # The number of deaths during the week
"cases": INT, # The number of cases during the week
"deaths_normalized": FLOAT, # The number of deaths normalized by the state population
"cases_normalized": FLOAT, # The number of cases normalized by the state population
}