Power your predictions with precision using Nixtla's TimeGPT Google Sheets Add-On. The one-stop 🎯 solution for time series forecasting in Google Sheets.
- Integrated with Google Sheets: Seamlessly integrate TimeGPT functions directly into your Google Sheets workspace.
- Precise Forecasting: Powered by TimeGPT, one of the state-of-the-art models for time series forecasting.
- User-Friendly Interface: Intuitive UI components within Google Sheets for easy access to forecasting and anomaly detection functionalities.
- Real-Time Predictions: Get instant forecasting results as you input your data.
- Data Visualization: Integrated charting capabilities to visualize your forecasts and detected anomalies.
- Customizable Parameters: Adjust forecasting parameters to suit your data's specific needs.
- Google Apps Script: Google's scripting language to extend Google Sheets functionalities.
- Google Sheets API: Provides the ability to read from and write to Google Sheets.
- Nixtla: The core forecasting model powering the add-on's predictions.
Before diving into the TimeGPT Google Sheets Add-On, there are a few preliminary steps and requirements:
- Google Account: Ensure you have an active Google account as this add-on is integrated with Google Sheets.
- Nixtla API Key: Obtain a Token/API key from Nixtla. This is crucial for accessing and utilizing the forecasting capabilities of the add-on. Usually, this involves signing up on the Nixtla platform and generating an API key.
- Data Preparedness: Ensure that your time series data is organized in two columns: timestamps and values. This is necessary for the add-on to read and process the data accurately.
- Permissions: When using the add-on for the first time, you'll be prompted to grant certain permissions. This is standard procedure to allow the add-on to interact with your Google Sheets data. Rest assured, your data's privacy and security are of utmost importance. No data is stored or shared; it's only used to generate forecasts.
- Familiarity with Time Series: Although the add-on is designed to be user-friendly, a basic understanding of time series data and forecasting can enhance your experience. Familiarize yourself with terms like "forecast horizon," "frequency," and "prediction intervals" to make the most of the tool.
Once you've ticked off these preliminary steps, you're all set to leverage the power of TimeGPT right within your Google Sheets!
Visit the Google Workspace Marketplace and install the TimeGPT Google Sheets Add-On.
To integrate the TimeGPT Google Sheets Add-On into your Google Spreadsheets locally, you'll require node and clasp.
- Install
node
and thenclasp
globally:npm install -g @google/clasp
. - Clone the repository:
git clone https://github.com/leonelhrp/timegpt-forecaster-next.git
. - Authenticate with Google:
clasp login
. - To set the project ID for the Google Spreadsheet you want to work with:
- With your
Google Spreadsheet
open, navigate toTools -> Script editor
. - In the
Google Script
interface, go toFile -> Project properties
. - Note down the value under the
Script ID
label. - Ensure the
Show "appsscript.json" manifest file in editor
checkbox is selected.
- With your
- In your terminal, navigate to the project directory and link the script with the command:
clasp clone YOUR_SCRIPT_ID
, replacingYOUR_SCRIPT_ID
with the ID from the previous step. - Push the local code to your Google Spreadsheet using
clasp push
. - Refresh your Google Spreadsheet (press
F5
).- You should notice a notification at the bottom-right corner after reloading.
- Navigate to the
TimeGPT
menu on your spreadsheet's toolbar and select theAuthorize add-on!
option. - A Google dialog will request permissions. Go through the steps and click
Allow
. - After authorizing, select
Authorize add-on!
again from theTimeGPT
menu, and you're ready to go!
Use this function to create a future prediction based on your data. The syntax is:
=TIMEGPT_FUTURE(range; fh; clean_ex_first; finetune_steps; freq; level)
Where:
range
is a range of cells containing timestamp and value data (two columns).fh
is a number representing the forecast steps.clean_ex_first
(optional) is a boolean indicating whether to clean exogenous variables before training. Default is true.finetune_steps
(optional) is a number of finetuning steps. Default is 0.freq
is the frequency of data (e.g., 'D' for daily).level
(optional) is a list of values representing the prediction intervals. E.g., [80, 90].
Use this function to predict time series data for the in-sample period (historical period). The syntax is:
=TIMEGPT_ANOMALY(range; freq; level)
Where:
range
is a range of cells containing timestamp and value data (two columns).freq
is the frequency of data (e.g., 'D' for daily).level
(optional) is a list of values representing the prediction intervals. E.g., [80, 90].
To use "Forecast Form", navigate to the "Run Forecast" submenu and click on "Future Prediction". A sidebar will appear.
Fill in the necessary details:
- "Range" - input the range of cells containing timestamp and value data.
- "Forecast steps" - input the number of forecast steps you want.
- "Frequency" - input the frequency of your data.
- "Prediction Intervals" - input the levels for your prediction intervals (e.g., 80, 90).
Click "Submit" to run the forecast.
To use "Anomaly Detection Form", navigate to the "Run Forecast" submenu and click on "Anomaly Detection". A sidebar will appear.
Fill in the necessary details:
- "Range" - input the range of cells containing timestamp and value data.
- "Frequency" - input the frequency of your data.
- "Prediction Intervals" - input the levels for your prediction intervals (e.g., 80, 90).
Click "Submit" to run the anomaly detection.
We welcome contributions from the community. Whether it's a bug fix, new feature, or a simple correction, your help is appreciated!
- Fork the repository on GitHub.
- Clone your fork.
- Create a new branch for your changes.
- Commit your changes in the branch.
- Push the branch to your fork on GitHub.
- Open a Pull Request from your fork to the main repository.
This project is open source and available under the MIT License.
Made with ❤️ by Leonel 🇻🇪 and Nixtla 🇲🇽