EnglandCovidDataLoader¶
- class stgraph.dataset.EnglandCovidDataLoader(verbose: bool = False, lags: int = 8, cutoff_time: int | None = None, redownload: bool = False)[source]¶
Bases:
STGraphDynamicDatasetCOVID-19 cases in England’s NUTS3 regions.
This dataset captures the interplay between COVID-19 cases and mobility in England’s NUTS3 regions from March 3rd to May 12th. It is a directed and weighted graph that offers daily case count and movement of people between each region through node and edge features respectively.
This class provides functionality for loading, processing, and accessing the England Covid dataset for use in deep learning tasks such as predicting the COVID cases in a region.
Example
from stgraph.dataset import EnglandCovidDataLoader eng_covid = EnglandCovidDataLoader(verbose=True) num_nodes_dict = eng_covid.gdata["num_nodes"] num_edges_dict = eng_covid.gdata["num_edges"] total_timestamps = eng_covid.gdata["total_timestamps"] edge_list = eng_covid.get_edges() edge_weights = eng_covid.get_edge_weights() feats = eng_covid.get_all_features() targets = eng_covid.get_all_targets()
- Parameters:
verbose (bool, optional) – Flag to control whether to display verbose info (default is False)
lags (int, optional) – The number of time lags (default is 8)
cutoff_time (int, optional) – The cutoff timestamp for the temporal dataset (default is None)
redownload (bool, optional (default is False)) – Redownload the dataset online and save to cache
- name¶
The name of the dataset.
- Type:
str
- gdata¶
Graph meta data.
- Type:
dict