Learn how to use TimeGPT for accurate time series forecasting in just a few steps
Create a TimeGPT account and generate your API key
Dashboard displaying TimeGPT API keys and controls.
Install Nixtla
Import the Nixtla TimeGPT client
API Validation Output
AirPassengers
dataset to demonstrate forecasts.timestamp | value | |
---|---|---|
0 | 1949-01-01 | 112 |
1 | 1949-02-01 | 118 |
2 | 1949-03-01 | 132 |
3 | 1949-04-01 | 129 |
4 | 1949-05-01 | 121 |
Historical AirPassengers data from 1949 to 1960.
Data Requirements
Saving Figures from TimeGPT
plot
method automatically displays figures in notebook environments. To save a plot locally:Generate a longer-term forecast
forecast
method:12-month forecast for AirPassengers data.
timegpt-1-long-horizon
model. For example, 36 months ahead:36-month forecast using the 'timegpt-1-long-horizon' model.
Generate a shorter-term forecast
6-month forecast for AirPassengers data.