--- title: Tourism dataset keywords: fastai sidebar: home_sidebar summary: "Download the Tourism dataset." description: "Download the Tourism dataset." nb_path: "nbs/data_datasets__tourism.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %}

Tourism meta information

{% raw %}

class Yearly[source]

Yearly(seasonality:int=1, horizon:int=4, freq:str='Y', rows:int=2, name:str='Yearly', n_ts:int=518)

Yearly(seasonality: int = 1, horizon: int = 4, freq: str = 'Y', rows: int = 2, name: str = 'Yearly', n_ts: int = 518)

{% endraw %} {% raw %}

class Quarterly[source]

Quarterly(seasonality:int=4, horizon:int=8, freq:str='Q', rows:int=3, name:str='Quarterly', n_ts:int=427)

Quarterly(seasonality: int = 4, horizon: int = 8, freq: str = 'Q', rows: int = 3, name: str = 'Quarterly', n_ts: int = 427)

{% endraw %} {% raw %}

class Monthly[source]

Monthly(seasonality:int=12, horizon:int=24, freq:str='M', rows:int=3, name:str='Monthly', n_ts:int=366)

Monthly(seasonality: int = 12, horizon: int = 24, freq: str = 'M', rows: int = 3, name: str = 'Monthly', n_ts: int = 366)

{% endraw %} {% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

class Tourism[source]

Tourism(S:DataFrame, X:DataFrame, Y:DataFrame, idx_categorical_static:Optional[List[T]]=None, group:Union[str, List[str]]=None) :: TimeSeriesDataclass

Args: S (pd.DataFrame): DataFrame of static features of shape (n_time_series, n_features). X (pd.DataFrame): DataFrame of exogenous variables of shape (sum n_periods_i for i=1..n_time_series, n_exogenous). Y (pd.DataFrame): DataFrame of target variable of shape (sum n_periods_i for i=1..n_time_series, 1). idx_categorical_static (list, optional): List of categorical indexes of S. group (str, optional): Group name if applies. Example: 'Yearly'

{% endraw %} {% raw %}
{% endraw %} {% raw %}
for group, meta in TourismInfo:
    data, *_ = Tourism.load(directory='data', group=group)
    unique_elements = data.groupby(['unique_id', 'ds']).size()
    unique_ts = data.groupby('unique_id').size()

    assert (unique_elements != 1).sum() == 0, f'Duplicated records found: {group}'
    assert unique_ts.shape[0] == meta.n_ts, f'Number of time series not match: {group}'
100%|██████████| 356k/356k [00:00<00:00, 1.74MiB/s]
INFO:nixtla.data.datasets.utils:Successfully downloaded 27-3-Athanasopoulos1.zip, 356334, bytes.
INFO:nixtla.data.datasets.utils:Successfully decompressed data/tourism/datasets/27-3-Athanasopoulos1.zip
{% endraw %}