Loads information on animal farming inventories and livestock products (IBGE).
load_ppm(dataset, raw_data = FALSE, geo_level, time_period, language = "eng")A dataset name ("ppm_livestock_inventory", "ppm_sheep_farming", "ppm_animal_origin_production", "ppm_cow_farming" or "ppm_aquaculture". You can also use SIDRA codes (see https://sidra.ibge.gov.br/pesquisa/ppm/tabelas/brasil/2021)
A boolean setting the return of raw (TRUE) or processed (FALSE) data.
A string that defines the geographic level of the data. Can be one of "country", "state" or "municipality".
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.
A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.
A tibble consisting of geographic units that present positive values for any of the variables in the dataset.
if (FALSE) { # interactive()
### DO NOT RUN ###
# download treated aquaculture data at the country level from 2013 to 2015
data <- load_ppm(
dataset = "ppm_aquaculture",
raw_data = FALSE,
geo_level = "country",
time_period = 2013:2015,
language = "eng"
)
# download raw sheep farming data by state from 1980 to 1995 in portuguese
data <- load_ppm(
dataset = "ppm_sheep_farming",
raw_data = TRUE,
geo_level = "state",
time_period = 1980:1995,
language = "pt"
)
}