data-raw/pollutants_id.R

## code to prepare `pollutants_id` dataset goes here

library(tidyverse)
library(readr)

temp <- tempfile()
download.file("http://dd.eionet.europa.eu/vocabulary/aq/pollutant/csv", temp)

pollutants_id <- read_csv(temp) %>%
  mutate(id = as.numeric(str_remove(URI, "http://dd.eionet.europa.eu/vocabulary/aq/pollutant/"))) %>%
  select(id, Notation, Label) %>%
  rename_all(~ tolower(.)) %>%
  rename(code = notation) %>%
  arrange(id)

usethis::use_data(pollutants_id)
vincentbagilet/europollution documentation built on May 22, 2020, 12:07 a.m.