Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/openvironment/Rpollution

R functions to work with air pollution data
https://github.com/openvironment/Rpollution

Last synced: 3 months ago
JSON representation

R functions to work with air pollution data

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE
)

library(Rpollution)
```

# Rpollution

The goal of `Rpollution` is to assemble R functions to analyse air pollution data.

## Installation

You can install `Rpollution` from github with:

```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("openvironment/Rpollution")
```

## CETESB scraper

To scrape data from the CETESB qualar system, use the function `scraper_cetesb()`.

```{r example, eval = FALSE}
library(Rpollution)

scraper_cetesb(
parameter = 63,
station = 72,
start = "01/01/2018",
end = "31/01/2018",
login = "login",
password = "password"
)
```

To see a list of parameter and station IDs, use the objects `cetesb_param_ids` and `cetesb_station_ids`.

```{r}
cetesb_param_ids
```

```{r}
cetesb_station_ids
```

If you substitute the values `login` and `password` by your login and password from the Qualar system, this example will return the hourly NO concentrations from the Pinheiros station for January 2018.