knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of eadata
is to access Environment Agency data from environment.data.gov.uk website via an R package.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("aquaMetrics/eadata", dependencies = TRUE)
This example shows you how to get freshwater observations using R:
library(eadata) ## basic example to query observations from two sites site_id <- c( "http://environment.data.gov.uk/ecology/site/bio/43378", "http://environment.data.gov.uk/ecology/site/bio/10254" ) obs <- get_observations(site_id, take = 10, type_id = "http://environment.data.gov.uk/ecology/def/bio/RiverInvMetricsObservation" ) obs[, c("date", "result_value")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.