Package 'realestatebr'

Title: Import Brazilian Real Estate Data into R
Description: Provides access to Brazilian real estate market data from multiple official sources: the Central Bank of Brazil (BCB) <https://www.bcb.gov.br/>, the Brazilian Association of Real Estate Developers (ABRAINC) <https://abrainc.org.br/>, the Brazilian Association of Real Estate Credit and Savings Entities (ABECIP) <https://www.abecip.org.br/>, the Getulio Vargas Foundation (FGV) <https://portalibre.fgv.br/>, and the Bank for International Settlements (BIS) <https://www.bis.org/>.
Authors: Vinicius Oike Reginatto [aut, cre, cph]
Maintainer: Vinicius Oike Reginatto <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2026-05-30 09:58:55 UTC
Source: https://github.com/viniciusoike/realestatebr

Help Index


Real Estate Players listed on B3

Description

List of main Brazilian real estate players listed on B3.

Usage

b3_real_estate

Format

b3_real_estate

A tibble with 38 rows and 3 columns:

symbol

Stock ticker.

name

Full company name.

name_short

A shorter version of the company name.

Source

B3


Brazilian Central Bank Series Metadata

Description

A table with metadata for BCB economic series. Use with get_dataset("bcb_series"). The hierarchy column controls which series are returned by default: pass table = "core" for the most relevant real estate series, or a broader level for more macroeconomic context (see get_dataset).

Usage

bcb_metadata

Format

bcb_metadata

A data frame with 140 rows and 11 columns:

code_bcb

Numeric code identifying the series.

bcb_category

Category of the series.

name_simplified

Simplified name of the series.

name_pt

Full name of the series in Portuguese.

name

Full name of the series in English.

unit

Unit of the series.

frequency

Frequency of the series.

first_value

Date of the first available observation.

last_value

Date of the last available observation.

source

Source of the series.

hierarchy

Integer relevance tier: 1 = core real estate credit series; 2 = primary (key macro series such as SELIC, IPCA, INCC); 3 = secondary (broader macro context); 4 = tertiary (less relevant or discontinued series).

Source

Brazilian Central Bank (BCB)


Clear the In-Session Dataset Memo

Description

Drops every dataset memoised during the current R session. Useful when iterating during development or to force re-fetch without restarting R.

Usage

clear_session_cache()

Value

NULL, invisibly.

Examples

clear_session_cache()

Brazilian city identifier table

Description

A table with official IBGE identifiers for all Brazilian cities.

Usage

dim_city

Format

An object of class tbl_df (inherits from tbl, data.frame) with 5570 rows and 9 columns.

Details

A tibble with 5,570 rows and 8 columns:

code_muni

7-digit IBGE code identifying the city.

name_muni

Name of the city.

code_state

2-digit IBGE code identifying the state.

name_state

Name of the state.

code_region

1-digit IBGE code identifying the region

name_region

Name of the region

name_simplified

Simplified version of the city name for easier subsetting.

Source

IBGE (Brazilian Institute of Geography and Statistics)


Get Dataset

Description

Unified interface for accessing all realestatebr datasets. Resolves data from the package's GitHub release assets when possible (fast, pre-processed, updated weekly by CI) and falls back to a fresh download from the original source. Repeated calls within one R session are served from an in-memory memo to avoid redundant network traffic.

Usage

get_dataset(
  name,
  table = NULL,
  source = "auto",
  date_start = NULL,
  date_end = NULL,
  ...
)

Arguments

name

Character. Dataset name (see list_datasets for options).

table

Character. Specific table within a multi-table dataset. See get_dataset_info for available tables per dataset.

source

Character. Data source preference:

"auto"

Use the in-session memo if available, otherwise GitHub releases, otherwise fresh download (default).

"github"

Pre-processed asset from the package's GitHub release.

"fresh"

Fresh download from the original source.

Use clear_session_cache to drop the in-session memo.

date_start

Date. Start date for time series filtering (where applicable).

date_end

Date. End date for time series filtering (where applicable).

...

Additional arguments passed to internal dataset functions.

Value

A tibble or named list, depending on the dataset. Use get_dataset_info to inspect the expected structure.

See Also

list_datasets for available datasets, get_dataset_info for dataset details, clear_session_cache to drop the in-session memo.

Examples

abecip_data <- get_dataset("abecip")

sbpe_data <- get_dataset("abecip", table = "sbpe")

bcb_recent <- get_dataset("bcb_series", date_start = as.Date("2020-01-01"))

Get Dataset Information

Description

Returns detailed metadata for a single dataset, including available tables and source information.

Usage

get_dataset_info(name)

Arguments

name

Character. Dataset identifier (see list_datasets for options).

Value

A named list with the following elements:

metadata

Title, description, geography, frequency, and coverage.

categories

Available tables/subtables and their descriptions.

source_info

Source organization and URL.

technical_info

Cached file names and translation notes.

Examples

info <- get_dataset_info("abecip")
str(info)

List Available Datasets

Description

Returns a tibble describing all datasets available in the realestatebr package. Optionally filter by category, source organization, or geographic coverage.

Usage

list_datasets(category = NULL, source = NULL, geography = NULL)

Arguments

category

Optional character. Keyword matched against the dataset description (e.g., "indicators", "prices", "credit").

source

Optional character. Filter by data source organization (e.g., "BCB", "FIPE", "ABRAINC").

geography

Optional character. Filter by geographic coverage (e.g., "Brazil", "São Paulo").

Value

A tibble with one row per dataset and the following columns:

name

Dataset identifier used with get_dataset.

title

English dataset name.

title_pt

Portuguese dataset name.

description

Brief description.

source

Data source organization.

geography

Geographic coverage.

frequency

Update frequency.

coverage

Time period covered.

available_tables

Comma-separated table names for multi-table datasets.

See Also

get_dataset for retrieving data, get_dataset_info for detailed metadata on a single dataset.

Examples

list_datasets()

list_datasets(source = "BCB")