Metadata-Version: 2.1
Name: pycites
Version: 0.1.4
Summary: Package to download and interact with the CITES Trade Database in Python
Home-page: https://github.com/ltirrell/pycites
License: MIT
Author: Lee Tirrell
Author-email: tirrell.le@gmail.com
Requires-Python: >=3.7.1,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: appdirs (>=1.4.4,<2.0.0)
Requires-Dist: click (>=7.0)
Requires-Dist: pandas (>=1.2,<2.0)
Requires-Dist: requests (>=2.24.0,<3.0.0)
Requires-Dist: tqdm (>=4.46.1,<5.0.0)
Project-URL: Repository, https://github.com/ltirrell/pycites
Description-Content-Type: text/markdown

# pycites
`pycites` is a package to download and interact with the [CITES Trade Database](https://trade.cites.org/) using Python. [citesdb](https://github.com/ropensci/citesdb) exists for R users to load and analzyes this data, so we wanted a way to do the same!

Currently very much a work in progress.  Currently only downloads and loads data.

## Installation
`pip install pycites`

## Usage instructions
To download the CITES Trade Database and load into a dataframe, run the following in a Jupyter notebook or Python shell:
```python
import pycites

pycites.get_data()
df = pycites.load_data()
```
This will download and extract the zip file from the CITES website, do some basic data validation (e.g. drop rows with missing or incorrect Years), and combine the data into a single compressed CSV file.  This uses a decent amount of memory, so may cause issues on a machines with low resource.

## Roadmap
- [ ] Release a CSV to make it easier for users to download and load data
- [ ] Experiement with other data formats for better memory usage of data (currently pretty high)
- [ ] Add a CLI for downloading data
- [ ] Include metadata and other useful information, like `citesdb`
- [ ] Add additional functionality for analysis (time series and network analyses), and integrate with other data sources (such as World Bank)
- [ ] Setup CI and testing

