Name | timeseriesviz JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | A package for visualizing time series model performance with a focus on spatio-temporal datasets. |
upload_time | 2025-08-25 22:47:50 |
maintainer | None |
docs_url | None |
author | Junyang He |
requires_python | >=3.9 |
license | None |
keywords |
time series
plotting
forecasting
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# timeseriesviz
**timeseriesviz** is a lightweight Python package for **visualizing time series model performance**, with a focus on **spatio-temporal datasets** (e.g., multiple locations, stations, or sensors). It helps researchers and practitioners quickly assess the accuracy of time series forecasts and compare real vs. predicted values across multiple locations.
---
## ✨ Features
- Plot **aggregated performance** across all locations.
- Generate **detailed subplots** with zoomed-in sections for better error analysis.
- Plot **error** calculated by (error = actual - forecasted)
- Support for:
- **Numpy arrays** (`plot_numpy`)
- **Pandas DataFrames** from [Nixtla’s NeuralForecast](https://github.com/Nixtla/neuralforecast) (`plot_neuralforecast`)
- Customizable (`splitsize`) parameter to specify number of detailed plots to generate.
- Option to **save plots to disk**.
---
## 📦 Installation
```bash
pip install timeseriesviz
```
---
## 🚀 Usage
### Example 1: With Numpy arrays
```python
import numpy as np
from timeseriesviz import plot_numpy
# Simulated data: 100 time steps, 5 locations
y = np.random.rand(100, 5)
pred = y + np.random.normal(0, 0.1, size=y.shape)
fig, axs = plot_numpy(y, pred, title="Forecast vs Actual", splitsize=6)
```
---
### Example 2: With NeuralForecast DataFrame
```python
import pandas as pd
from timeseriesviz import plot_neuralforecast
# Example NeuralForecast output DataFrame
df = pd.DataFrame({
"unique_id": ["loc1"]*100 + ["loc2"]*100,
"ds": list(range(100))*2,
"y": np.random.rand(200),
"my_model": np.random.rand(200)
})
fig, axs = plot_neuralforecast(df, model_name="my_model", title="NeuralForecast Results", splitsize=6)
```
---
## 📊 Output Example
The generated plots contain:
- **Main Plot**: Entire aggregated time series (real, predicted, and error).
- **Detailed Plots**: Split into smaller chunks for clearer inspection.
---
## ⚠️ Requirements
- `pandas`
- `numpy`
- `matplotlib`
---
## 📄 License
MIT License © 2025
Raw data
{
"_id": null,
"home_page": null,
"name": "timeseriesviz",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "time series, plotting, forecasting",
"author": "Junyang He",
"author_email": "Junyang He <erichjy0909@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ff/cb/0802382094e0238eaf6c37b303275e594d0cd899023515183dcce98960b1/timeseriesviz-0.0.1.tar.gz",
"platform": null,
"description": "# timeseriesviz\n\n**timeseriesviz** is a lightweight Python package for **visualizing time series model performance**, with a focus on **spatio-temporal datasets** (e.g., multiple locations, stations, or sensors). It helps researchers and practitioners quickly assess the accuracy of time series forecasts and compare real vs. predicted values across multiple locations.\n\n---\n\n## \u2728 Features\n\n- Plot **aggregated performance** across all locations. \n- Generate **detailed subplots** with zoomed-in sections for better error analysis. \n- Plot **error** calculated by (error = actual - forecasted) \n- Support for:\n - **Numpy arrays** (`plot_numpy`)\n - **Pandas DataFrames** from [Nixtla\u2019s NeuralForecast](https://github.com/Nixtla/neuralforecast) (`plot_neuralforecast`) \n- Customizable (`splitsize`) parameter to specify number of detailed plots to generate.\n- Option to **save plots to disk**. \n\n---\n\n## \ud83d\udce6 Installation\n\n```bash\npip install timeseriesviz\n```\n\n---\n\n## \ud83d\ude80 Usage\n\n### Example 1: With Numpy arrays\n```python\nimport numpy as np\nfrom timeseriesviz import plot_numpy\n\n# Simulated data: 100 time steps, 5 locations\ny = np.random.rand(100, 5)\npred = y + np.random.normal(0, 0.1, size=y.shape)\n\nfig, axs = plot_numpy(y, pred, title=\"Forecast vs Actual\", splitsize=6)\n```\n\n---\n\n### Example 2: With NeuralForecast DataFrame\n```python\nimport pandas as pd\nfrom timeseriesviz import plot_neuralforecast\n\n# Example NeuralForecast output DataFrame\ndf = pd.DataFrame({\n \"unique_id\": [\"loc1\"]*100 + [\"loc2\"]*100,\n \"ds\": list(range(100))*2,\n \"y\": np.random.rand(200),\n \"my_model\": np.random.rand(200)\n})\n\nfig, axs = plot_neuralforecast(df, model_name=\"my_model\", title=\"NeuralForecast Results\", splitsize=6)\n```\n\n---\n\n## \ud83d\udcca Output Example\n\nThe generated plots contain:\n- **Main Plot**: Entire aggregated time series (real, predicted, and error). \n- **Detailed Plots**: Split into smaller chunks for clearer inspection. \n\n---\n\n## \u26a0\ufe0f Requirements\n\n- `pandas`\n- `numpy`\n- `matplotlib`\n\n---\n\n## \ud83d\udcc4 License\n\nMIT License \u00a9 2025\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for visualizing time series model performance with a focus on spatio-temporal datasets.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/JunyangHe/timeseriesviz"
},
"split_keywords": [
"time series",
" plotting",
" forecasting"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "84494f865b8c2204e6082ae53bf87f74c51659a543c4669fef706692351b5958",
"md5": "2acf7c6caa45af05d3e6f2ea006e5032",
"sha256": "d96466b1e396677cb331a7b7b17bf2eb3aa3827a85f62f443f4638dcbe118758"
},
"downloads": -1,
"filename": "timeseriesviz-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2acf7c6caa45af05d3e6f2ea006e5032",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4782,
"upload_time": "2025-08-25T22:47:49",
"upload_time_iso_8601": "2025-08-25T22:47:49.251596Z",
"url": "https://files.pythonhosted.org/packages/84/49/4f865b8c2204e6082ae53bf87f74c51659a543c4669fef706692351b5958/timeseriesviz-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ffcb0802382094e0238eaf6c37b303275e594d0cd899023515183dcce98960b1",
"md5": "d7af874de55ea61e3952565bd60ed852",
"sha256": "27a09003d57fc064c9168953d52671ca7320af2b92851adc759857a764a4f96d"
},
"downloads": -1,
"filename": "timeseriesviz-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "d7af874de55ea61e3952565bd60ed852",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4732,
"upload_time": "2025-08-25T22:47:50",
"upload_time_iso_8601": "2025-08-25T22:47:50.015586Z",
"url": "https://files.pythonhosted.org/packages/ff/cb/0802382094e0238eaf6c37b303275e594d0cd899023515183dcce98960b1/timeseriesviz-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 22:47:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JunyangHe",
"github_project": "timeseriesviz",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "timeseriesviz"
}