Package 'climabr'

Title: Interface for Accessing Weather Data from Climatempo
Description: Provides functions for downloading meteorological data from the CLIMATEMPO (<https://www.climatempo.com.br/>) web platform through web scraping, designed for ecological and environmental analyses.
Authors: Jhonatan Rafael Zárate-Salazar [aut, cre] (ORCID: <https://orcid.org/0000-0001-9251-5340>), Omar E. Benites-Alfaro [ctb] (ORCID: <https://orcid.org/0000-0002-6852-9598>), Eduardo V. da Silva Oliveira [ctb] (ORCID: <https://orcid.org/0000-0003-4858-3930>), Sidney F. Gouveia [ctb] (ORCID: <https://orcid.org/0000-0003-4941-7440>)
Maintainer: Jhonatan Rafael Zárate-Salazar <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-10-20 22:33:03 UTC
Source: https://github.com/cran/climabr

Help Index


Retrieve climatological data

Description

Retrieves monthly climatological data from Climatempo using flexible location inputs and automated web scraping.

Usage

climate_data(
  region = NULL,
  state = NULL,
  city = NULL,
  max_cities = 5,
  delay = 1,
  add_site = TRUE,
  add_avg = TRUE
)

Arguments

region

Character. Optional region name (e.g., "north", "northeast").

state

Character. State abbreviation or full name (e.g., "se", "sergipe").

city

Character. City name (partial or full; accent-insensitive).

max_cities

Numeric. Maximum number of locations allowed to prevent excessive requests. Default is 5.

delay

Numeric. Time delay in seconds between successive web requests. Default is 1.

add_site

Logical. If TRUE, adds a site identifier column to the output.

add_avg

Logical. If TRUE, computes monthly averages across locations (only when more than one location is selected).

Details

Main function to retrieve climate data

Value

A tibble containing monthly climatological variables, including minimum temperature (tmin), maximum temperature (tmax), and precipitation (precip).

Examples

climate_data(state = "se", city = "aracaju")

Climate links dataset

Description

A dataset containing links and metadata for Brazilian municipalities

Usage

linksdataset

Format

A data frame with 5 variables:

id

Location ID

region

Region name

state

State abbreviation

city_name

City name

links

Climatempo URL


Search locations

Description

Searches the internal location database using flexible matching for region, state, and city names.

Usage

search_locations(region = NULL, state = NULL, city = NULL)

Arguments

region

Character. Optional region name.

state

Character. State abbreviation or full name.

city

Character. City name (partial or full).

Details

Main function to retrieve search_locations

Value

A tibble containing matching locations and associated metadata, including region, state, city name, and data source links.

Examples

search_locations(state = "se", city = "arac")