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.2.tar.gz

Installation of pre-built distribution (.whl)

pip install path/to/zeitpy-0.1.2-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 here.


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 already listed here. 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.2.tar.gz (12.8 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.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zeitpy-0.1.2.tar.gz
  • Upload date:
  • Size: 12.8 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.2.tar.gz
Algorithm Hash digest
SHA256 dd764dc7d80afac1723fd82522d111f7e3158997a169ed852a0514011a36fc73
MD5 1bbf2a981b8f397b6b5fa58b6de67685
BLAKE2b-256 de8f4d707d8697a56b920fe4a03865ca0767cc59813dbae579aa60667351cafd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zeitpy-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 670202a8257a1c8efa36b0ef25062005305b2e2e1257d720a0811d1cae697114
MD5 c5264580623056f5db2defb9ad5b589d
BLAKE2b-256 07c5339f02e4206c96a920103b120eae0042f1825e33026c874cc106de0d81ba

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