Metadata-Version: 2.1
Name: smear-api-tools
Version: 0.3.0
Summary: Utility functions for using the SmartSMEAR API
Home-page: https://github.com/jlpl/smear-api-tools
Author: Janne Lampilahti
Author-email: janne.lampilahti@helsinki.fi
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pandas>=1.0.0
Requires-Dist: numpy>=1.19.0
Provides-Extra: dev
Requires-Dist: pytest>=3.6; extra == "dev"

# SMEAR API Tools

This project contains functions that help interacting with the SmartSMEAR API.

## Installation

```shell
pip install smear-api-tools
```

## Documentation 
See [here](https://jlpl.github.io/smear-api-tools/)

## Usage

### Example 1
Download DMPS data from Hyytiälä field station for each day in May, 2018

```python
import pandas as pd
from smear_api.tools import getDmpsData

may2018 = pd.date_range(start='2018-05-01',end='2018-05-31')
v = getDmpsData(station='HYY',dates=may2018)
```

### Example 2
List all variables that contain the term "SO2" in the database and write them to a file.

```python
import pandas as pd
from smear_api.tools import listAllData

listAllData("SO2").to_csv("all_so2_data.csv")
```

## Resources

Junninen, H., Lauri, A., Keronen, P., Aalto, P., Hiltunen, V., Hari, P., Kulmala, M. 2009. Smart-SMEAR: on-line data exploration and visualization tool for SMEAR stations. Boreal Environment Research 14, 447–457.

https://smear.avaa.csc.fi/
