knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Ibamam

DOI R-ubuntu

This package aims to provide the dataset for environmental fines and notices from the Brazilian Institute for the Environment and Renewable Natural Resources (IBAMA).

You can visit the IBAMA repository in the Brazilian Open Data Portal.

How to install?

This package can be installed via GitHub using the following code in R:

# install.packages("remotes")
remotes::install_github("cccneto/Ibamam")

How to use Ibamam?

The {Ibamam} package has one function available: get_dataset_ibamam(). This function returns a tibble, containing several columns described in the documentation of the function. This function has three arguments: dataset , uf and clean.

Examples on how to use this function:

library(Ibamam)

# get fines applied by IBAMA in Pará
fines_applied_Para <- get_dataset_ibamam(dataset = "distribuidas", uf = "PA")

dplyr::glimpse(fines_applied_Para)

# get fines collected by IBAMA in Pará
fines_collected_Para <- get_dataset_ibamam(dataset = "arrecadadas", uf = "PA")

dplyr::glimpse(fines_collected_Para)

If you want to get the data for the whole country (Brazil), do not write anything in the argument uf.

# get fines applied by IBAMA in Brazil
fines_applied_Brasil <- get_dataset_ibamam(dataset = "distribuidas")

# get fines collected by IBAMA in Brazil
fines_collected_Brasil <- get_dataset_ibamam(dataset = "arrecadadas")

If you want to get the data for more than one state, but not for the whole country, use a vector in the argument uf with the abbreviations of the name of the states.

# get fines applied by IBAMA in Southeast of Brazil
fines_applied_southeast <- get_dataset_ibamam(dataset = "distribuidas", uf = c("SP", "RJ", "ES", "MG"))

# get fines collected by IBAMA in Southeast of Brazil
fines_collected_southeast <- get_dataset_ibamam(dataset = "arrecadadas", uf = c("SP", "RJ", "ES", "MG"))

If you want to access the original data, without the cleaning steps, use the argument clean = FALSE. Example:

# get fines applied by IBAMA in São Paulo, without cleaning the dataset
untidy_fines_applied_SP <- get_dataset_ibamam(dataset = "distribuidas", uf = "SP", clean = FALSE)

dplyr::glimpse(untidy_fines_applied_SP)

Data cleaning

By default, the function get_dataset_ibamam() will use clean = TRUE and perform the following cleaning steps:

If you want to access the original data (without the cleaning steps), use the argument clean = FALSE.

How to cite Ibamam Package

DOI "CRUZ NETO, Claudiano C., MILZ, Beatriz, MACEDO, Samuel (2021). Ibamam: Pacote para tratamento da Base de dados para multas e autuações ambientais aplicadas pelo Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis - Brasil. https://doi.org/10.5281/zenodo.4509344".



cccneto/Ibamam documentation built on Aug. 30, 2021, 8:55 p.m.