Skip to content

A Python project that shows how to establish connection between InfluxDB and InfluxDB client, how to push and fetch dataframe, and how to use this data to perform forecasting using PyTorch.

Notifications You must be signed in to change notification settings

SmritiSatyan/PyTorch_Forecasting_with_InfluxDB

Repository files navigation

PyTorch_Forecasting_with_InfluxDB

Introduction

InfluxDB is a database that specializes in the collection, storage, and processing of time series data. In this Python project, you will see:

  1. How to establish connection between InfluxDB and InfluxDB client,
  2. How to push data to InfluxDB using a dataframe,
  3. How to fetch dataframe from InfluxDB to Python client, and
  4. 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

About

A Python project that shows how to establish connection between InfluxDB and InfluxDB client, how to push and fetch dataframe, and how to use this data to perform forecasting using PyTorch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages