Metadata-Version: 2.4
Name: zeitpy
Version: 0.1.1
Summary: A package for time series analysis — from EDA to forecasting and performance assessment.
Author-email: Domingos de Eulária Dumba <domingosdeeulariadumba@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Domingos de Eulária Dumba
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
Project-URL: Homepage, https://github.com/domingosdeeulariadumba.com/ZeitPy
Requires-Python: >=3.12.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26.4
Requires-Dist: pandas>=2.2.2
Requires-Dist: scipy>=1.13.1
Requires-Dist: scikit-learn>=1.5.1
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: seaborn>=0.13.2
Requires-Dist: statsmodels>=0.14.2
Dynamic: license-file

# 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**
```python
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

```python
In [1]: import zeitpy as zp
```

### Example: Injecting a dataset and accessing the first five records of the time series
```python
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](https://github.com/domingosdeeulariadumba/ZeitPy/issues) 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 🌐

<img src = 'https://i.postimg.cc/t4vNmLB0/linktree-icon.png' width = '25' height = '25'/>  **[/domingosdeeulariadumba](https://linktr.ee/domingosdeeulariadumba)**
<img src = 'https://i.postimg.cc/wj3w1mjG/kofi-icon.png' width = '25' height = '25'/>  **[/domingosdeeulariadumba](https://ko-fi.com/domingosdeeulariadumba)**
<img src = 'https://i.postimg.cc/W1178266/linkedin-icon.png' width = '25' height = '25'/>  **[/domingosdeeulariadumba](https://linkedin.com/in/domingosdeeulariadumba/)**
