Package 'brclimr'

Title: Fetch Zonal Statistics of Weather Indicators for Brazilian Municipalities
Description: Fetches zonal statistics from weather indicators that were calculated for each municipality in Brazil using data from the BR-DWGD and TerraClimate projects. Zonal statistics such as mean, maximum, minimum, standard deviation, and sum were computed by taking into account the data cells that intersect the boundaries of each municipality and stored in Parquet files. This procedure was carried out for all Brazilian municipalities, and for all available dates, for every indicator available in the weather products (BR-DWGD and TerraClimate projects). This package queries on-line the already calculated statistics on the Parquet files and returns easy-to-use data.frames.
Authors: Raphael Saldanha [aut, cre] , Reza Akbarinia [aut], Patrick Valduriez [aut], Marcel Pedroso [aut], Victor Ribeiro [aut], Carlos Cardoso [aut], Eduardo Pena [aut], Fabio Porto [aut]
Maintainer: Raphael Saldanha <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2025-01-29 03:07:17 UTC
Source: https://github.com/rfsaldanha/brclimr

Help Index


BR-DWGD zonal statistics data

Description

A list with BR-DWGD zonal indicators data.

Usage

brdwgd_data

Format

An object of class list of length 7.


Fetch zonal statistics

Description

Fetch zonal statistics from a product for given municipality code and dates.

Usage

fetch_data(code_muni, product, indicator, statistics, date_start, date_end)

Arguments

code_muni

numeric. IBGE municipality code number with 7 digits.

product

string. Zonal indicator product. Options are: brdwgd, terraclimate.

indicator

string. Indicator name from the product. Check the available indicators with the product_info function.

statistics

string. Statistics name from the indicator. Check the available statistics with the product_info function.

date_start

date, included in the selection.

date_end

date, included in the selection, must be equal or greater than date_start.

Details

For products with monthly data, like terraclimate, inform the start and end dates with the fist day of the month. Example: as.Date("2008-06-01") for June, 2008.

Value

A tibble with date and value columns.

Examples

## Not run: 
fetch_data(
    code_muni = 3304557,
    product = "brdwgd",
    indicator = "tmax",
    statistics = "mean",
    date_start = as.Date("2008-01-01"),
    date_end = as.Date("2008-01-10")
 )
 
## End(Not run)

Print product information, indicators acronyms and available statistics

Description

Print product information, indicators acronyms and available statistics

Usage

product_info(product)

Arguments

product

Zonal indicator product. Options are: brdwgd, terraclimate.

Value

Printed list tree on the console.

Examples

product_info("terraclimate")

TerraClimate zonal statistics data

Description

A list with TerraClimate zonal indicators data.

Usage

terraclimate_data

Format

An object of class list of length 14.