MyNixOS website logo
Description

Import Brazilian Real Estate Data into R.

Provides access to Brazilian real estate market data from multiple official sources: the Central Bank of Brazil (BCB), the Brazilian Association of Real Estate Developers (ABRAINC), the Brazilian Association of Real Estate Credit and Savings Entities (ABECIP), the Getulio Vargas Foundation (FGV), and the Bank for International Settlements (BIS).

realestatebr: Brazilian Real Estate Data in R

realestatebr aims to provide an unified interface to Brazilian real estate information, delivering data from different sources in a tidy format. The package is organized by source, with each source having multiple associated tables (datasets).

All datasets are returned as tibble objects. The package is centered around a key function: get_dataset(name, table) which retrieves any dataset by name.

Installation

# Install the development version from GitHub
# install.packages("remotes")
remotes::install_github("viniciusoike/realestatebr")

Quick Start

There are two key functions in realestatebr: get_dataset() and list_datasets(). The former retrieves data, while the latter lists all available datasets. get_dataset() expects a name and a (optional) table argument. If no table is specified, the function returns the first available table.

library(realestatebr)

# Discover available datasets
datasets <- list_datasets()

# Get specific table
sbpe <- get_dataset(name = "abecip", table = "sbpe")

# Get property price indices
fipezap <- get_dataset("rppi", "fipezap")

Available Datasets

The package acts as a convenient wrapper around public data sources. All data is provided in a tidy format in a tibble object. Datasets are updated weekly or monthly, depending on the source.

DatasetSourceTablesStatus
abecipABECIPsbpe, units, cgiActive
abraincABRAINC / FIPEindicator, radar, leadingActive
bcb_realestateBanco Central do Brasilaccounting, application, indices, sources, unitsActive
bcb_seriesBanco Central do Brasilprice, credit, production, interest-rate, exchange, government, real-estateActive
fgv_ibreFGV IBREActive
rppiFIPE/ZAP, IVGR, IGMI, IQA, IVAR, SECOVI-SPsale, rent, fipezap, ivgr, igmi, iqa, iqaiw, ivar, secovi_spActive
rppi_bisBank for International Settlementsselected, detailed_monthly, detailed_quarterlyActive
secoviSECOVI-SPcondo, rent, launch, saleActive

Data Sources

The source parameter controls where data comes from.

# Auto (default): in-session memo -> GitHub release -> fresh download
data <- get_dataset("abecip")

# Pre-processed asset from the package's GitHub release
data <- get_dataset("abecip", source = "github")

# Fresh download from the original source
data <- get_dataset("abecip", source = "fresh")

Repeated calls within one R session are served from an in-memory memo. Use clear_session_cache() to drop the memo without restarting R.

Example: Property Price Indices

library(ggplot2)
library(realestatebr)
library(dplyr)

# Get FipeZap index
fipezap <- get_dataset("rppi", table = "fipezap")

# Brazil national index
rppi_spo <- fipezap |>
  filter(
    name_muni == "São Paulo",
    market == "residential",
    rooms == "total",
    variable == "acum12m",
    date >= as.Date("2019-01-01")
  )

ggplot(rppi_spo, aes(x = date, y = value, color = rent_sale)) +
  geom_line(lwd = 0.8) +
  geom_hline(yintercept = 0) +
  scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
  scale_y_continuous(labels = seq(-0.05, 0.15, by = 0.05) * 100, ) +
  labs(
    title = "Brazil Property Price Index",
    x = NULL,
    y = "YoY chg. (%)",
    color = ""
  ) +
  theme_minimal() +
  theme(
    legend.position = "bottom",
    palette.colour.discrete = c("#1E3A5F", "#4A90C2", "#2C7A7B")
  )

International Comparison

# Get BIS international data
bis <- get_dataset("rppi_bis")

# Compare countries
bis_compare <- bis |>
  filter(
    reference_area %in% c("Brazil", "United States", "Japan"),
    is_nominal == FALSE,
    unit == "Index, 2010 = 100",
    date >= as.Date("2010-01-01")
  )

ggplot(bis_compare, aes(x = date, y = value, color = reference_area)) +
  geom_line(lwd = 0.8) +
  geom_hline(yintercept = 100) +
  labs(
    title = "Real Property Prices - International",
    x = NULL,
    y = "Index (2010 = 100)",
    color = ""
  ) +
  theme_minimal() +
  theme(
    legend.position = "bottom",
    palette.colour.discrete = c("#1E3A5F", "#4A90C2", "#2C7A7B")
  )

Learn More

Metadata

Version

1.0.1

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows