PyTorch Geometric Temporal Dataset

Contents

Datasets

class ChickenpoxDatasetLoader[source]

A dataset of county level chicken pox cases in Hungary between 2004 and 2014. We made it public during the development of PyTorch Geometric Temporal. The underlying graph is static - vertices are counties and edges are neighbourhoods. Vertex features are lagged weekly counts of the chickenpox cases (we included 4 lags). The target is the weekly number of cases for the upcoming week (signed integers). Our dataset consist of more than 500 snapshots (weeks).

get_dataset(lags: int = 4)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the Chickenpox Hungary data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The Chickenpox Hungary dataset.

class PedalMeDatasetLoader[source]

A dataset of PedalMe Bicycle deliver orders in London between 2020 and 2021. We made it public during the development of PyTorch Geometric Temporal. The underlying graph is static - vertices are localities and edges are spatial_connections. Vertex features are lagged weekly counts of the delivery demands (we included 4 lags). The target is the weekly number of deliveries the upcoming week. Our dataset consist of more than 30 snapshots (weeks).

get_dataset(lags: int = 4)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the PedalMe London demand data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The PedalMe dataset.

class WikiMathsDatasetLoader[source]

A dataset of vital mathematics articles from Wikipedia. We made it public during the development of PyTorch Geometric Temporal. The underlying graph is static - vertices are Wikipedia pages and edges are links between them. The graph is directed and weighted. Weights represent the number of links found at the source Wikipedia page linking to the target Wikipedia page. The target is the daily user visits to the Wikipedia pages between March 16th 2019 and March 15th 2021 which results in 731 periods.

get_dataset(lags: int = 8)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the Wikipedia Vital Mathematics data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The Wiki Maths dataset.

class WindmillOutputLargeDatasetLoader[source]

Hourly energy output of windmills from a European country for more than 2 years. Vertices represent 319 windmills and weighted edges describe the strength of relationships. The target variable allows for regression tasks.

get_dataset(lags: int = 8)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the Windmill Output data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The Windmill Output dataset.

class WindmillOutputMediumDatasetLoader[source]

Hourly energy output of windmills from a European country for more than 2 years. Vertices represent 26 windmills and weighted edges describe the strength of relationships. The target variable allows for regression tasks.

get_dataset(lags: int = 8)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the Windmill Output data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The Windmill Output dataset.

class WindmillOutputSmallDatasetLoader[source]

Hourly energy output of windmills from a European country for more than 2 years. Vertices represent 11 windmills and weighted edges describe the strength of relationships. The target variable allows for regression tasks.

get_dataset(lags: int = 8)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the Windmill Output data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The Windmill Output dataset.

class METRLADatasetLoader(raw_data_dir='/home/docs/checkouts/readthedocs.org/user_builds/pytorch-geometric-temporal/checkouts/stable/docs/source/data')[source]

A traffic forecasting dataset based on Los Angeles Metropolitan traffic conditions. The dataset contains traffic readings collected from 207 loop detectors on highways in Los Angeles County in aggregated 5 minute intervals for 4 months between March 2012 to June 2012.

For further details on the version of the sensor network and discretization see: “Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting”

get_dataset(num_timesteps_in: int = 12, num_timesteps_out: int = 12)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returns data iterator for METR-LA dataset as an instance of the static graph temporal signal class.

Return types:
  • dataset (StaticGraphTemporalSignal) - The METR-LA traffic

    forecasting dataset.

class PemsBayDatasetLoader(raw_data_dir='/home/docs/checkouts/readthedocs.org/user_builds/pytorch-geometric-temporal/checkouts/stable/docs/source/data')[source]

A traffic forecasting dataset as described in Diffusion Convolution Layer Paper.

This traffic dataset is collected by California Transportation Agencies (CalTrans) Performance Measurement System (PeMS). It is represented by a network of 325 traffic sensors in the Bay Area with 6 months of traffic readings ranging from Jan 1st 2017 to May 31th 2017 in 5 minute intervals.

For details see: “Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting”

get_dataset(num_timesteps_in: int = 12, num_timesteps_out: int = 12)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returns data iterator for PEMS-BAY dataset as an instance of the static graph temporal signal class.

Return types:
  • dataset (StaticGraphTemporalSignal) - The PEMS-BAY traffic

    forecasting dataset.

class EnglandCovidDatasetLoader[source]

A dataset of mobility and history of reported cases of COVID-19 in England NUTS3 regions, from 3 March to 12 of May. The dataset is segmented in days and the graph is directed and weighted. The graph indicates how many people moved from one region to the other each day, based on Facebook Data For Good disease prevention maps. The node features correspond to the number of COVID-19 cases in the region in the past window days. The task is to predict the number of cases in each node after 1 day. For details see this paper: “Transfer Graph Neural Networks for Pandemic Forecasting.”

get_dataset(lags: int = 8)torch_geometric_temporal.signal.dynamic_graph_temporal_signal.DynamicGraphTemporalSignal[source]

Returning the England COVID19 data iterator.

Args types:
  • lags (int) - The number of time lags.

Return types:
  • dataset (StaticGraphTemporalSignal) - The England Covid dataset.

class MontevideoBusDatasetLoader[source]

A dataset of inflow passenger at bus stop level from Montevideo city. This dataset comprises hourly inflow passenger data at bus stop level for 11 bus lines during October 2020 from Montevideo city (Uruguay). The bus lines selected are the ones that carry people to the center of the city and they load more than 25% of the total daily inflow traffic. Vertices are bus stops, edges are links between bus stops when a bus line connects them and the weight represent the road distance. The target is the passenger inflow. This is a curated dataset made from different data sources of the Metropolitan Transportation System (STM) of Montevideo. These datasets are freely available to anyone in the National Catalog of Open Data from the government of Uruguay (https://catalogodatos.gub.uy/).

get_dataset(lags: int = 4, target_var: str = 'y', feature_vars: List[str] = ['y'])torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the MontevideoBus passenger inflow data iterator.

Parameters
  • lags (int, optional) – The number of time lags, by default 4.

  • target_var (str, optional) – Target variable name, by default “y”.

  • feature_vars (List[str], optional) – List of feature variables, by default [“y”].

Returns

The MontevideoBus dataset.

Return type

StaticGraphTemporalSignal

class TwitterTennisDatasetLoader(event_id='rg17', N=None, feature_mode='encoded', target_offset=1)[source]

Twitter mention graphs related to major tennis tournaments from 2017. Nodes are Twitter accounts and edges are mentions between them. Each snapshot contains the graph induced by the most popular nodes of the original dataset. Node labels encode the number of mentions received in the original dataset for the next snapshot. Read more on the original Twitter data in the ‘Temporal Walk Based Centrality Metric for Graph Streams’ paper.

Parameters
  • event_id (str) – Choose to load the mention network for Roland-Garros 2017 (“rg17”) or USOpen 2017 (“uo17”)

  • N (int <= 1000) – Number of most popular nodes to load. By default N=1000. Each snapshot contains the graph induced by these nodes.

  • feature_mode (str) – None : load raw degree and transitivity node features “encoded” : load onehot encoded degree and transitivity node features “diagonal” : set identity matrix as node features

  • target_offset (int) – Set the snapshot offset for the node labels to be predicted. By default node labels for the next snapshot are predicted (target_offset=1).

get_dataset()torch_geometric_temporal.signal.dynamic_graph_temporal_signal.DynamicGraphTemporalSignal[source]

Returning the TennisDataset data iterator.

Return types:
  • dataset (DynamicGraphTemporalSignal) - Selected Twitter tennis dataset (Roland-Garros 2017 or USOpen 2017).

class MTMDatasetLoader[source]

A dataset of Methods-Time Measurement-1 (MTM-1) motions, signalled as consecutive video frames of 21 3D hand keypoints, acquired via MediaPipe Hands from RGB-Video material. Vertices are the finger joints of the human hand and edges are the bones connecting them. The targets are manually labeled for each frame, according to one of the five MTM-1 motions (classes \(C\)): Grasp, Release, Move, Reach, Position plus a negative class for frames without graph signals (no hand present). This is a classification task where \(T\) consecutive frames need to be assigned to the corresponding class \(C\). The data x is returned in shape (3, 21, T), the target is returned one-hot-encoded in shape (T, 6).

get_dataset(frames: int = 16)torch_geometric_temporal.signal.static_graph_temporal_signal.StaticGraphTemporalSignal[source]

Returning the MTM-1 motion data iterator.

Args types:
  • frames (int) - The number of consecutive frames T, default 16.

Return types:
  • dataset (StaticGraphTemporalSignal) - The MTM-1 dataset.