Learn R Programming

datazoom.amazonia

The datazoom.amazonia package facilitates access to official Brazilian Amazon data, including agriculture, deforestation, production. The package provides functions that download and pre-process selected datasets.

Installation

You can install the released version of datazoom.amazonia from CRAN with:

install.packages("datazoom.amazonia")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("datazoompuc/datazoom.amazonia")

1 - Environmental data

PRODESYearly deforestation
DETERAlerts on forest cover changes
DEGRADForest degradation
ImazonDeforestation pressure in the Amazon
IBAMAEnvironmental fines
MapBiomasLand cover and land use
TerraClimateClimate data
SEEGGreenhouse gas emission estimates
CENSOAGROAgriculture activities

2 - Social data

IPSAmazon Social Progress Index
DATASUSCauses of mortality and availability of hospital beds
IEMAAccess to electricity in the Amazon region
PopulationPopulation

3 - Economic data

COMEXBrazilian international trade
BACIGlobal international trade
PIB-MunicMunicipal GDP
CEMPRECentral register of companies
PAMAgricultural production
PEVSForestry and extraction
PPMLivestock farming
SIGMINEMining
ANEELEnergy development
EPEEnergy consumption

4 - Other tools

Legal Amazon MunicipalitiesDataset with brazilian cities and whether they belong to the Legal Amazon
The ‘googledrive’ packageTroubleshooting and information for downloads from Google Drive

Environmental Data

PRODES

The PRODES project uses satellites to monitor deforestation in Brazil’s Legal Amazon. The raw data reports total and incremental (year-by-year) low-cut deforested area at the municipality level, going back to the year 2000.

Data is collected based on the PRODES-year, which starts at August 1st and ends on July 31st. Accordingly, 2018 deforestation data covers the period from 01/08/2017 to 31/07/2018.

INPE’s most recent data is now published at TerraBrasilis. We have refrained from updating to this new source, as it only contains detailed spatial data, rather than agregated, municipality-level data.


Options:

  1. dataset: "deforestation"

  2. raw_data: there are two options:

    • TRUE: if you want the data as it is originally.
    • FALSE: if you want the treated version of the data.
  3. language: you can choose between Portuguese ("pt") and English ("eng")


Examples:

# Download treated data (raw_data = FALSE)
# in portuguese (language = 'pt').
data <- load_prodes(
  raw_data = FALSE,
  language = "pt"
)

DETER

DETER uses satellite surveillance to detect and report changes in forest cover across the Legal Amazon and the Cerrado biome. Each data point consists of a warning, describing which type of change has affected a certain area of forest at a given date. Broadly speaking, it makes a distinction between events of deforestation, degradation and logging. The data extracted here spans from 2016 onward in the Amazon, and from 2018 onward in the Cerrado.

The raw DETER data shows one warning per row, with each row also containing a municipality. However, many warnings actually overlap with 2 or up to 4 municipalities, which are not shown in the original data. Therefore, when the option raw_data = FALSE is selected, the original spatial information is intersected with a municipalities map of Brazil, and each warning can be split into more than one row, with each row corresponding to a municipality.


Options:

  1. dataset: there are two options:
    • "deter_amz" for data from the Amazon
    • "deter_cerrado" for data from the Cerrado
  2. raw_data: there are two options:
    • TRUE: if you want the data as it is originally.
    • FALSE: if you want the treated version of the data.
  3. language: you can choose between Portuguese ("pt") and English ("eng")

Examples:

# Download treated data (raw_data = FALSE) from Amazonia (dataset = "deter_amz")
deter_amz <- load_deter(
  dataset = "deter_amz",
  raw_data = FALSE
)

DEGRAD

The DEGRAD project uses satellites to monitor degradation of forest areas. Raw data is available as simple features (sf) objects, read from shapefiles. The project was substituted in 2016 by DETER-B. Accordingly, data is available from 2007 up to 2016.

Original documentation for this data is very scarce, users beware. Some things to keep in mind are:

Event data is organized through yearly editions (DEGRAD 2007-2016). Inside a given edition however, there may be data from different years (events that happened in 2015 inside DEGRAD 2016 for example).

This package provides degradation data with municipality identification. It does this by intersecting DEGRAD geometries with IBGE’s municipality geometries from the year 2019. CRS metadata however is missing from the original data source. A best effort approach is used and a CRS is assumed (proj4string: "+proj=longlat +ellps=aust_SA +towgs84=-66.8700,4.3700,-38.5200,0.0,0.0,0.0,0.0 +no_defs").


Options:

  1. dataset: "degrad"

  2. raw_data: there are two options:

    • TRUE: if you want the data as it is originally.
    • FALSE: if you want the treated version of the data.
  3. time_period: picks the years for which the data will be downloaded

  4. language: you can choose between Portuguese ("pt") and English ("eng")


Examples:

# download treated data (raw_data = TRUE) related to forest degradation
# from 2010 to 2012 (time_period = 2010:2012).
data <- load_degrad(
  dataset = "degrad",
  raw_data = FALSE,
  time_period = 2010:2012
)

Imazon

Loads data categorizing each municipality by the level of deforestation pressure it faces. The categories used by Imazon have three levels, ranging from 0 to 3.


Options:

  1. dataset: "imazon_shp"

  2. raw_data: there are two options:

    • TRUE: if you want the data as it is originally.
    • FALSE: if you want the treated version of the data.
  3. language: you can choose between Portuguese ("pt") and English ("eng")


Examples:

# Download treated data
data <- load_imazon(raw_data = FALSE)

Copy Link

Version

Install

install.packages('datazoom.amazonia')

Monthly Downloads

311

Version

1.1.0

License

MIT + file LICENSE

Maintainer

Igor Rigolon Veiga

Last Published

December 12th, 2023

Functions in datazoom.amazonia (1.1.0)

load_ppm

PPM - Municipal Livestock Production
load_prodes

PRODES - Deforestation Monitoring Project in the Legal Amazon by Satellite
load_seeg

Greenhouse gas emission estimates (SEEG)
read.dbc

Read Data Stored in DBC (Compressed DBF) Files
load_mapbiomas

MAPBIOMAS - The Annual Land Cover and Use Mapping Project in Brazil
load_sigmine

SIGMINE - Mining Geographic Information System
municipalities_biomes

IBGE codes and MAPBIOMAS id of Brazilian municipalities and biomes
municipalities

IBGE codes and Legal Amazon identification of Brazilian municipalities
dbc2dbf

Decompress a DBC (compressed DBF) file
load_censoagro

Censo Agropecuario
load_datasus

DATASUS - Mortality, hospitalizations and hospital beds
load_climate

TerraClimate - Climate monitoring
load_degrad

Degrad - Forest Degradation in the Brazilian Amazon
load_baci

BACI - Global international trade
load_cempre

CEMPRE - Central Register of Companies
load_aneel

ANEEL
load_br_trade

Comex - Brazilian external trade
load_deter

DETER - Forest Degradation in the Brazilian Amazon
load_pam

PAM - Municipal Agricultural Production
load_iema

IEMA - Institute of Environment and Water Resources
load_ibama

IBAMA - Brazilian Institute for the Environment and Renewable Natural Resources
load_population

Population
load_epe

EPE
load_pibmunic

PIB MUNICIPAL - Municipal GDP
load_ips

IPS - Amazon Social Progress Index
load_imazon

IMAZON - Deforestation pressure by municipality
load_pevs

PEVS - Forestry Activities