/time_series_explorer

Streamlit Web App to Visualize, Validate, and Forecast Time Series dynamically

Primary LanguagePython

Time Series Explorer 📈

What it does

Streamlit app that allows the user to load their own time series CSV file and that gives a quick overview of time series features, perform statistical checks and produce short-term forecasts

Live app

Here's how you could use it: Demo

Powered by:

  • streamlit: hosting this cool web app
  • pandas: data handling in general
  • pytimetk: time series features and anomaly detection
  • prophet: forecasting

Features

  • Bring own dataset or load sample data that I have provided
  • Overview of the series: periodicity, number of obs., start, end, etc.
  • Moving Averages
  • Decomposition: Trend, Seasonality, etc.
  • Test for time series Stationarity
  • Autocorrelation
  • Add holidays to use as external regressors
  • Forecasting with basic-ish model (Prophet)
  • Detect and flag anomalies

Assumptions and requirements

  • VERY IMPORTANT: It only works with daily time series so far, haven't tested with other frequencies (but it shouldn't take much effort to be able to handle monthly or weekly series, at least)
  • If there are any missing values, fill with pandas' fillna(method = "backfill")
  • If you want to bring your own (daily) data, there are a few requirements:
    • Comma-separated CSV file
    • First column has to be the date (and has to be named date), second column is the value, and it doesn't matter the name

Next steps

DISCLAIMER: This was developed as a (not-so) little side-project to practice Python and to showcase some skills in ML, deployment and web apps, so I don't expect to keep this one super updated and add that many features, but if you liked what you've seen and want to give me feedback or suggestions, it would be very much appreciated. Here are some possible future directions I could go:

  • Implement Level drift detection
  • Improve model validation methods
  • Add more robust residuals diagnostics
  • Include an automated framework like pycaret or H2o for training and hypertuning several models at once
  • Test more Time Series features based on pytimetk or tsfresh

Some screenshots:

image

image

image

image