Name | pynimate JSON |
Version |
1.2.0
JSON |
| download |
home_page | |
Summary | Python package for statistical data animations |
upload_time | 2023-04-15 21:11:04 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | MIT License (MIT) |
keywords |
animations
framework
data
plots
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![](https://github.com/julkaar9/pynimate/blob/gh-pages/assets/pynimate_logo2.png)
# Pynimate
[![PyPI](https://img.shields.io/pypi/v/pynimate?color=orange)](https://pypi.org/project/pynimate/)
[![Downloads](https://static.pepy.tech/personalized-badge/pynimate?period=total&units=international_system&left_color=grey&right_color=red&left_text=Downloads)](https://pepy.tech/project/pynimate)
![Tests](https://github.com/julkaar9/pynimate/actions/workflows/tests.yml/badge.svg)
[![License](https://img.shields.io/pypi/l/pynimate?color=green)](https://github.com/julkaar9/pynimate/blob/main/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Python package for statistical data animations.
![](https://github.com/julkaar9/pynimate/blob/main/docs/assets/example3.gif)
## Installation
### with pip
Pynimate is avaialbe at [pypi](https://pypi.org/project/pynimate/)
``` sh
pip install pynimate
```
## How to use
Pynimate expects pandas dataframe formatted in this manner:
Where the time column is set to index.
```python
time, col1, col2, col3
2012 1 2 1
2013 1 1 2
2014 2 1.5 3
2015 2.5 2 3.5
```
## Bar Chart Example
```python
import pandas as pd
from matplotlib import pyplot as plt
import pynimate as nim
df = pd.DataFrame(
{
"time": ["1960-01-01", "1961-01-01", "1962-01-01"],
"Afghanistan": [1, 2, 3],
"Angola": [2, 3, 4],
"Albania": [1, 2, 5],
"USA": [5, 3, 4],
"Argentina": [1, 4, 5],
}
).set_index("time")
cnv = nim.Canvas()
bar = nim.Barhplot.from_df(df, "%Y-%m-%d", "2d")
bar.set_time(callback=lambda i, datafier: datafier.data.index[i].year)
cnv.add_plot(bar)
cnv.animate()
plt.show()
```
## Documentation
The official documentation : https://julkaar9.github.io/pynimate/
## License
[MIT License (MIT)](LICENSE)
Raw data
{
"_id": null,
"home_page": "",
"name": "pynimate",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "animations,framework,data,plots",
"author": "",
"author_email": "julkar9 <julkar9dev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f0/40/652a4e8a94fa9ae41e860835e184d3def520a2a4e083d37f6c703e2199a2/pynimate-1.2.0.tar.gz",
"platform": null,
"description": "![](https://github.com/julkaar9/pynimate/blob/gh-pages/assets/pynimate_logo2.png)\n\n# Pynimate\n\n[![PyPI](https://img.shields.io/pypi/v/pynimate?color=orange)](https://pypi.org/project/pynimate/)\n[![Downloads](https://static.pepy.tech/personalized-badge/pynimate?period=total&units=international_system&left_color=grey&right_color=red&left_text=Downloads)](https://pepy.tech/project/pynimate) \n![Tests](https://github.com/julkaar9/pynimate/actions/workflows/tests.yml/badge.svg)\n[![License](https://img.shields.io/pypi/l/pynimate?color=green)](https://github.com/julkaar9/pynimate/blob/main/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) \n\nPython package for statistical data animations.\n![](https://github.com/julkaar9/pynimate/blob/main/docs/assets/example3.gif)\n\n## Installation\n### with pip\nPynimate is avaialbe at [pypi](https://pypi.org/project/pynimate/)\n``` sh\npip install pynimate\n```\n\n## How to use\nPynimate expects pandas dataframe formatted in this manner: \nWhere the time column is set to index.\n```python\ntime, col1, col2, col3\n2012 1 2 1\n2013 1 1 2\n2014 2 1.5 3\n2015 2.5 2 3.5\n```\n## Bar Chart Example\n```python\nimport pandas as pd\nfrom matplotlib import pyplot as plt\n\nimport pynimate as nim\n\ndf = pd.DataFrame(\n {\n \"time\": [\"1960-01-01\", \"1961-01-01\", \"1962-01-01\"],\n \"Afghanistan\": [1, 2, 3],\n \"Angola\": [2, 3, 4],\n \"Albania\": [1, 2, 5],\n \"USA\": [5, 3, 4],\n \"Argentina\": [1, 4, 5],\n }\n).set_index(\"time\")\n\ncnv = nim.Canvas()\nbar = nim.Barhplot.from_df(df, \"%Y-%m-%d\", \"2d\")\nbar.set_time(callback=lambda i, datafier: datafier.data.index[i].year)\ncnv.add_plot(bar)\ncnv.animate()\nplt.show()\n``` \n## Documentation\nThe official documentation : https://julkaar9.github.io/pynimate/\n\n## License\n[MIT License (MIT)](LICENSE)\n",
"bugtrack_url": null,
"license": "MIT License (MIT)",
"summary": "Python package for statistical data animations",
"version": "1.2.0",
"split_keywords": [
"animations",
"framework",
"data",
"plots"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b8052fc3297d43881da3ee71c09711a9dcf89bf01efaadfe32acf96461010b85",
"md5": "510b5b0010977859846f7a4867bcca7b",
"sha256": "03e2b9855a2548eb10ae93a9b62954247ab1707227823507857d55af1d7b1227"
},
"downloads": -1,
"filename": "pynimate-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "510b5b0010977859846f7a4867bcca7b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 20426,
"upload_time": "2023-04-15T21:11:02",
"upload_time_iso_8601": "2023-04-15T21:11:02.614231Z",
"url": "https://files.pythonhosted.org/packages/b8/05/2fc3297d43881da3ee71c09711a9dcf89bf01efaadfe32acf96461010b85/pynimate-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f040652a4e8a94fa9ae41e860835e184d3def520a2a4e083d37f6c703e2199a2",
"md5": "9f867a19c607b5384da2a02e591aaa4a",
"sha256": "233b31c34180475c443608ba11d822ed9a9261c7e78c9fd2e95578a7e014ab1a"
},
"downloads": -1,
"filename": "pynimate-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "9f867a19c607b5384da2a02e591aaa4a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 19586,
"upload_time": "2023-04-15T21:11:04",
"upload_time_iso_8601": "2023-04-15T21:11:04.293260Z",
"url": "https://files.pythonhosted.org/packages/f0/40/652a4e8a94fa9ae41e860835e184d3def520a2a4e083d37f6c703e2199a2/pynimate-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-15 21:11:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pynimate"
}