Skip to main content

A package for time series analysis — from EDA to forecasting and performance assessment.

Project description

zeitpy

ZeitPy is a package for time series analysis. Its main purpose is to abstract some vital operations to analyse time series data. At its core is the Zeit class, which provides attributes and methods for initializing a (Pandas) time series, performing Exploratory Data Analysis (Augmented Dickey-Fuller test, visualize periodograms, seasonal, and lag plots, etc.), forecasting and performance assessment


Class Overview ℹ️

Zeit

Class Initialization

In [1]: import zeitpy as zp
...: zo = zp.Zeit('sales_luanda.csv', date_format = '%Y-%m-%d', date_col = 'date', data_col = 'sales')
  • dataset: the DataFrame, Series or csv file path containing the time series data.
  • date_format: the format of the "date_col" instances to be converted into datetime.
  • date_col: the column containing the time observations.
  • data_col: the column containing the values (in case of csv files or DataFrames).

Attributes and Methods

  • data

    • this attribute retrieves the time series data wrapped by the Zeit object.
  • seasonal_decomposition(model: str = 'additive', period: int = 12, **plot_args) -> None

    • A method for plotting the seasonal decomposition of the time series using moving averages.
    • Parameters:
      • model: the type of seasonal decomposition
      • period: period of the series (12 for monthly data, 1 for annual, etc.)

Usage ⚙️📦

How to get the package?

Installation via PyPI

pip install zeitpy

Installation of source distribution (.tar.gz)

pip install path/to/zeitpy-0.1.1.tar.gz

Installation of pre-built distribution (.whl)

pip install path/to/zeitpy-0.1.1-py3-none-any.whl

Cloning the package repository

git clone https://github.com/domingosdeeulariadumba/ZeitPy.git

Importing the package

In [1]: import zeitpy as zp

Example: Injecting a dataset and accessing the first five records of the time series

In [2]: zo = zp.Zeit('sales_luanda.csv', date_format = '%Y-%m-%d', date_col = 'date', data_col = 'sales')
...: zo.data.head()
Out[2]: 
2024-09-07     86662
2024-09-08    449329
2024-09-09     64041
2024-09-10    420328
2024-09-11    351528
Freq: D, Name: sales, dtype: int32

📑 You can view all operations provided by the Zeit class implemented in examples.ipynb.


License ⚖️

This project is licensed under the MIT LICENSE.


Issues and Contributions 🧱

Feel free to submit any issue you may find in this package or recommend additional features not listed in TODO.md. If you find this useful, please fork the repository, create a feature branch, and submit a pull request.


Connect with me 🌐

/domingosdeeulariadumba /domingosdeeulariadumba /domingosdeeulariadumba

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeitpy-0.1.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeitpy-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file zeitpy-0.1.1.tar.gz.

File metadata

  • Download URL: zeitpy-0.1.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for zeitpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0f07300e127d6dfec169175356e2a11fb1947c39e226653a5420a22b9b74ccb8
MD5 cd60bc4f35f47a32346c5a2b6cb25430
BLAKE2b-256 33754c58feddfb741365c6052b6a7858c1ccf6e253b2fac3d076f4871be81a69

See more details on using hashes here.

File details

Details for the file zeitpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zeitpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for zeitpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a296827f25371f707654c1573c3c85e11a8a4d7580cf727e37765803f15db6c
MD5 a05e5a23a82a99503c2a6b52fe0bfb89
BLAKE2b-256 3032be279c74a4c2260fae7617427bc1b5528bc0901fe8ca6da24b5a071043d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page