1
0
Fork 0
mirror of https://github.com/sensebox/opensensmapr synced 2025-07-10 23:30:21 +02:00
R client for opensensemap.org
Find a file
2018-05-26 12:52:30 +02:00
.aspell hello CRAN :^| 2018-05-14 00:56:10 +02:00
inst/doc add/update vignette builds 2018-05-26 12:52:30 +02:00
man update docs + vignette builds 2018-05-25 17:17:47 +02:00
R make R CMD check happy 2018-05-26 12:52:30 +02:00
tests add caching feature 2018-05-25 01:34:47 +02:00
tools/monitr too many es are not healthy 2017-12-01 20:54:16 +01:00
vignettes add/update vignette builds 2018-05-26 12:52:30 +02:00
.gitattributes add .gitattributes 2017-11-29 14:21:04 +01:00
.gitignore make R CMD check happy 2018-05-26 12:52:30 +02:00
.lintr add lintr config, make code lint compliant, fixes #20 2018-05-07 01:32:11 +02:00
.Rbuildignore add lintr config, make code lint compliant, fixes #20 2018-05-07 01:32:11 +02:00
.travis.yml speed up travis build by skipping vignettes 2018-05-07 18:13:41 +02:00
appveyor.yml add appveyor config 2018-01-14 22:13:45 +01:00
CHANGES.md v0.4.0 2018-05-26 12:52:30 +02:00
codecov.yml add codecov configuration 2018-01-14 21:50:10 +01:00
CONDUCT.md add coc 2018-01-14 22:14:32 +01:00
DESCRIPTION v0.4.0 2018-05-26 12:52:30 +02:00
LICENSE Initial commit 2017-08-13 14:16:17 +00:00
NAMESPACE add caching feature 2018-05-25 01:34:47 +02:00
README.md make R CMD check happy 2018-05-26 12:52:30 +02:00

opensensmapr

CRAN status Travis build status AppVeyor Build Status Coverage status

This R package ingests data (environmental measurements, sensor stations) from the API of opensensemap.org for analysis in R. The package aims to be compatible with sf and the tidyverse.

Installation

The package is available on CRAN, install it via

install.packages('opensensmapr')

To install the veryy latest from GitHub, run:

install.packages('devtools')
devtools::install_github('noerw/opensensmapr@master')      # latest stable version
devtools::install_github('noerw/opensensmapr@development') # bleeding edge version

Usage

Each function's documentation can be viewed with ?<function-name>. An overview is given in ?opensensmapr. A verbose usage example is shown in the vignette osem-intro.

In short, the following pseudocode shows the main functions for data retrieval:

# retrieve a single box by id, or many boxes by some property-filters
b = osem_box('boxId')
b = osem_boxes(filter1, filter2, ...)

# get the counts of observed phenomena for a list of boxes
p = osem_phenomena(b)

# get measurements for a phenomenon
m = osem_measurements(phenomenon, filter1, ...)
# get measurements for a phenomenon from selected boxes
m = osem_measurements(b, phenomenon, filter1, ...)
# get measurements for a phenomenon from a geographic bounding box
m = osem_measurements(bbox, phenomenon, filter1, ...)

# get general count statistics of the openSenseMap database
osem_counts()

Additionally there are some helpers: summary.sensebox(), plot.sensebox(), st_as_sf.sensebox(), osem_as_sensebox(), [.sensebox(), filter.sensebox(), mutate.sensebox(), ....

Changelog

This project adheres to semantic versioning, for changes in recent versions please consult CHANGES.md.

Contributing & Development

Contributions are very welcome! When submitting a patch, please follow the existing code style, and run R CMD check --no-vignettes . on the package.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

GPL-2.0 - Norwin Roosen