https://github.com/eshrh/py-neonutilities
Python wrapper for the National Ecological Observatory Network(NEON) api
https://github.com/eshrh/py-neonutilities
Last synced: about 1 year ago
JSON representation
Python wrapper for the National Ecological Observatory Network(NEON) api
- Host: GitHub
- URL: https://github.com/eshrh/py-neonutilities
- Owner: eshrh
- License: gpl-3.0
- Created: 2021-04-01T02:49:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-01T02:50:23.000Z (over 5 years ago)
- Last Synced: 2025-03-02T10:14:10.114Z (over 1 year ago)
- Language: Python
- Size: 124 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Py-NEONutilities
This project is a heavy work in progress to write a native python wrapper for the [NEON data platform](https://data.neonscience.org).
It aims to provide the functionality of the [NEONutilities R package](https://github.com/NEONScience/NEON-utilities/tree/master/neonUtilities)
without the overhead of having to manage `rpy`.
## Installation
You can install this package from pypi with `pip install py-neonUtils`
Please see the pypi branch for downloads.
## Usage:
### Observational Data
```python
from neonUtilities.NeonObservational import NeonObservational
import pandas as pd
neonobj = NeonObservational(dpID="DP1.10003.001", site=["WOOD"], dates=["2015-07",["2017-07","2017-12"]], package="basic")
#Download data from 2015-07 and the range of 2017-07 to 2017-12.
neonobj.download()
neonobj.stackByTable()
df = neonobj.to_pandas()
```
### Instrumental Data
```python
from neonUtilities.NeonObservational import NeonObservational
import pandas as pd
neonobj = NeonInstrumental(dpID="DP1.10003.001", site=["WOOD"], dates=["2015-07",["2017-07","2017-12"]], avg=30, package="basic")
neonobj.download()
neonobj.stackByTable()
df = neonobj.to_pandas()
```
This module offers a lot of flexibility with month-chunk downloads. You can provide:
1. A single string to download that chunk for all sites
2. A list of strings to download those chunks for all sites
3. Either a nested list or a nested tuple of dates to download that range inclusive,inclusive
4. Any combination of 2 and 3
5. A dictionary with sites as keys and number any date definition above to download different month chunks for different sites.
## Progress
- [X] Observational data
- [X] Download data zips
- [X] Table stacking
- [ ] Support for READMEs, EML and variables files
- [X] Instrumental data
- [X] Download specific average intervals
- [ ] AOP data
- [ ] EC data
- [ ] Taxon data manip
- [X] API token
- [X] package for pypi (check the pypi branch)