load_ppm: PPM - Municipal Livestock Production

View source: R/ppm.R

load_ppmR Documentation

PPM - Municipal Livestock Production

Description

Loads information on animal farming inventories and livestock products (IBGE).

Usage

load_ppm(dataset, raw_data = FALSE, geo_level, time_period, language = "eng")

Arguments

dataset

A dataset name ("ppm_livestock_inventory", "ppm_sheep_farming", "ppm_animal_orig_production", "ppm_cow_farming" or "ppm_aquaculture". You can also use SIDRA codes (see https://sidra.ibge.gov.br/pesquisa/ppm/tabelas/brasil/2021)

raw_data

A boolean setting the return of raw (TRUE) or processed (FALSE) data.

geo_level

A string that defines the geographic level of the data. Can be one of "country", "state" or "municipality".

time_period

A numeric indicating for which years the data will be loaded, in the format YYYY. Can be any vector of numbers, such as 2010:2012.

language

A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.

Value

A tibble consisting of geographic units that present positive values for any of the variables in the dataset.

Examples

## Not run: 
# Download treated data (raw_data = FALSE) about aquaculture (dataset = "ppm_aquaculture")
# from 2013 to 2015 (time_period = 2013:2015) in english
# with the level of aggregation being the country (geo_level = "country").
data <- load_ppm(
  dataset = "ppm_aquaculture",
  raw_data = FALSE,
  geo_level = "country",
  time_period = 2013:2015
)

# Download raw data about sheep farming by state from 1980 to 1995 in portuguese (language = "pt")
data <- load_ppm(
  dataset = "ppm_sheep_farming",
  raw_data = TRUE,
  geo_level = "state",
  time_period = 1980:1995,
  language = "pt"
)

## End(Not run)

datazoompuc/datazoom.amazonia documentation built on April 20, 2024, 8:50 a.m.