| Type: | Package |
| Title: | Import Brazilian Real Estate Data into R |
| Version: | 1.3.0 |
| 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/, as well as Brazil's Federal Revenue Service https://www.gov.br/receitafederal/pt-br/, the Brazilian Institute of Geography and Statistics (IBGE) https://www.ibge.gov.br/, the Ministry of Cities https://www.gov.br/cidades/pt-br/, the National Treasury https://www.tesourotransparente.gov.br/, and the National Cement Industry Union (SNIC) https://snic.org.br/. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/viniciusoike/realestatebr, https://viniciusoike.github.io/realestatebr/ |
| BugReports: | https://github.com/viniciusoike/realestatebr/issues |
| Encoding: | UTF-8 |
| Language: | en-US |
| LazyData: | true |
| Depends: | R (≥ 4.1.0) |
| RoxygenNote: | 7.3.3 |
| Imports: | cli, dplyr, GetBCBData (≥ 0.9.5), httr, janitor, jsonlite, lubridate, purrr, readr, readxl, rlang, rvest, stringr, tibble, tidyr, tidyxl, xml2, yaml, zoo |
| Suggests: | callr, DBI, dbplyr, duckdb, ggplot2, kableExtra, knitr, pdftools, pkgdown, RcppRoll, rmarkdown, scales, stringi, targets, tarchetypes, testthat, trendseries, withr |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2026-11-29 15:02:32 UTC; viniciusreginatto |
| Author: | Vinicius Oike |
| Maintainer: | Vinicius Oike <viniciusoike@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-30 15:50:33 UTC |
realestatebr: 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/, as well as Brazil's Federal Revenue Service https://www.gov.br/receitafederal/pt-br/, the Brazilian Institute of Geography and Statistics (IBGE) https://www.ibge.gov.br/, the Ministry of Cities https://www.gov.br/cidades/pt-br/, the National Treasury https://www.tesourotransparente.gov.br/, and the National Cement Industry Union (SNIC) https://snic.org.br/.
Author(s)
Maintainer: Vinicius Oike viniciusoike@gmail.com (ORCID) [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/viniciusoike/realestatebr/issues
Character mappings for consistent encoding
Description
Maps ASCII-key identifiers to their UTF-8 Portuguese equivalents.
Keys are kept as plain ASCII for easy programmatic lookup; values
are UTF-8 strings as supported by Encoding: UTF-8 in DESCRIPTION.
Usage
.ENCODING_MAP
Format
An object of class list of length 13.
ABECIP Housing Credit Indicators
Description
Housing credit data from Brazilian housing finance system (SFH) including SBPE flows, financed units, and home equity loans.
Retrieve this dataset with get_dataset() using the name "abecip".
abecip <- get_dataset("abecip")
abecip_units <- get_dataset("abecip", table = "units")
Details
-
Source: ABECIP - Associação Brasileira das Entidades de Crédito Imobiliário
-
Geography: Brazil
-
Frequency: monthly
-
Coverage: 1982-present (varies by category)
-
Access mode:
materialized -
Tables:
"sbpe","units","cgi"(default:"sbpe")
Column names translated from Portuguese to English following standard patterns.
Table "sbpe" (SBPE Monetary Flows)
Monetary flows from SBPE (Sistema Brasileiro de Poupança e Empréstimo). This is the default table. Coverage: January 1982-present.
- date
Reference month.
- sbpe_inflow
Deposits into SBPE savings accounts during the month (R$ million; historical values in the currency of the period).
- sbpe_outflow
Withdrawals from SBPE savings accounts during the month (R$ million).
- sbpe_netflow
Net savings flow: inflow minus outflow (R$ million).
- sbpe_netflow_pct
Net flow as a share of the SBPE savings stock.
- sbpe_yield
Interest credited to SBPE savings accounts (R$ million).
- sbpe_stock
End-of-month SBPE savings stock (R$ million).
- rural_inflow
Deposits into rural savings accounts during the month (R$ million).
- rural_outflow
Withdrawals from rural savings accounts during the month (R$ million).
- rural_netflow
Net rural savings flow: inflow minus outflow (R$ million).
- rural_netflow_pct
Net rural flow as a share of the rural savings stock.
- rural_yield
Interest credited to rural savings accounts (R$ million).
- rural_stock
End-of-month rural savings stock (R$ million).
- total_stock
Combined SBPE and rural savings stock (R$ million).
- total_netflow
Combined SBPE and rural net savings flow (R$ million).
Table "units" (Financed Units)
Number of units financed by SBPE, split by construction and acquisition. Coverage: January 2002-present.
- date
Reference month.
- units_construction
Number of units financed for construction.
- units_acquisition
Number of units financed for acquisition.
- units_total
Total number of financed units.
- currency_construction
Value of construction financing (R$ million).
- currency_acquisition
Value of acquisition financing (R$ million).
- currency_total
Total value of financing (R$ million).
Table "cgi" (Home Equity Loans (CGI))
Summary data on home equity loans including default rates and average terms. Coverage: January 2017-present.
- year
Reference year.
- date
Reference month.
- new_contracts
Number of new home equity loan contracts signed in the month.
- stock_contracts
Number of outstanding contracts at the end of the month.
- loan
Value of new loans granted in the month (R$).
- outstanding_balance
Outstanding loan balance at the end of the month (R$).
- average_term
Average contract term (months).
- default_rate
Share of loans in default (percent).
Source
ABECIP - Associação Brasileira das Entidades de Crédito Imobiliário
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Clean a Single SBPE-Format Table
Description
Clean a Single SBPE-Format Table
Usage
abecip_clean_sbpe_table(df)
Arguments
df |
Raw data frame from Excel import |
Value
Cleaned tibble
ABRAINC-FIPE Primary Market Indicators
Description
Primary real estate market indicators from a panel of large developers, covering launches, sales, and business conditions.
Retrieve this dataset with get_dataset() using the name "abrainc".
abrainc <- get_dataset("abrainc")
abrainc_radar <- get_dataset("abrainc", table = "radar")
Details
-
Source: ABRAINC/FIPE
-
Geography: Brazil (major cities)
-
Frequency: quarterly
-
Coverage: 2014-present
-
Access mode:
materialized -
Tables:
"indicator","radar","leading"(default:"indicator")
Social Housing (MCMV) refers to Minha Casa Minha Vida and Casa Verde Amarela programs.
Table "indicator" (Market Indicators)
Broad numbers of launches, sales, supply in the primary market. This is the
default table.
Each row is unique by the combination of date, category, and
variable.
- date
Reference month.
- year
Reference year.
- category
Indicator group (e.g. new_units, sold, delivered).
- variable
Market segment: total, market_rate, or social_housing (MCMV and related programs).
- value
Number of units.
- variable_label
Human-readable label for variable.
Table "radar" (Business Radar)
0-10 standardized index for general business conditions.
Each row is unique by the combination of date, category, variable,
and source.
- date
Reference month.
- year
Reference year.
- category
Radar dimension (e.g. macro, credit, demand).
- variable
Indicator within the dimension (e.g. confidence, activity, interest).
- source
Source of the underlying series (e.g. FGV, BCB).
- value
Standardized 0-10 score.
- avg_category
Average score of the category over the full sample.
- avg_year_category
Average score of the category in the year.
- avg_year_variable
Average score of the variable in the year.
- ma3
3-month moving average of value.
- ma6
6-month moving average of value.
- variable_label
Human-readable label for variable.
Table "leading" (Leading Indicator)
Building permits in São Paulo as real estate leading indicator.
Each row is unique by the combination of date, variable, and zone.
- date
Reference month.
- year
Reference year.
- variable
Series identifier: leading_index, leading_index_12m, or alvaras_total (building permits).
- zone
São Paulo city zone (Total, Centro, Zona Norte, and others).
- value
Series value; index points, percent change, or permit counts depending on variable.
- variable_label
Human-readable label for variable.
Source
ABRAINC/FIPE
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Apply Table Filtering to Loaded Dataset
Description
Apply Table Filtering to Loaded Dataset
Usage
apply_table_filtering(data, name, table)
Attach Standard Metadata to Dataset
Description
Attaches standardized metadata attributes to a dataset. Consolidates metadata attachment logic used across all dataset functions.
Usage
attach_dataset_metadata(
data,
source = c("web", "github", "bundled"),
category = NULL,
extra_info = list()
)
Arguments
data |
Data frame or tibble. The dataset to attach metadata to. |
source |
Character. Data source: |
category |
Character or NULL. Dataset category/table name. |
extra_info |
List. Additional metadata to include in download_info. |
Value
The data with metadata attributes attached.
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)
BCB Real Estate Market Data
Description
Detailed real estate credit and market series from the Brazilian Central Bank.
Retrieve this dataset with get_dataset() using the name "bcb_realestate".
bcb_realestate <- get_dataset("bcb_realestate")
bcb_realestate_accounting <- get_dataset("bcb_realestate", table = "accounting")
Details
-
Source: Banco Central do Brasil
-
URL: https://dadosabertos.bcb.gov.br/dataset/informacoes-do-mercado-imobiliario
-
Geography: Brazil (by state)
-
Frequency: monthly
-
Coverage: 2001-present (varies by category)
-
Access mode:
materialized -
Tables:
"accounting","application","indices","sources","units"(default:"all")
Complex multi-level series structure; v1-v5 columns contain series components.
Columns
All tables share the structure below; the table argument filters which
series are returned.
- date
End-of-month reference date (last day of the month).
- category
Top-level series grouping (e.g. credito, contabil, direcionamento, fontes, imoveis).
- type
Series subtype within the category (e.g. estoque, contratacao, financiamento).
- v1
Series identifier component 1; meaning varies by series (e.g. carteira, borrower type, region).
- v2
Series identifier component 2 (e.g. br, pf, pj).
- v3
Series identifier component 3 (e.g. credit line such as sfh, fgts, home-equity).
- v4
Series identifier component 4 (often a state abbreviation or credit line).
- v5
Series identifier component 5 (often a state abbreviation or br).
- series_info
Full underscore-separated series identifier; together with date it uniquely identifies an observation.
- value
Series value; unit varies by series (R$, units, or percent).
- year
Reference year.
- month
Reference month (1-12).
- abbrev_state
Two-letter state abbreviation, or BR for the national aggregate.
Source
Banco Central do Brasil
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
BCB Economic Series
Description
General economic and real estate related time series from Brazilian Central Bank.
Retrieve this dataset with get_dataset() using the name "bcb_series".
bcb_series <- get_dataset("bcb_series")
bcb_series_primary <- get_dataset("bcb_series", table = "primary")
Details
-
Source: Banco Central do Brasil - SGS
-
Geography: Brazil
-
Frequency: varies (daily/monthly/quarterly)
-
Coverage: varies by series
-
Access mode:
materialized -
Tables:
"core","primary","secondary","tertiary","full"(default:"core")
Metadata available in both Portuguese and English.
Columns
All tables share the structure below; the table argument filters which
series are returned.
- date
Reference date (frequency varies by series).
- code_bcb
Numeric code of the series in the BCB SGS system.
- name_simplified
Short series identifier; see the bundled bcb_metadata table for full names and units.
- value
Series value.
Source
Banco Central do Brasil - SGS
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Look Up the First Observation Date of a Series
Description
Reads first_value from bcb_metadata so each series is
requested from its own start rather than a shared floor.
Usage
bcb_series_first_date(code)
Arguments
code |
Numeric. BCB series code. |
Value
A Date.
Build the published siconfi_taxes table
Description
finbra and api are parsed long forms (source finbra and api
respectively); municipalities holds the municipality universe as a
tibble with integer 7-digit code_muni and abbrev_state. population
holds the IBGE municipality-year population as a tibble (code_muni,
year, population, population_source); NULL publishes all NA.
API rows replace FINBRA rows for the whole municipality-year so the
per-row source stays unambiguous. Non-reporters get one row per tax
with reported = FALSE and NA tax and revenue values (population does
not depend on reporting). A gross row with no deduction
row in the source counts the deduction as zero: other_deductions
becomes 0, the net is computed, and deductions_reported marks the
assumption (FALSE assumed, TRUE observed, NA when there is no gross
row). Keys with a deduction row but no gross row keep gross_revenue
and net_revenue NA.
Usage
build_siconfi_taxes(
finbra,
api = NULL,
municipalities,
population = NULL,
call = caller_env()
)
SNIC Cement: Apparent Consumption and Production
Description
Monthly cement apparent consumption and production in Brazil by state and region.
Retrieve this dataset with get_dataset() using the name "cement".
cement <- get_dataset("cement")
cement_production <- get_dataset("cement", table = "production")
Details
-
Source: SNIC - Sindicato Nacional da Indústria do Cimento
-
Geography: Brazil, five regions, 27 states, and unattributed regional adjustments
-
Frequency: monthly
-
Coverage: 2003-present; state observations are missing from 2014-03 through 2016-12
-
Access mode:
materialized -
Tables:
"consumption","production"(default:"consumption")
Ajustes are regional estimates not attributed to states. State values are
missing from March 2014 through December 2016, although region and Brazil
totals remain. Across this gap, state comparisons are uncertain because the
unattributed Ajustes share rose from about 5% to about 13% of Brazil
consumption. In production, AC, AP, and RR have no state values, RO and
TO start in mid-2009, PI ends in December 2017, and AL resumes in September
2018 after the common gap. Preliminary values are subject to revision. The
data come only from the release snapshot, which is rebuilt by hand; source = "fresh" aborts because the historical archive is not distributed.
Columns
All tables share the structure below; the table argument filters which
series are returned.
- date
First day of the reference month.
- geography_type
State, adjustment, region, or Brazil row; totals must not be summed with their components.
- code_region
IBGE major-region code; missing for Brazil.
- abbrev_state
Two-letter state abbreviation; missing for other geography types.
- code_state
IBGE state code; missing for other geography types.
- value
Cement quantity in tonnes; NA means unavailable or not yet published.
- unit
Always "tonnes".
- source_kind
Archive through 2023 or SNIC regional PDF from 2024.
Source
SNIC - Sindicato Nacional da Indústria do Cimento
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Clean SBPE Data from Abecip Excel File
Description
Clean SBPE Data from Abecip Excel File
Usage
clean_abecip_sbpe(temp_path)
Arguments
temp_path |
Path to the downloaded Excel file |
Value
A tibble with processed SBPE data
Clean Units Data from Abecip Excel File
Description
Clean Units Data from Abecip Excel File
Usage
clean_abecip_units(temp_path)
Arguments
temp_path |
Path to the downloaded Excel file |
Value
A tibble with processed units data
Process BIS Detailed CSV Data
Description
Reads the flat CSV, parses compound columns, then splits by frequency with appropriate date parsing for each.
Usage
clean_bis_detailed(csv_path, quiet)
Arguments
csv_path |
Path to the extracted CSV file |
quiet |
Logical controlling messages |
Value
Named list with elements: monthly, quarterly, annual, halfyearly
Clean BIS Selected CSV Data
Description
Reads the column-oriented CSV from the BIS SPP dataset, pivots date columns to long format, and standardises column names.
Usage
clean_bis_selected(csv_path, quiet)
Arguments
csv_path |
Path to the extracted CSV file |
quiet |
Logical controlling messages |
Value
Processed BIS selected data tibble
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()
Debug-Level Messaging
Description
Displays informational messages only when debug mode is enabled.
This function is a wrapper around cli::cli_inform() that respects
the debug mode setting.
Usage
cli_debug(message, ...)
Arguments
message |
Character string. The message to display. |
... |
Additional arguments passed to |
Details
This function should be used for detailed processing messages that are
useful for development and debugging but would be too verbose for
end-users. Messages are only shown when debug mode is enabled via
is_debug_mode().
See Also
User-Level Messaging
Description
Displays concise informational messages for end-users. This function shows a simplified, clean message unless the user has requested verbose output via the quiet parameter.
Usage
cli_user(message, quiet = FALSE, ...)
Arguments
message |
Character string. The message to display. |
quiet |
Logical. If TRUE, suppresses the message. |
... |
Additional arguments passed to |
Details
This function should be used for essential status messages that provide value to end-users, such as final results or major milestones. The message is shown unless explicitly suppressed by quiet=TRUE.
National Registry of Construction Works
Description
Registration, area, economic activity, and responsibility records for Brazilian construction works.
Retrieve this dataset with query_dataset() using the name "cno".
cno <- query_dataset("cno")
cno$constructions
Details
-
Source: Receita Federal do Brasil - Cadastro Nacional de Obras
-
URL: https://dados.gov.br/dados/conjuntos-dados/cadastro-nacional-de-obras-cno
-
Geography: Brazil
-
Frequency: annual snapshots
-
Coverage: November 2018-present, including migrated CEI records with earlier start dates
-
Access mode:
query -
Tables:
"constructions","areas","cnaes","responsibilities"
Column names are normalized to English and text is trimmed. Mechanical source defects are fixed: 1900-01-01 sentinel dates and invalid Plus Codes become NA, and exact duplicate area rows are dropped. Each fix is counted in the snapshot manifest. Valid but anomalous values, such as area outliers and unusual state labels, are retained.
Table "constructions" (Constructions)
One row per CNO registration.
Each row is unique by cno.
- cno
Twelve-digit CNO registration identifier. Stored as character to preserve leading zeroes.
- country_code
Three-digit country code published by Receita Federal.
- country_name
Country name published by Receita Federal.
- start_date
Declared start date of the construction work. The 1900-01-01 sentinel is converted to NA.
- responsibility_start_date
Start date of the current responsibility period.
- registration_date
Date on which the work was registered in CNO.
- linked_cno
Linked CNO registration when supplied by Receita Federal.
- postal_code
Postal code for works in Brazil. Stored as character.
- responsible_tax_id
Fourteen-digit identifier of the responsible legal person. Receita Federal suppresses CPF values.
- responsible_role_code
Four-digit code for the responsible party's role.
- construction_name
Name assigned to the construction, not the responsible party's name.
- municipality_tom_code
Four-digit Receita Federal TOM municipality code, not an IBGE municipality code. See code_muni.
- municipality_name
Municipality name published by Receita Federal.
- street_type
Street type.
- street_name
Street name.
- street_number
Street number or other source value such as S/N.
- neighborhood
Neighborhood name.
- state
State field as published. Usually a two-letter UF abbreviation; source anomalies are retained.
- postal_box
Postal box for works outside Brazil.
- address_complement
Additional address information.
- measurement_unit
Unit used to measure the work.
- total_area
Total measurement reported for the work, expressed in measurement_unit. Source outliers are retained.
- status_code
Two-digit CNO status code.
- status_date
Date associated with the current status.
- responsible_legal_name
Legal name of the responsible legal person when published.
- plus_code
Plus Code (Open Location Code) in upper case. Full and short codes are kept; values that are not valid Plus Codes, such as 00000000+00, are converted to NA.
- code_muni
Seven-digit IBGE municipality code, joined from the Receita Federal TOM-to-IBGE table. Compatible with geobr. NA for works abroad and for TOM codes missing from that table.
Table "areas" (Construction Areas)
Area records classified by category, destination, structure, and area type.
- cno
CNO registration identifier joining to constructions.cno.
- construction_category
Category reported for the construction area.
- destination
Intended use reported for the work area.
- structure_type
Construction structure type.
- area_type
Principal or complementary area.
- complementary_area_type
Complementary-area classification, when applicable.
- area
Reported area in square metres. Exact duplicate rows are dropped; outliers are retained.
Table "cnaes" (Economic Activities)
CNAE economic activities associated with each construction work.
- cno
CNO registration identifier joining to constructions.cno.
- cnae
Seven-digit CNAE activity code. Stored as character.
- registration_date
Date on which the activity was registered.
Table "responsibilities" (Responsibility Periods)
Responsible-party roles and their periods for each construction work.
- cno
CNO registration identifier joining to constructions.cno.
- start_date
Start date of the responsibility period.
- end_date
End date of the responsibility period, when applicable.
- registration_date
Date on which the responsibility was registered.
- responsible_role_code
Four-digit code for the responsible party's role.
- responsible_tax_id
Fourteen-digit identifier of the responsible legal person. Receita Federal suppresses CPF values.
Source
Receita Federal do Brasil - Cadastro Nacional de Obras
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
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 9 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.
- abbrev_state
Two-letter state abbreviation (e.g. "SP").
- name_state
Name of the state.
- code_region
1-digit IBGE code identifying the region.
- name_region
Name of the region.
- year
Reference year of the IBGE territorial division (2020).
- name_simplified
Simplified version of the city name for easier subsetting.
Source
IBGE (Brazilian Institute of Geography and Statistics)
Download Abecip Excel File
Description
Scrapes the given page to find the download link, then downloads the Excel
file using the shared download_excel() helper.
Usage
download_abecip_file(
url_page,
xpath,
file_prefix,
quiet = FALSE,
max_retries = 3L
)
Arguments
url_page |
URL of the Abecip page containing the download link |
xpath |
XPath to locate the download link |
file_prefix |
Prefix used in retry-attempt messages |
quiet |
Logical controlling messages |
max_retries |
Maximum number of retry attempts |
Value
Path to the downloaded temporary file
Download SBPE Excel File from Abecip
Description
Download SBPE Excel File from Abecip
Usage
download_abecip_sbpe(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical controlling progress messages |
max_retries |
Maximum number of retry attempts |
Value
Path to the downloaded temporary file
Download Units Excel File from Abecip
Description
Download Units Excel File from Abecip
Usage
download_abecip_units(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical controlling progress messages |
max_retries |
Maximum number of retry attempts |
Value
Path to the downloaded temporary file
Download raw BCB real estate data from the API
Description
Download raw BCB real estate data from the API
Usage
download_bcb_realestate(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical controlling messages |
max_retries |
Maximum number of retry attempts |
Value
Raw tibble from BCB API endpoint
Download BCB Series Data
Description
Downloads BCB series data with per-series retry logic. Uses
purrr::possibly() to collect failures without aborting, then reports
any failed series after the full map completes.
Usage
download_bcb_series(codes_bcb, quiet, max_retries)
Arguments
codes_bcb |
Vector of BCB series codes. |
quiet |
Logical controlling messages. |
max_retries |
Maximum number of retry attempts per series. |
Value
A long-format tibble with columns date, value, and code_bcb.
Download BIS RPPI Detailed ZIP
Description
Download BIS RPPI Detailed ZIP
Usage
download_bis_detailed(quiet, max_retries)
Arguments
quiet |
Logical controlling messages |
max_retries |
Maximum number of retry attempts |
Value
Path to extracted CSV file
Download BIS RPPI Selected ZIP
Description
Download BIS RPPI Selected ZIP
Usage
download_bis_selected(quiet, max_retries)
Arguments
quiet |
Logical controlling messages |
max_retries |
Maximum number of retry attempts |
Value
Path to extracted CSV file
Download CSV File
Description
Downloads a CSV file to a temporary location with retry logic.
Usage
download_csv(
url,
min_size = 100,
ssl_verify = TRUE,
max_retries = 3,
quiet = FALSE
)
Arguments
url |
Character. URL of the CSV file. |
min_size |
Integer. Minimum file size in bytes. Default 100. |
ssl_verify |
Logical. Whether to verify SSL certificates. |
max_retries |
Integer. Number of retry attempts. |
quiet |
Logical. Suppress progress messages. |
Value
Character. Path to downloaded CSV file.
Download and Validate Excel File
Description
Downloads an Excel file with validation of expected sheets and file size.
Usage
download_excel(
url,
expected_sheets = NULL,
min_size = 1000,
ssl_verify = TRUE,
max_retries = 3,
quiet = FALSE
)
Arguments
url |
Character. URL of the Excel file. |
expected_sheets |
Character vector. Sheet names that must be present. If NULL, no sheet validation is performed. |
min_size |
Integer. Minimum file size in bytes. Default 1000. |
ssl_verify |
Logical. Whether to verify SSL certificates. |
max_retries |
Integer. Number of retry attempts. |
quiet |
Logical. Suppress progress messages. |
Value
Character. Path to downloaded and validated Excel file.
Download raw SECOVI-SP indicator tables
Description
Pages are requested one at a time with a short pause between them, and each page is retried on its own. Indicators whose page cannot be read are dropped with a warning; an error is raised only when no page can be read.
Usage
download_secovi(table, quiet, max_retries, delay = 0.5)
Arguments
table |
Data table to import |
quiet |
Logical controlling messages |
max_retries |
Maximum number of retry attempts |
delay |
Seconds to wait between page requests |
Value
Named list of scraped data tables
Download with Retry Logic
Description
Executes a download function with automatic retry on failure. Uses exponential backoff between retry attempts.
Usage
download_with_retry(fn, max_retries = 3, quiet = FALSE, desc = "Download")
Arguments
fn |
Function to execute (should return data on success) |
max_retries |
Maximum number of retry attempts |
quiet |
If TRUE, suppresses retry warnings |
desc |
Description of what's being downloaded (for error messages) |
Value
Result from fn() if successful
Download and Extract File from ZIP Archive
Description
Downloads a ZIP archive, extracts a file matching file_pattern,
validates its size, and returns the path to the extracted file.
Usage
download_zip(
url,
file_pattern = "\\.csv$",
min_size = 1000,
ssl_verify = TRUE,
max_retries = 3,
quiet = FALSE
)
Arguments
url |
Character. URL of the ZIP archive. |
file_pattern |
Character. Regex pattern to match the target file
inside the archive. Default |
min_size |
Integer. Minimum extracted file size in bytes. Default 1000. |
ssl_verify |
Logical. Whether to verify SSL certificates. |
max_retries |
Integer. Number of retry attempts. |
quiet |
Logical. Suppress progress messages. |
Value
Character. Path to the extracted file.
Character Encoding Utilities
Description
Internal utilities for consistent handling of Portuguese characters. The package uses UTF-8 encoding (declared in DESCRIPTION) throughout.
Fallback to GitHub Release on Download Failure
Description
Attempts to load a dataset from the package's GitHub release when a primary web download has failed. Returns NULL on miss so callers can decide whether to abort or degrade gracefully.
Usage
fallback_to_github_cache(dataset_name, quiet = FALSE)
Arguments
dataset_name |
Character. Asset stem used in the GitHub release (e.g.,
|
quiet |
Logical. If TRUE, suppresses messages. |
Value
A tibble if the GitHub release asset is available, otherwise NULL.
Fetch a Cache Asset from GitHub Releases
Description
Downloads a single asset from the package's cache-latest release into a
tempfile, reads it, and returns the deserialised object. Tries .rds
first, then .csv.gz. Returns NULL on miss (either format missing, the
release does not exist, or network failure).
Usage
fetch_github_release_asset(cached_name, quiet = FALSE)
Arguments
cached_name |
Character. Asset stem, e.g. |
quiet |
Logical. Suppress network and parse warnings. Progress
messages are debug-level (see |
Value
The deserialised dataset, or NULL.
Fetch a Single Series from the BCB SGS API
Description
Wraps GetBCBData::gbcbd_get_series(), which splits long spans into
windows the API accepts. SGS rejects requests covering more than ten years
of a daily series, so the split is what makes full history reachable.
Usage
fetch_sgs_series(code, first_date)
Arguments
code |
Numeric. BCB series code. |
first_date |
Date. First period to request. |
Details
A window that returns no data yields a row with no reference date, which happens for discontinued series whose last window falls after the final observation. Those rows are dropped.
Value
A tibble with columns date, value, and code_bcb.
Fetch all /dca items for one municipality-year
Description
Follows pagination by advancing offset by the page's reported
limit while hasMore is true; every page must carry its declared
count and the requested offset, and the number of pages is
capped: a truncated, resent or misdirected response aborts instead of
being silently parsed. The default request also paces itself at at
most one request per second inside the retry loop.
Usage
fetch_siconfi_dca(code_muni, year, request = NULL, call = caller_env())
Arguments
request |
Injectable for tests: a callable taking a URL string and returning the parsed response body. |
Resident population by municipality-year from IBGE
Description
The estimates come from SIDRA table 6579 (variable 9324, População
residente estimada, the requested years only, localities N6all;
table and variable verified 25 Oct 2026), the 2022 Census count from
table 4709 (variable 93, single 2022 period), and 2023 gets a linear
midpoint between the 2022 Census and the 2024 estimate (ties round to
even, R's round()). Dataset years without a figure stay absent: the
builder fills them with NA. fetch is injectable for tests: the
aggregate fetcher called as fetch(aggregate, variables, periods, localities).
Usage
fetch_siconfi_population(
years,
fetch = download_ibge_aggregate,
call = caller_env()
)
Arguments
years |
Exercise years the dataset covers. |
Value
A tibble code_muni (character, 7 digits), year (integer),
population (integer), population_source ("estimate", "census",
"interpolated").
FGV IBRE Real Estate Indicators
Description
Real estate market indicators from Fundação Getulio Vargas IBRE.
Retrieve this dataset with get_dataset() using the name "fgv_ibre".
fgv_ibre <- get_dataset("fgv_ibre")
Details
-
Source: FGV IBRE
-
Geography: Brazil
-
Frequency: monthly
-
Coverage: 2010-present
-
Access mode:
materialized
Technical economic terms; standard translations applied.
Columns
- date
Reference month.
- name_simplified
Short series identifier (e.g. incc_brasil_di, ivar_brazil, ic_cst).
- value
Series value.
- name_series
Full series name in Portuguese.
- code_series
FGV series code.
- unit
Unit of the series (index, percent, or indicator).
- source
FGV survey of origin (e.g. FGV-INCC, FGV-SONDA).
Source
FGV IBRE
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Get Credit Indicators from Abecip
Description
Get Credit Indicators from Abecip
Usage
get_abecip_indicators(table = "sbpe", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. One of |
quiet |
Logical. If |
max_retries |
Integer. Maximum number of retry attempts for failed downloads. Defaults to 3. |
Details
Downloads housing credit data from Abecip including SBPE monetary flows, financed units, and home-equity loan data.
Value
Either a named list (when table is 'all') or a tibble
(for specific tables). The return includes metadata attributes:
- download_info
List with download statistics
- source
Data source used
- download_time
Timestamp of download
Source
Brazilian Association of Real Estate Credit and Savings (ABECIP)
Import Indicators from the Abrainc-Fipe Report
Description
Import Indicators from the Abrainc-Fipe Report
Usage
get_abrainc_indicators(table = "indicator", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. One of |
quiet |
Logical. If |
max_retries |
Integer. Maximum number of retry attempts for failed downloads. Defaults to 3. |
Details
Downloads data from the Abrainc-Fipe Indicators report including information on new launches, sales, delivered units, and market indicators.
Value
Either a named list (when table is 'all') or a tibble
(for specific tables). The return includes metadata attributes:
- download_info
List with download statistics
- source
Data source used
- download_time
Timestamp of download
Source
Abrainc-Fipe Indicators (FIPE)
Get Available Tables from Dataset Info
Description
Get Available Tables from Dataset Info
Usage
get_available_tables(dataset_info)
Import Real Estate data from the Brazilian Central Bank
Description
Imports real estate data from BCB including credit sources, applications, financed units, and real estate indices.
Usage
get_bcb_realestate(table = "all", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. One of |
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts. Defaults to 3. |
Value
Tibble with BCB real estate data. Includes metadata attributes: source, download_time.
Source
Brazilian Central Bank (BCB) Open Data Portal
Download macroeconomic time-series from BCB
Description
Download macroeconomic time-series from BCB
Usage
get_bcb_series(table = "core", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. Hierarchy level to return:
|
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts for failed API calls. Defaults to 3. |
Details
Downloads macroeconomic time series from BCB. Series are organized by relevance to the Brazilian real estate market using a four-level hierarchy. The default ("core") returns the 40 most directly relevant series covering real estate credit concession, interest rates, and delinquency. Use broader levels to include macroeconomic context series.
Each series is downloaded in full, from its first published observation to
the present. Filter the returned date column to restrict the window.
Value
A 4-column tibble with columns date, code_bcb,
name_simplified, and value. Series metadata is available in
bcb_metadata.
Source
Brazilian Central Bank (BCB) Time Series Management System (SGS)
Get Cached Asset Stem for Dataset
Description
Maps a dataset name (and optional table) to the asset stem used in GitHub releases — i.e. the file name without extension.
Usage
get_cached_name(name, dataset_info, table = NULL)
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,
quiet = FALSE,
...
)
Arguments
name |
Character. Dataset name (see |
table |
Character. Table within a multi-table dataset; see
|
source |
Character. Data source preference:
Use |
date_start, date_end |
Optional first and last dates to retain, as a
|
quiet |
Logical. If |
... |
Additional arguments passed to the internal function when a fresh download is required. Retained for compatibility with the 1.0.1 interface. |
Details
To restrict a time series to a date window, use date_start and date_end
or filter the returned date column with dplyr::filter().
Value
A tibble or named list, depending on the dataset. Use
get_dataset_info to inspect the expected structure.
See Also
query_dataset() for large relational datasets,
list_datasets for available datasets,
get_dataset_info for dataset details,
clear_session_cache to drop the in-session memo.
For table and column documentation of each dataset, see the dataset
help topics: abecip, abrainc, bcb_realestate,
bcb_series, cement, fgv_ibre, paic,
pnad_housing, pim_pf_construction, rppi,
rppi_bis, secovi, siconfi_taxes, and sinapi.
Examples
abecip_data <- get_dataset("abecip")
sbpe_data <- get_dataset("abecip", table = "sbpe")
bcb_data <- get_dataset("bcb_series", quiet = TRUE)
bcb_recent <- get_dataset(
"bcb_series",
date_start = as.Date("2020-01-01")
)
Get Dataset from Specific Source
Description
Get Dataset from Specific Source
Usage
get_dataset_from_source(name, dataset_info, source, table, quiet, ...)
Value
A list with elements data and tier.
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 |
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
Access mode, cache or query-manifest metadata, and translation notes.
Examples
info <- get_dataset_info("abecip")
str(info)
Get Dataset with Fallback Strategy
Description
Auto strategy: in-session memo -> GitHub release -> fresh download.
Usage
get_dataset_with_fallback(name, dataset_info, table, quiet, ...)
Value
A list with elements data and tier, where tier names the
source that served the data.
Get FGV IBRE Confidence Indicators
Description
Loads construction confidence indicators from FGV IBRE including confidence indices, expectation indicators, and INCC price indices. FGV data is not available via API; this function fetches the pre-processed dataset from the package's GitHub release.
Usage
get_fgv_ibre(table = "indicators", quiet = FALSE)
Arguments
table |
Character. Which dataset to return: "indicators" (default) or "all". |
quiet |
Logical. If |
Value
Tibble with FGV IBRE indicators. Includes metadata attributes: source, download_time.
Get Data from GitHub Release Cache
Description
Downloads the appropriate asset into a tempfile and returns the deserialised object, applying table filtering where applicable.
Usage
get_from_github_cache(name, dataset_info, table, quiet = FALSE)
Get Data from Internal Function
Description
Calls dataset-specific internal functions for a fresh download from the
original source. Their step-by-step progress messages are suppressed
unless debug mode is on, since get_dataset() reports the source itself.
Usage
get_from_internal_function(name, dataset_info, table, quiet = FALSE, ...)
Get PAIC Construction Industry Data
Description
Downloads annual Pesquisa Anual da Indústria da Construção (PAIC) data from IBGE for the new series starting in reference year 2024. The result covers construction enterprises, employment, revenue, costs, and output. Do not join this series with the 2007-2023 tables or report growth rates across the 2023-2024 break (see IBGE Nota técnica 01/2026).
Usage
get_paic(table = "activity", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. One of |
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts. Defaults to 3. |
Value
Either a named list (when table is 'all') or a tibble
(for specific tables).
Source
IBGE Pesquisa Anual da Indústria da Construção (PAIC), SIDRA tables 10463, 10441, and 10442
Get PIM-PF Construction-input Production Index
Description
Downloads and links the monthly IBGE physical-production index for inputs typically used in construction. The historical series from SIDRA table 2294 is rescaled to the 2022-reference series in table 8886 using the ratio of their 2012 annual means.
Usage
get_pim_pf_construction(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts. Defaults to 3. |
Value
A tibble containing one linked monthly index from January 1991.
Source
IBGE Pesquisa Industrial Mensal - Produção Física (PIM-PF), SIDRA tables 2294 and 8886
Get Stacked RPPI Data
Description
Get Stacked RPPI Data
Usage
get_rppi(table = "sale", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. "sale", "rent", or "all" |
quiet |
Logical. If TRUE, suppresses messages |
max_retries |
Integer. Maximum retry attempts |
Details
Stacks multiple Brazilian residential property price indices into a single tibble with consistent columns for easy comparison. Handles different RPPI sources (IGMI-R, IVG-R, FipeZap, IVAR, IQAIW) and standardizes their formats.
Sale stack: IGMI-R, IVG-R, FipeZap. Rent stack: IVAR, IQAIW, FipeZap. Use get_dataset("rppi", table) for individual indices (IQA, IQAIW, Secovi-SP, etc.).
Value
Tibble with columns: date, name_muni, index, chg, acum12m, source (plus transaction_type if table="all")
Get Residential Property Price Indices from BIS
Description
Downloads Residential Property Price Indices from BIS with support for selected series and detailed monthly/quarterly/annual/halfyearly datasets.
Usage
get_rppi_bis(table = "selected", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. Dataset table: "selected", "detailed_monthly", "detailed_quarterly", "detailed_annual", "detailed_halfyearly", or "all" for a named list of every table. |
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts. Defaults to 3. |
Value
Tibble with BIS RPPI data. Includes metadata attributes: source, download_time.
Source
Bank for International Settlements (BIS) Residential Property Prices
Get FipeZap RPPI
Description
Get FipeZap RPPI
Usage
get_rppi_fipezap(city = "all", quiet = FALSE, max_retries = 3L)
Arguments
city |
City name or "all" (default). Filtering by city doesn't save processing time. |
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts |
Details
The FipeZap Index is a monthly median stratified index across ~20 Brazilian cities,
based on online listings from Zap Imoveis. Includes residential and commercial markets,
both sale and rent, stratified by number of rooms. The overall city index is a weighted
sum of median prices by room/region. Residential index includes only apartments, studios,
and flats. National index: name_muni == 'Brazil' (after standardization).
Value
Tibble with columns: date, name_muni, market, rent_sale, variable, rooms, value
Get the IGMI Sales Index
Description
Get the IGMI Sales Index
Usage
get_rppi_igmi(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts for downloads |
Details
The IGMI-R (Residential Real Estate Index) is a hedonic sales index based on bank appraisal reports, available for Brazil + 10 capital cities. Hedonic indices account for both composition bias and quality differentials across the housing stock. Maintained by ABECIP in partnership with FGV.
Value
Tibble with columns: date, name_muni, index, chg, acum12m
Get QuintoAndar Rental Index (IQA)
Description
Get QuintoAndar Rental Index (IQA)
Usage
get_rppi_iqa(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts for downloads |
Details
The IQA (QuintoAndar Rental Index) is a median stratified index for Rio de Janeiro
and Sao Paulo, based on new rent contracts managed by QuintoAndar. Includes only
apartments, studios, and flats. Note: IQA provides raw prices (not index numbers),
so rent_price is the median rent per square meter.
Value
Tibble with columns: date, name_muni, rent_price, chg, acum12m
Get QuintoAndar ImovelWeb Rental Index (IQAIW)
Description
Get QuintoAndar ImovelWeb Rental Index (IQAIW)
Usage
get_rppi_iqaiw(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts for downloads |
Details
The IQAIW (Indice QuintoAndar ImovelWeb) is a rental index for major Brazilian cities. The index is based on both new rental contracts (managed by QuintoAndar) and online listings from QuintoAndar's listings (including ImovelWeb). The IQAIW was developed in 2023 and replaced the former IQA index. Given the change in methodology and data sources, the IQAIW is not directly comparable to the IQA index. Formally, the index is a hedonic double imputed index, controlling for quality changes using a flexible GAM specification with location variables. In this sense, the IQAIW is more theoretically sound than median stratified indices like FipeZap or the former IQA. The mixture of listings and contracts, however, lacks theoretical support and seems to be mainly driven by branding purposes. The ImovelWeb brand was purchased by QuintoAndar in 2021-22 and the IQAIW symbolizes the merging of both brands. In other words, the original IQA could've been improved simply by adopting a hedonic methodology, without the need to mix data sources.
Value
Tibble with columns: date, name_muni, index, chg, acum12m, price_m2
Get IVAR Rent Index
Description
Get IVAR Rent Index
Usage
get_rppi_ivar(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts (not used for this data source) |
Details
The IVAR (Residential Rent Variation Index) is a repeat-rent index from IBRE/FGV, comparing the same housing unit over time. Based on rental contracts from brokers. Available for 4 major cities (Sao Paulo, Rio, Porto Alegre, Belo Horizonte); the national index is a weighted average. More theoretically sound than IGP-M for rent contracts as it measures only rent prices.
Value
Tibble with columns: date, name_muni, index, chg, acum12m, name_simplified, abbrev_state
Note
IVAR's underlying source (FGV) is not accessible via web scraping;
when the static fgv_data object is unavailable, this function falls back
to the package's GitHub release.
Get the IVGR Sales Index
Description
Get the IVGR Sales Index
Usage
get_rppi_ivgr(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts for downloads |
Details
The IVG-R (Residential Real Estate Collateral Value Index) is a monthly median sales index based on bank appraisals, calculated by the Brazilian Central Bank (BCB series 21340). The index estimates long-run trends in home prices using the Hodrick-Prescott filter (lambda=3600) applied to major metropolitan regions. Note: Median indices suffer from composition bias and cannot account for quality changes across the housing stock.
Value
Tibble with columns: date, name_geo, index, chg, acum12m
References
Banco Central do Brasil (2018) "Indice de Valores de Garantia de Imoveis Residenciais Financiados (IVG-R). Seminario de Metodologia do IBGE."
Get Secovi-SP Rent Index
Description
Get Secovi-SP Rent Index
Usage
get_rppi_secovi_sp(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If TRUE, suppresses warnings |
max_retries |
Integer. Maximum retry attempts |
Details
Secovi-SP rent price index for Sao Paulo. Wrapper around get_secovi() that extracts and formats rent price data as RPPI.
Value
Tibble with columns: date, name_muni, index, chg, acum12m
Import data from Secovi-SP
Description
Import data from Secovi-SP
Usage
get_secovi(table = "all", quiet = FALSE, max_retries = 3L)
Arguments
table |
Character. One of |
quiet |
Logical. If |
max_retries |
Integer. Maximum number of retry attempts for failed web scraping operations. Defaults to 3. |
Details
Scrapes real estate data from SECOVI-SP including condominium fees, rental market data, launches, and sales information.
Value
A tibble with SECOVI-SP real estate data. The return includes
metadata attributes:
- download_info
List with download statistics
- source
Data source used
- download_time
Timestamp of download
Get SINAPI Construction Costs and Indices
Description
Downloads monthly SINAPI costs, indices, and percentage changes from IBGE for Brazil, the five geographic regions, and all states. The result includes series both with and without payroll-tax relief.
Usage
get_sinapi(quiet = FALSE, max_retries = 3L)
Arguments
quiet |
Logical. If |
max_retries |
Integer. Maximum retry attempts. Defaults to 3. |
Value
A tibble with monthly construction costs, indices, and percentage changes by geography and payroll-relief treatment.
Source
IBGE Sistema Nacional de Pesquisa de Custos e Índices da Construção Civil (SINAPI), SIDRA tables 2296 and 6586
Harmonize FipeZap Data for Stacking
Description
Harmonize FipeZap Data for Stacking
Usage
harmonize_fipezap_for_stacking(dat, transaction_type = NULL)
Arguments
dat |
FipeZap data tibble |
transaction_type |
"sale" or "rent" to filter for stacking |
Value
Harmonized tibble with standard RPPI columns
Check if Debug Mode is Enabled
Description
Checks whether debug mode is enabled for detailed package messaging. Debug mode can be enabled via environment variable or package option.
Usage
is_debug_mode()
Details
Debug mode can be enabled in two ways (checked in order of precedence):
Environment variable:
REALESTATEBR_DEBUG=TRUEPackage option:
options(realestatebr.debug = TRUE)
When debug mode is enabled, all detailed processing messages are shown, including file-by-file progress, type detection, and intermediate steps. This is useful for development and troubleshooting.
Value
Logical. TRUE if debug mode is enabled, FALSE otherwise.
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., |
source |
Optional character. Filter by data source organization
(e.g., |
geography |
Optional character. Filter by geographic coverage
(e.g., |
Value
A tibble with one row per dataset and the following columns:
- name
Dataset identifier used with
get_dataset()orquery_dataset(), according toaccess_mode.- 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.
- access_mode
Either
"materialized"or"query".- available_tables
Comma-separated table names for multi-table datasets.
See Also
get_dataset() and query_dataset() for retrieving data,
get_dataset_info() for detailed metadata on a single dataset.
Examples
list_datasets()
list_datasets(source = "BCB")
Load and Process CGI Data from Bundled Excel File
Description
Load and Process CGI Data from Bundled Excel File
Usage
load_abecip_cgi(path)
Arguments
path |
Path to abecip_cgi.xlsx |
Value
A tibble with processed CGI data
Load Dataset Registry from YAML
Description
Internal function to load the dataset registry from the inst/extdata/datasets.yaml file.
Usage
load_dataset_registry()
Value
A list containing the parsed YAML registry
FGTS/MCMV Housing Finance and Subsidized Projects
Description
Published financing observations, official financing summaries, and subsidized housing project records.
Retrieve this dataset with query_dataset() using the name "mcmv".
mcmv <- query_dataset("mcmv")
mcmv$financing
Details
-
Source: Ministério das Cidades - Secretaria Nacional de Habitação
-
Geography: Brazil
-
Frequency: dated full snapshots
-
Coverage: Contracts signed from 2009 onward; each snapshot reports its own reference dates
-
Access mode:
query -
Tables:
"financing","financing_summary","subsidized_projects"
Source categories, missing observations, duplicates, and anomalies are retained. See the working article and data dictionary.
Table "financing" (Financing)
One published financing observation, usually one housing unit. The source has no unique key.
- reference_date
Reference date reported inside the source; not retrieval or publication date.
- code_muni_6
Six-digit IBGE municipality identifier without its check digit.
- name_muni
Municipality name as published, including whitespace and capitalization.
- state
Source state abbreviation.
- region
Source Brazilian region label; capitalization is preserved.
- contract_date
Financing contract signature date.
- units_financed
Number of financed housing units reported in this observation.
- amount_financed
Financing amount, in nominal BRL.
- subsidy_fgts_discount
FGTS discount subsidy, in nominal BRL.
- subsidy_ogu_discount
Federal budget (OGU) discount subsidy, in nominal BRL.
- subsidy_fgts_interest
FGTS interest-equilibrium subsidy, in nominal BRL.
- subsidy_ogu_interest
OGU interest-equilibrium subsidy, in nominal BRL.
- purchase_price
Property purchase value, in nominal BRL.
- household_income
Reported household income, in nominal BRL; no frequency inferred.
- financing_program
Source financing program label, including programs outside MCMV/CVA.
- interest_rate
Source interest rate in percentage units; periodicity is not inferred.
- property_type
Source property-type label, preserving capitalization variants.
- fgts_account_holder
Source FGTS account-holder code, retained as character; not a Boolean.
- amortization_system
Source amortization-system label.
- birth_date
Reported borrower birth date; unpublished in July analytical layout.
- income_band
Source income-band label or code; no undocumented code crosswalk is applied.
- project_name
Source development name; unpublished in July financing layout.
- sex
Source sex code; unpublished in March analytical layout.
Table "financing_summary" (Financing Summary)
Official totals by municipality, year, month, and income band.
- reference_date
Reference date reported inside the source; not retrieval or publication date.
- code_muni_6
Six-digit IBGE municipality identifier without its check digit.
- name_muni
Municipality name as published, including whitespace and capitalization.
- state
Source state abbreviation.
- region
Source Brazilian region label; capitalization is preserved.
- contract_year
Source financing year; missing years are retained.
- contract_month
Source financing month; absent in annual summaries.
- units_financed
Number of financed housing units reported in this observation.
- amount_financed
Financing amount, in nominal BRL.
- subsidy_total
Official total subsidy in nominal BRL; July reconciles to all four analytical subsidy components.
- income_band
Source income-band label or code; no undocumented code crosswalk is applied.
Table "subsidized_projects" (Subsidized Projects)
One published subsidized-project record. Duplicate rows and missing operation codes are retained.
- reference_date
Reference date reported inside the source; not retrieval or publication date.
- code_muni_6
Six-digit IBGE municipality identifier without its check digit.
- name_muni
Municipality name as published, including whitespace and capitalization.
- state
Source state abbreviation.
- region
Source Brazilian region label; capitalization is preserved.
- contract_date
Project contract signature date.
- operation_code
Source operation identifier; missing and repeated values are retained. Not a primary key.
- project_name
Source development name.
- financial_agent
Source financial-agent name.
- modality
Source housing modality label.
- project_status
Source project-status label.
- units_contracted
Reported contracted housing units, including repeated source records.
- units_delivered
Reported delivered housing units.
- units_outstanding
Reported active outstanding housing units.
- units_cancelled
Reported cancelled housing units; missing counts are not zero.
- amount_contracted
Total project contract amount, in nominal BRL.
- amount_disbursed
Disbursed project amount, in nominal BRL.
- responsible_entity_cnpj
Source CNPJ of construction company or social entity, stored as character.
- responsible_entity_name
Source name of construction company or social entity.
- address
Source project address.
- postal_code
Source postal code (CEP), stored as character.
Source
Ministério das Cidades - Secretaria Nacional de Habitação
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Build Memo Key for Dataset + Table
Description
Build Memo Key for Dataset + Table
Usage
memo_key(name, table)
PAIC Construction Industry Data
Description
Annual construction-industry activity, employment, revenue, costs, and output for the new series starting in 2024.
Retrieve this dataset with get_dataset() using the name "paic".
paic <- get_dataset("paic")
paic_size <- get_dataset("paic", table = "size")
Details
-
Source: IBGE - Pesquisa Anual da Indústria da Construção
-
Geography: Brazil, geographic regions, and states (varies by table)
-
Frequency: annual
-
Coverage: 2024-present (new series; do not compare with 2007-2023)
-
Access mode:
materialized -
Tables:
"activity","size","state"(default:"activity")
New 2024-onward series per IBGE Nota técnica 01/2026; the 2024 series break reflects the new Cadastro Básico de Seleção. Values publish in original units, including thousand reais. Table 10463 covers all firms at national level only; table 10442 covers firms with five or more workers by headquarters or work location. The work-location basis of variables 13808, 631, 673, 1245, and 1241 follows the PAIC 2024 publication (v. 34, June 2026), which collects the regional block by Unidade da Federação de atuação da empresa. In table 10441, SIDRA marks unpublished state cells in the total and 1-4 bands with a dash; these rows are dropped rather than read as zeros.
Table "activity" (Activity by Size Band)
General construction-enterprise data by firm-size band and CNAE activity from SIDRA table 10463 (Brazil only, all firms). The hierarchy stacks totals, divisions, groups, and classes in one tibble; filter by activity_level to avoid double-counting. Detail differs by size band: 1-4 workers reaches divisions only, 5-29 adds groups, and 30+ reaches classes. No category covers all sizes for a single division; the only all-firm row is Total das empresas, so a national division total is the sum of the three size bands. This is the default table. Coverage: 2024-present.
- year
Reference year.
- source_table
SIDRA table supplying the observation (10463).
- geography_type
Geographic level (brazil for this table).
- geography_code
IBGE code for the geographic unit.
- geography_name
Geographic unit name in Portuguese.
- size_band
Firm-size band: total, 1_4, 5_29, or 30_plus.
- activity_level
CNAE level: total, division, group, or class.
- activity_code
CNAE 2.0 code parsed from the category (e.g. 41, 41.1, 41.10); missing for totals.
- activity_name
Canonical CNAE activity name from the package lookup.
- division_code
Parent CNAE division code.
- group_code
Parent CNAE group code (for groups and classes).
- variable_id
SIDRA variable ID.
- variable
English series identifier (e.g. firms, employment, wages, construction_output).
- variable_name_pt
Original IBGE variable label in Portuguese.
- unit
Original IBGE unit, including thousand reais (Mil Reais) where specified.
- value
Observed value in the original unit; NA when the cell is not applicable, not available, or suppressed.
- value_raw
Original SIDRA cell text.
- value_status
Cell status: observed, zero (SIDRA -), not_applicable (..), not_available (...), suppressed (X), or missing.
Table "size" (Size Bands by Geography)
General construction-enterprise data by firm-size band from SIDRA table 10441 (Brazil, regions, and states, all firms). State rows cover firms with five or more workers only, because SIDRA does not publish state figures for the total and 1-4 bands. Keeps the 16 level variables; the 16 share variables (percentual do total geral) are dropped because users can derive them. Coverage: 2024-present.
- year
Reference year.
- source_table
SIDRA table supplying the observation (10441).
- geography_type
Geographic level: brazil, region, or state.
- geography_code
IBGE code for the geographic unit; interpret together with geography_type.
- geography_name
Geographic unit name in Portuguese.
- size_band
Firm-size band: total, 1_4, or 5_plus (states: 5_plus only).
- variable_id
SIDRA variable ID.
- variable
English series identifier (e.g. firms, employment, wages, construction_output).
- variable_name_pt
Original IBGE variable label in Portuguese.
- unit
Original IBGE unit, including thousand reais (Mil Reais) where specified.
- value
Observed value in the original unit; NA when the cell is not applicable, not available, or suppressed.
- value_raw
Original SIDRA cell text.
- value_status
Cell status: observed, zero (SIDRA -), not_applicable (..), not_available (...), suppressed (X), or missing.
Table "state" (Large Firms by State)
Employment, wages, costs, and output for construction firms with five or more workers from SIDRA table 10442 (Brazil, regions, and states). The geography_basis column records whether the variable follows headquarters (13807, origem-sede) or work location (all other variables, local de atuação). Coverage: 2024-present.
- year
Reference year.
- source_table
SIDRA table supplying the observation (10442).
- geography_type
Geographic level: brazil, region, or state.
- geography_code
IBGE code for the geographic unit; interpret together with geography_type.
- geography_name
Geographic unit name in Portuguese.
- geography_basis
Geographic meaning: headquarters (variable 13807) or work_location (all other variables).
- variable_id
SIDRA variable ID.
- variable
English series identifier (e.g. employment, wages, construction_output). construction_and_development_costs (1245) includes development costs and differs from construction_costs in the other tables.
- variable_name_pt
Original IBGE variable label in Portuguese.
- unit
Original IBGE unit, including thousand reais (Mil Reais) where specified.
- value
Observed value in the original unit; NA when the cell is not applicable, not available, or suppressed.
- value_raw
Original SIDRA cell text.
- value_status
Cell status: observed, zero (SIDRA -), not_applicable (..), not_available (...), suppressed (X), or missing.
Source
IBGE - Pesquisa Anual da Indústria da Construção
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Parse /dca items into the FINBRA long form
Description
items holds one list per item (jsonlite::fromJSON(simplifyVector = FALSE) outlines), with fields exercicio, cod_ibge, uf,
instituicao, coluna, cod_conta, valor. The API column labels
follow the 2014+ vocabulary for every year. The result carries the
attribute reporters: <code_muni> <exercicio> keys of every item,
any account; and the attribute context from the current-revenue and
tax-revenue items (gross column only). The API's populacao field is
ignored: population comes from IBGE (see
fetch_siconfi_population()).
Usage
parse_siconfi_dca(items, call = caller_env())
PIM-PF Construction-input Production Index
Description
Linked monthly physical-production index for inputs typically used in construction.
Retrieve this dataset with get_dataset() using the name "pim_pf_construction".
pim_pf_construction <- get_dataset("pim_pf_construction")
Details
-
Source: IBGE - Pesquisa Industrial Mensal - Produção Física
-
Geography: Brazil
-
Frequency: monthly
-
Coverage: January 1991-present
-
Access mode:
materialized
The 1991-2011 series from SIDRA table 2294 is linked to table 8886 using their full 2012 overlap.
Columns
- date
First day of the reference month.
- variable
Series identifier: construction_inputs_production_index.
- reference_period
Reference period of the linked index: 2022 average = 100.
- source_table
SIDRA table supplying the observation: 2294 before 2012 and 8886 from 2012 onward.
- value
Linked physical-production index. Values before 2012 are rescaled by the ratio of the two source series' 2012 annual means.
Source
IBGE - Pesquisa Industrial Mensal - Produção Física
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
PNAD Contínua Housing
Description
Annual household tenure, dwelling type, household size, and domestic-unit composition estimates from PNAD Contínua.
Retrieve this dataset with get_dataset() using the name "pnad_housing".
pnad_housing <- get_dataset("pnad_housing")
pnad_housing_dwelling_type <- get_dataset("pnad_housing", table = "dwelling_type")
Details
-
Source: IBGE - Pesquisa Nacional por Amostra de Domicílios Contínua anual
-
Geography: Brazil, geographic regions, states, state capitals, published metropolitan regions, and published integrated-development regions
-
Frequency: annual
-
Coverage: 2016-2025 for housing-module tables, excluding 2020-2021; 2012-2025 for household composition
-
Access mode:
materialized -
Tables:
"tenure","dwelling_type","household_size","mean_household_size","household_composition"(default:"tenure")
Counts remain in thousand households, percentages remain on a 0-100 scale, and coefficients of variation are separate measures. Total categories coexist with component categories and must be excluded before summing components. Housing-module tables have no 2020-2021 observations. Household composition describes relationships to the reference person, not a number of families; its published count rows are restricted to total reference-person sex. Geography labels retain the boundary-vintage text published by IBGE.
Columns
All tables share the structure below; the table argument filters which
series are returned.
- year
Reference year.
- source_table
SIDRA table supplying the observation.
- geography_type
Geographic level: brazil, region, state, capital, metropolitan_region, or integrated_development_region.
- geography_code
IBGE code for the geographic unit; interpret together with geography_type.
- geography_name
Geographic unit name in Portuguese, including the source boundary-vintage text.
- geography_level_name
Original SIDRA geographic-level label in Portuguese.
- classification_id
SIDRA classification ID; missing for mean_household_size.
- category_id
SIDRA category ID; missing for mean_household_size.
- category
Stable English category identifier; missing for mean_household_size.
- category_name_pt
Original SIDRA category label in Portuguese; missing for mean_household_size.
- variable_id
SIDRA variable ID.
- variable
Stable English measure identifier.
- variable_name_pt
Original IBGE variable label in Portuguese.
- unit
Original IBGE unit: Mil unidades, Pessoas, or percent.
- value
Observed value in the original unit; NA when the cell is not applicable, not available, suppressed, or missing.
- value_raw
Original SIDRA cell text.
- value_status
Cell status: observed, zero, not_applicable, not_available, suppressed, or missing.
Source
IBGE - Pesquisa Nacional por Amostra de Domicílios Contínua anual
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
rppi,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
Query a Large Dataset Lazily
Description
Opens a large dataset as one or more lazy DuckDB tables. No observations
enter R memory until the query is explicitly collected with
dplyr::collect(). Related tables returned in the same catalog share one
database connection and can be joined with standard dplyr verbs.
Usage
query_dataset(name, table = NULL, version = "latest", quiet = FALSE)
Arguments
name |
Character. Dataset identifier. See |
table |
Character or |
version |
Character. Immutable dataset version, or |
quiet |
Logical. If |
Value
If table is supplied, a closable lazy dbplyr table. Otherwise,
a realestatebr_query_dataset catalog containing named lazy tables. Close
either result explicitly with close() when it is no longer needed.
See Also
get_dataset() for datasets returned directly in memory.
Examples
cno <- query_dataset("cno")
on.exit(close(cno))
constructions_sp <- cno$constructions |>
dplyr::filter(.data$state == "SP")
result <- constructions_sp |>
dplyr::inner_join(cno$areas, by = "cno") |>
dplyr::collect()
Read one FINBRA "Receitas Orçamentárias (Anexo I-C)" bulk file
Description
path may be a .csv or a .zip whose single CSV entry is read; the
exercise year comes from the Exercício: metadata line, never from
file names. The files are Windows-1252 (latin1) ;-separated text
whose quoted account names may contain unescaped " and even ;, so
no standard CSV reader is used: rows are identified by the fields read
from the end of the line (Valor, then Identificador da Conta), and
tax rows must keep exactly 8 fields.
Usage
read_finbra_file(path, call = caller_env())
Value
A tibble of tax rows in the long form (columns year,
code_muni (character, 7 digits), abbrev_state, institution,
tax, value_kind, value), carrying the attribute reporters:
character keys <code_muni> <year> of every municipality that has a
valid data line in the file (any account), not only tax rows; and
the attribute context: one tibble row per municipality-year with
current_revenue and tax_revenue (the gross realized values of
the Current Revenue and Taxes, Fees and Contributions accounts). The
file's População field is ignored: population comes from IBGE (see
fetch_siconfi_population()).
Convert Registry to Tibble
Description
Internal function to convert the nested YAML registry structure to a flat tibble suitable for display and filtering.
Usage
registry_to_tibble(registry)
Arguments
registry |
List containing the parsed YAML registry |
Value
A tibble with dataset information
Resolve BCB Hierarchy Level to Series Codes
Description
Maps a hierarchy level name to a vector of BCB series codes. The levels are cumulative: "primary" includes all "core" series, "secondary" includes all "primary" series, and so on.
Usage
resolve_bcb_hierarchy(table)
Arguments
table |
Character. One of "core", "primary", "secondary", "tertiary", "full", or "all". |
Value
Integer vector of BCB series codes.
Brazilian Residential Property Price Indices
Description
Brazilian residential property price indices from every major publisher.
Retrieve this dataset with get_dataset() using the name "rppi".
rppi <- get_dataset("rppi")
rppi_ivgr <- get_dataset("rppi", table = "ivgr")
Details
-
Source: Multiple (FIPE/ZAP, IVGR, IGMI, IQA, IQAIW, IVAR, SECOVI-SP)
-
Geography: Brazil
-
Frequency: monthly
-
Coverage: varies by index
-
Access mode:
materialized -
Tables:
"fipezap","ivgr","igmi","iqa","iqaiw","ivar","secovi_sp","sale","rent","all"(default:"fipezap")
Index methodologies vary by source; base periods normalized where possible.
Table "fipezap" (FIPE-ZAP Index)
FIPE-ZAP residential property price index. This is the default table. Coverage: Major cities.
- date
Reference month.
- name_muni
City name or aggregate (e.g. Índice Fipezap).
- market
Market segment: residential or commercial.
- rent_sale
Transaction type: sale or rent.
- variable
Measure: index, chg, acum12m, price_m2, or yield.
- rooms
Number of bedrooms (total, 1, 2, 3, or 4).
- value
Value of the measure.
Table "ivgr" (IVGR - Índice de Valores Gerais Residenciais)
General residential values index. Coverage: National.
- date
Reference month.
- name_geo
Geographic area (Brazil).
- index
Price index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "igmi" (IGMI - Índice Geral do Mercado Imobiliário)
General real estate market index. Coverage: São Paulo.
- date
Reference month.
- name_muni
City name or national aggregate.
- index
Price index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "iqa" (IQA - Índice QuintoAndar)
QuintoAndar rent price index. Coverage: Major cities.
- date
Reference month.
- name_muni
City name.
- index
Rent index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "iqaiw" (IQAIW - Índice QuintoAndar ImovelWeb)
QuintoAndar ImovelWeb hedonic rent price index. Coverage: Major cities (6 cities).
- date
Reference month.
- name_muni
City name.
- rooms
Number of bedrooms (total, 1, 2, 3, or 4).
- index
Rent index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "ivar" (IVAR - Índice de Valores de Aluguéis Residenciais)
Residential rent values index. Coverage: National.
- date
Reference month.
- name_muni
City name or national aggregate.
- index
Rent index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "secovi_sp" (SECOVI-SP Index)
São Paulo real estate syndicate index. Coverage: São Paulo.
- date
Reference month.
- name_muni
City name (São Paulo).
- index
Rent index level.
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "sale" (Stacked Sale Indices)
Harmonized combination of all sale-related indices with source column.
- source
Index source: IVG-R, IGMI-R, or FipeZap.
- date
Reference month.
- name_muni
City name or aggregate (e.g. Brazil).
- index
Price index level (each source has its own base period).
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "rent" (Stacked Rent Indices)
Harmonized combination of all rent-related indices with source column.
- source
Index source: IVAR, IQAIW, or FipeZap.
- date
Reference month.
- name_muni
City name or aggregate (e.g. Brazil).
- index
Rent index level (each source has its own base period).
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
Table "all" (All Indices Combined)
Complete stacked dataset with transaction_type indicator.
- source
Index source (e.g. IVG-R, IGMI-R, IVAR, IQAIW, FipeZap).
- date
Reference month.
- name_muni
City name or aggregate (e.g. Brazil).
- index
Index level (each source has its own base period).
- chg
Month-on-month change of the index.
- acum12m
Accumulated 12-month change of the index.
- transaction_type
Transaction type: sale or rent.
Source
Multiple (FIPE/ZAP, IVGR, IGMI, IQA, IQAIW, IVAR, SECOVI-SP)
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi_bis,
secovi,
siconfi_taxes,
sinapi
BIS Residential Property Price Indices
Description
International residential property price indices from Bank for International Settlements.
Retrieve this dataset with get_dataset() using the name "rppi_bis".
rppi_bis <- get_dataset("rppi_bis")
rppi_bis_detailed_monthly <- get_dataset("rppi_bis", table = "detailed_monthly")
Details
-
Source: Bank for International Settlements
-
Geography: International (60+ countries including Brazil)
-
Frequency: quarterly
-
Coverage: 1970-present (varies by country)
-
Access mode:
materialized -
Tables:
"selected","detailed_monthly","detailed_quarterly","detailed_annual","detailed_halfyearly"(default:"selected")
International data; minimal translation needed.
Table "selected" (Selected Series)
Core RPPI series for major countries. This is the default table.
- date
Reference quarter (first day of the quarter).
- ref_area_code
Country or area code (aggregates use BIS codes such as 4T).
- ref_area_name
Country or area name.
- unit
Measure: index (2010 = 100) or yoy_chg (year-on-year change, percent).
- unit_name
Full description of the unit of measure.
- is_nominal
1 for nominal series, 0 for CPI-deflated (real) series.
- series_code
BIS series identifier.
- value
Series value.
Table "detailed_monthly" (Detailed Monthly)
Monthly detailed RPPI data.
- date
Reference period.
- year
Reference year.
- series_code
BIS series identifier.
- ref_area_code
Country or area code.
- ref_area_name
Country or area name.
- covered_area_code
Covered area code.
- covered_area_name
Covered area (e.g. whole country, capital city).
- re_type_code
Property type code.
- re_type_name
Property type (e.g. all types, new or existing dwellings).
- re_vintage_code
Property vintage code.
- re_vintage_name
Property vintage (new versus existing).
- compiling_org_code
Compiling organisation code.
- compiling_org_name
Compiling organisation.
- priced_unit_code
Priced unit code.
- priced_unit_name
Priced unit (e.g. dwelling, square metre).
- value
Series value.
- collection_collection_indicator
How the value is collected (e.g. end of period, average of observations).
The monthly, quarterly, and half-yearly tables add a period column
(month, quarter, or semester), seas_adjust_code and
seas_adjust_name for seasonal adjustment, and
obs_status_observation_status (e.g. normal value, break, missing). The
monthly and quarterly tables also add
obs_pre_break_pre_break_observation, the value before a series break.
Table "detailed_quarterly" (Detailed Quarterly)
Quarterly detailed RPPI data.
- date
Reference period.
- year
Reference year.
- series_code
BIS series identifier.
- ref_area_code
Country or area code.
- ref_area_name
Country or area name.
- covered_area_code
Covered area code.
- covered_area_name
Covered area (e.g. whole country, capital city).
- re_type_code
Property type code.
- re_type_name
Property type (e.g. all types, new or existing dwellings).
- re_vintage_code
Property vintage code.
- re_vintage_name
Property vintage (new versus existing).
- compiling_org_code
Compiling organisation code.
- compiling_org_name
Compiling organisation.
- priced_unit_code
Priced unit code.
- priced_unit_name
Priced unit (e.g. dwelling, square metre).
- value
Series value.
- collection_collection_indicator
How the value is collected (e.g. end of period, average of observations).
Table "detailed_annual" (Detailed Annual)
Annual detailed RPPI data.
- date
Reference period.
- year
Reference year.
- series_code
BIS series identifier.
- ref_area_code
Country or area code.
- ref_area_name
Country or area name.
- covered_area_code
Covered area code.
- covered_area_name
Covered area (e.g. whole country, capital city).
- re_type_code
Property type code.
- re_type_name
Property type (e.g. all types, new or existing dwellings).
- re_vintage_code
Property vintage code.
- re_vintage_name
Property vintage (new versus existing).
- compiling_org_code
Compiling organisation code.
- compiling_org_name
Compiling organisation.
- priced_unit_code
Priced unit code.
- priced_unit_name
Priced unit (e.g. dwelling, square metre).
- value
Series value.
- collection_collection_indicator
How the value is collected (e.g. end of period, average of observations).
Table "detailed_halfyearly" (Detailed Half-yearly)
Half-yearly detailed RPPI data.
- date
Reference period.
- year
Reference year.
- series_code
BIS series identifier.
- ref_area_code
Country or area code.
- ref_area_name
Country or area name.
- covered_area_code
Covered area code.
- covered_area_name
Covered area (e.g. whole country, capital city).
- re_type_code
Property type code.
- re_type_name
Property type (e.g. all types, new or existing dwellings).
- re_vintage_code
Property vintage code.
- re_vintage_name
Property vintage (new versus existing).
- compiling_org_code
Compiling organisation code.
- compiling_org_name
Compiling organisation.
- priced_unit_code
Priced unit code.
- priced_unit_name
Priced unit (e.g. dwelling, square metre).
- value
Series value.
- collection_collection_indicator
How the value is collected (e.g. end of period, average of observations).
Source
Bank for International Settlements
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
secovi,
siconfi_taxes,
sinapi
RPPI Helper Functions
Description
Internal helper functions to reduce code duplication in RPPI functions. These are not exported and only used internally.
SECOVI-SP Real Estate Market Data
Description
São Paulo real estate market indicators including condominium fees, rentals, launches, and sales.
Retrieve this dataset with get_dataset() using the name "secovi".
secovi <- get_dataset("secovi")
secovi_condo <- get_dataset("secovi", table = "condo")
Details
-
Source: SECOVI-SP - Sindicato da Habitação
-
Geography: São Paulo
-
Frequency: monthly
-
Coverage: 2004-present (varies by category)
-
Access mode:
materialized -
Tables:
"condo","rent","launch","sale"(default:"all")
Regional classifications are specific to the São Paulo metropolitan area.
SECOVI no longer publishes indicators 25 (launches_rmsp) and 118
(sales_rmsp), so they are not returned.
Columns
All tables share the structure below; the table argument filters which
series are returned.
- date
Reference month.
- category
Market segment: condo, rent, launch, or sale.
- variable
Indicator within the category (e.g. icon, default_condominio, acao_locaticia).
- name
Breakdown dimension of the indicator (region, property type, or total).
- value
Indicator value; unit varies by variable.
Source
SECOVI-SP - Sindicato da Habitação
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
siconfi_taxes,
sinapi
Show Dataset Import Message
Description
Reports the dataset, the table served, and the source that answered, in a single message. Datasets resolved to their default table also list the other tables available.
Usage
show_import_message(name, table_info, tier)
Arguments
tier |
Character. One of "memo", "github", or "fresh". |
Municipal IPTU and ITBI Tax Revenue
Description
Annual municipal IPTU and ITBI revenue in nominal BRL from SICONFI/FINBRA DCA Annex I-C, 2013-present, with the 2018 account-vintage break marked by account_scope; the Distrito Federal (5300108) is excluded because it reports IPTU and ITBI only in its state-level accounts.
Retrieve this dataset with get_dataset() using the name "siconfi_taxes".
siconfi_taxes <- get_dataset("siconfi_taxes")
Details
-
Source: Tesouro Nacional - SICONFI (DCA, Anexo I-C), FINBRA bulk files, and IBGE population
-
URL: https://apidatalake.tesouro.gov.br/ords/siconfi/tt/entes
-
Geography: Brazilian municipalities
-
Frequency: annual
-
Coverage: 2013-latest closed year
-
Access mode:
materialized
This dataset is cache-only: it is rebuilt by data-raw/siconfi/build_snapshot.R from the maintainer's local FINBRA bulk files (never in the repository) plus an API refresh of the latest years, so source='fresh' and the fresh half of source='auto' do not apply. Values are nominal BRL with a decimal-comma source parsed to the cent; the 2013 FINBRA files include municipalities that filed QDCC instead of DCA (São Paulo among them), accepted as published. The 2018 PCASP recode folds fines and old-debt lines into the tax parents, so the pre-2018 tax line is not comparable with the post-2018 tax family; account_scope marks the break and no cross-break total is reconstructed. The Distrito Federal (5300108) is excluded from the municipality universe because it reports IPTU and ITBI in its state-level accounts and never in the municipal files. FUNDEB and constitutional-transfer deduction columns never feed the tax deductions. A municipality-year-tax with an observed gross row but no deduction row counts the deduction as zero and computes net_revenue; deductions_reported records whether a deduction row existed in the source. Municipalities absent from a year's FINBRA file appear as non-reporters with reported=FALSE and NA tax and revenue values; population does not depend on reporting. population and the two revenue totals are the municipality-year context: population comes from IBGE (yearly estimates until 2021 and from 2024, the 2022 Census count, and a 2023 midpoint interpolation; FINBRA's População field is stale and lagged, so it is never used), it fills non-reporter rows too, and population_source records where it came from; both revenue totals are gross, before deductions, and the totals switch source for refreshed API years.
Columns
- code_muni
Seven-digit IBGE municipality code, geobr-compatible.
- abbrev_state
Two-letter state abbreviation as published by the source.
- year
Exercise year, 2013 to the latest closed year.
- population
Integer resident population from IBGE, independent of SICONFI reporting; repeated on both tax rows. The yearly estimate (SIDRA table 6579) for the other years, the 2022 Census count (table 4709) for 2022, and a 2023 midpoint between the 2022 Census and the 2024 estimate; NA when IBGE has no figure for the year. The 2022 Census count sits well below the 2021 estimate in many municipalities, so per-capita series break in 2022.
- population_source
How population was obtained: estimate (yearly IBGE estimate, table 6579), census (2022 Census count, table 4709), or interpolated (2023 midpoint of the census and the 2024 estimate); NA when population is NA.
- current_revenue
Gross realized total current revenue (Receitas Correntes) in nominal BRL for the municipality-year, before any deduction; repeated on both tax rows. From FINBRA, replaced by the API values for refreshed years; NA when the municipality reported but lacks the account line.
- tax_revenue
Gross realized Impostos, Taxas e Contribuições de Melhoria (the whole tax group behind the IPTU and ITBI lines) in nominal BRL for the municipality-year, before deductions; repeated on both tax rows. From FINBRA, replaced by the API values for refreshed years; NA when the municipality reported but lacks the account line.
- tax
Tax identifier: iptu or itbi.
- reported
TRUE when the municipality appears in that year's data (FINBRA file or API refresh); non-reporters keep one NA row per tax.
- value_status
observed (tax row present), missing_tax_row (the municipality reported but this tax has no gross row), or non_reporter (absent from the year's data).
- gross_revenue
Realized gross tax-account value in nominal BRL; NA when the tax row is absent.
- other_deductions
Non-FUNDEB, non-transfer tax deductions in nominal BRL; 0 when the municipality-year-tax has an observed gross row but no deduction row in the source, otherwise the observed value, kept even when the gross row is missing.
- deductions_reported
TRUE when the source carried a deduction row for the municipality-year-tax; FALSE when only a gross row exists and the deduction is assumed 0; NA when the source has neither row.
- net_revenue
Gross revenue minus deductions, rounded to cents, computed whenever the gross row exists (an assumed 0 deduction is subtracted).
- account_scope
Account-vintage scope: legacy_line (IPTU and ITBI shown on separate account lines) through 2017, tax_family (post-2018 PCASP parents that fold in fines and old-debt lines) from 2018. Do not build a single constant-scope series across 2017-2018.
- source
Row provenance: finbra (bulk-file history) or api (SICONFI API refresh of the latest years); NA for non-reporter rows.
Source
Tesouro Nacional - SICONFI (DCA, Anexo I-C), FINBRA bulk files, and IBGE population
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
sinapi
SINAPI Construction Costs and Indices
Description
Monthly construction costs, cost indices, and percentage changes, with and without payroll-tax relief.
Retrieve this dataset with get_dataset() using the name "sinapi".
sinapi <- get_dataset("sinapi")
Details
-
Source: IBGE - Sistema Nacional de Pesquisa de Custos e Índices da Construção Civil
-
Geography: Brazil, geographic regions, and states
-
Frequency: monthly
-
Coverage: March 1986-present (varies by variable and payroll-relief treatment)
-
Access mode:
materialized
Payroll-relief series come from SIDRA table 2296 and series without payroll relief from table 6586. The R$/m² level starts in September 2012 with relief and January 2017 without relief; earlier coverage applies only to index variables.
Columns
- date
First day of the reference month.
- geography_type
Geographic level: brazil, region, or state.
- geography_code
IBGE code for the geographic unit; interpret together with geography_type.
- geography_name
Geographic unit name in Portuguese.
- payroll_relief
Whether the series includes payroll-tax relief (desoneração da folha de pagamento).
- variable
Series identifier: cost, materials_cost, labor_cost, cost_index, materials_index, labor_index, monthly_change, year_to_date_change, or twelve_month_change.
- variable_label
Original IBGE variable label in Portuguese.
- unit
Original IBGE unit: Reais for costs, Número-índice for indices, and a percent sign for changes.
- value
Observed value. Missing, unavailable, and suppressed observations are omitted.
Source
IBGE - Sistema Nacional de Pesquisa de Custos e Índices da Construção Civil
See Also
get_dataset(), query_dataset(), list_datasets(), get_dataset_info()
Other datasets:
abecip,
abrainc,
bcb_realestate,
bcb_series,
cement,
cno,
fgv_ibre,
mcmv,
paic,
pim_pf_construction,
pnad_housing,
rppi,
rppi_bis,
secovi,
siconfi_taxes
Standardize RPPI Structure
Description
Standardize RPPI Structure
Usage
standardize_rppi_structure(dat)
Arguments
dat |
Input tibble from any RPPI source |
Value
Standardized tibble with consistent columns
Check if Internal Function Supports table="all"
Description
Check if Internal Function Supports table="all"
Usage
supports_table_all(func_name)
Test function to verify encoding patterns work correctly
Description
Test function to verify encoding patterns work correctly
Usage
test_encoding_patterns()
Validate Abecip Data
Description
Validate Abecip Data
Usage
validate_abecip_data(data, type)
Arguments
data |
Data frame to validate |
type |
Type of data ("sbpe" or "units") |
Value
NULL (validates or errors)
Validate and Resolve Table Parameter
Description
Validate and Resolve Table Parameter
Usage
validate_and_resolve_table(name, dataset_info, table = NULL)
Generic Data Validation
Description
Validates basic dataset requirements. Consolidates validation logic used across all dataset functions.
Usage
validate_dataset(
data,
dataset_name,
required_cols = "date",
min_rows = 1,
check_dates = TRUE,
max_future_days = 90
)
Arguments
data |
Data frame or tibble. The dataset to validate. |
dataset_name |
Character. Name of dataset for error messages. |
required_cols |
Character vector. Required column names. Default is "date". |
min_rows |
Integer. Minimum expected number of rows. Default 1. |
check_dates |
Logical. Whether to validate date column. Default TRUE. |
max_future_days |
Integer. Maximum days in future allowed for dates. Default 90. |
Value
Invisible TRUE if all validations pass. Errors or warns otherwise.
Generic Parameter Validation for Dataset Functions
Description
Validates common parameters used across all dataset functions.
Usage
validate_dataset_params(
table,
valid_tables,
quiet,
max_retries,
allow_all = TRUE
)
Arguments
table |
Character. The table parameter to validate. |
valid_tables |
Character vector. Valid table names for the dataset. |
quiet |
Logical. Whether to suppress messages. |
max_retries |
Numeric. Maximum number of retry attempts. |
allow_all |
Logical. Whether "all" is a valid table value. Default TRUE. |
Value
Invisible TRUE if all validations pass. Errors otherwise.
Validate the built siconfi_taxes table
Description
Checks the published schema (column names, order and types for every
column), integer 7-digit municipality codes, unique code_muni x year x
tax keys, the documented tax, value_status, account_scope and
population_source domains, NA values and source on non-reporter rows
(population is exempt: it is independent of reporting, with its source
NA exactly when it is NA), and the gross-minus-deductions net identity.
Usage
validate_siconfi_taxes(data, call = caller_env())