InfluxDB is a database that specializes in the collection, storage, and processing of time series data. In this Python project, you will see:
- How to establish connection between InfluxDB and InfluxDB client,
- How to push data to InfluxDB using a dataframe,
- How to fetch dataframe from InfluxDB to Python client, and
- How to use this data to perform forecasting using PyTorch.
First, we install influxdb
and influxdb-client
that will help establish connection between InfluxDB Cloud and Python client. We use PyTorch forecasting to make predctions on this data. For this, we install torch
and pytorch-forecasting
. We use the Stallion time series data present in PyTorch. We predict the beverage sales (in dollars) for 6 months based on 21,000 rows of historical data.
Stallion data contains the below datasets:
- pricesalespromotion.csv: Holds the price, sales & promotion in dollars.
- historicalvolume.csv: contains sales data.
- weather.csv: the average maximum temperature at Agency monthly
- Industrysodasales.csv: Holds industry level soda sales
- eventcalendar.csv: Holds event details (sports, carnivals, etc.)
- industry_volume.csv: industry actual beer volume
- demographics.csv: demographic details