realestatebr 1.0.0

Breaking changes

Changes to bcb_series

Changes to rppi

Bug fixes

Internal changes

CI / pipeline

Documentation

realestatebr 0.6.1

CRAN Submission Fixes

realestatebr 0.6.0 (2025-11-09)

Cache Freshness Detection (Phase 2)

Version 0.6.0 introduces an intelligent cache freshness detection system with relaxed defaults to avoid annoying users with unnecessary warnings.

New Features

Cache Age Tracking

Relaxed Warning Thresholds

Cache warnings only appear when data is significantly stale (exceeds 2x the update frequency): - Weekly datasets: warn after 14 days (not 7) - Monthly datasets: warn after 60 days (not 30) - Manual datasets: never warn

Advanced Cache Control

Registry Enhancements

All datasets in inst/extdata/datasets.yaml now include: - update_schedule: “weekly”, “monthly”, or “manual” - warn_after_days: Custom threshold for staleness warnings (NULL for manual datasets)

Examples

# Check status of all cached datasets
check_cache_status()

# Get age of specific dataset
get_cache_age("bcb_series")

# Check if dataset is stale (uses relaxed defaults from registry)
is_cache_stale("bcb_series")

# Advanced: Force very fresh data (< 1 day old)
get_dataset("bcb_series", max_age = 1)

# Advanced: Only use cache if less than 3 days old
get_dataset("rppi", table = "sale", max_age = 3)

Tests

Code Simplification: Logic Consolidation (Phase 3)

Generic Helper Functions

Version 0.6.0 introduces 7 generic helper functions that consolidate 890 lines of repetitive code patterns across dataset functions.

What Changed

File-by-File Results

File Before After Lines Saved % Reduction
get_abecip_indicators.R 551 431 120 21.8%
get_abrainc_indicators.R 544 445 99 18.2%
get_secovi.R 438 356 82 18.7%
get_bcb_series.R 334 278 56 16.8%
get-dataset.R 833 773 60 7.2%
TOTAL 2,700 2,283 417 15.4%

New Helper Functions

  1. validate_dataset_params() (R/helpers-dataset.R)
  2. handle_dataset_cache() (R/helpers-dataset.R)
  3. attach_dataset_metadata() (R/helpers-dataset.R)
  4. validate_dataset() (R/helpers-dataset.R)
  5. validate_excel_file() (R/helpers-dataset.R)
  6. download_with_retry() (R/rppi-helpers.R - REUSED)
  7. apply_table_filtering() (R/get-dataset.R)

Files Changed

Rationale

See .claude/phase3_completion_summary.md for complete details.


BREAKING CHANGES: API Simplification (Phase 2)

Removed Deprecated Function Exports

Version 0.6.0 removes 8 deprecated functions from the public API. These functions are now internal-only.

What Changed

Removed from NAMESPACE: 8 deprecated functions no longer exported: - get_abecip_indicators() - get_abrainc_indicators() - get_bcb_realestate() - get_bcb_series() - get_fgv_ibre() - get_nre_ire() - get_rppi_bis() - get_secovi()

Impact

Migration

These functions were deprecated in v0.4.0 (18+ months ago). Users must now use get_dataset():

# Old way (NO LONGER WORKS):
data <- get_secovi()
data <- get_bcb_series(table = "price")
data <- get_abecip_indicators(table = "sbpe")

# New way (REQUIRED):
data <- get_dataset("secovi")
data <- get_dataset("bcb_series", "price")
data <- get_dataset("abecip", "sbpe")

Rationale

Code Clarity Improvements

Renamed Confusing “Legacy” Terminology

Files changed: R/get-dataset.R

CBIC Code Simplification and Table Availability

Code Reduction (~223 lines, 11% smaller)

Table Availability Fixed

Rationale

Files changed: R/get_cbic.R


BREAKING CHANGES: Documentation Simplification (Phase 1)

Removed Examples from Deprecated Functions

Version 0.6.0 removes usage examples from deprecated legacy functions to simplify the codebase. Since we are pre-1.0.0, this is an acceptable breaking change.

What Changed

Impact

Migration

These functions were deprecated in v0.4.0. Users should migrate to the modern API:

# Old way (still works, but no longer documented with examples):
data <- get_secovi()

# New way (recommended):
data <- get_dataset("secovi")

Full migration examples are available in each function’s @section Deprecation block.

Rationale


realestatebr 0.5.1

Bug Fixes

SECOVI Default Table Fix

Fixed SECOVI dataset to return all categories by default instead of only “condo”

# Now returns all categories by default
get_dataset("secovi")  # → 9,398 rows, 4 categories ✅

# Specific tables still work correctly
get_dataset("secovi", "launch")  # → 780 rows
get_dataset("secovi", "rent")    # → 2,779 rows
get_dataset("secovi", "sale")    # → 3,900 rows

Test Infrastructure Improvements

Pipeline Improvements


realestatebr 0.5.0

BREAKING CHANGES: User-Level Caching Architecture

Major Architectural Change

Version 0.5.0 introduces user-level caching, removing bundled datasets from the package to comply with CRAN’s 5MB size limit. This is a BREAKING CHANGE that affects how datasets are accessed.

What Changed

New Cache Behavior

# First use: downloads from GitHub releases to user cache
data <- get_dataset("abecip")  # Downloads once

# Subsequent uses: loads from user cache (instant, offline)
data <- get_dataset("abecip")  # Loads from ~/.local/share/realestatebr/

# Force fresh download from original source
data <- get_dataset("abecip", source = "fresh")  # Downloads and caches

# Explicit source selection
data <- get_dataset("abecip", source = "cache")   # User cache only
data <- get_dataset("abecip", source = "github")  # GitHub releases only

Auto Fallback Strategy (source = “auto”, default)

  1. User Cache: Check ~/.local/share/realestatebr/ (instant, offline)
  2. GitHub Releases: Download pre-processed data (requires piggyback package)
  3. Fresh Download: Download from original source (saves to user cache)

New Dependencies

New Functions

Migration Guide

For Users

# Install updated package
install.packages("realestatebr")  # or devtools::install_github()

# Install piggyback for GitHub downloads (recommended)
install.packages("piggyback")

# First use after update: will download datasets to user cache
data <- get_dataset("abecip")

# Check cache location
get_user_cache_dir()

# Manage cache
list_cached_files()           # See what's cached
clear_user_cache("abecip")    # Clear specific dataset
clear_user_cache()            # Clear all (with confirmation)

For Package Developers

Benefits

Deprecations

Files Changed


Targets Pipeline Fixes

Critical Pipeline Functionality

Enhanced Dataset Registry

Files Changed

Bug Fixes from Recent Commits

Property Records Simplification (Commit 9eab0ca)

BCB Dataset Critical Fixes (Commit bb580c8)

BCB Real Estate

BCB Series - Graceful Degradation (CRITICAL)

Get Dataset Infrastructure

Registry and Tests

Get Dataset Critical Fixes (Commit ce4768b)

CLI Message Scoping

FipeZap Data Quality

Property Records Table Extraction

Testing Infrastructure

Note on Vignettes


realestatebr 0.4.1

Bug Fixes

RPPI Individual Table Access

CRAN Compliance

Test Suite


realestatebr 0.4.0

Major Breaking Changes - API Consolidation

🎯 Unified Data Interface

This release implements a major breaking change that consolidates 15+ individual get_*() functions into a single, unified get_dataset() interface. This dramatically simplifies the package API while maintaining full functionality.

BREAKING CHANGE: All individual get_*() functions have been removed: - get_abecip_indicators(), get_abrainc_indicators(), get_rppi(), get_bcb_realestate(), etc. - Migration: Use get_dataset("dataset_name") instead

🔧 RPPI Code Simplification (Internal)

Major refactoring of RPPI functions for better maintainability: - 67% code reduction: 1579 lines → 519 lines (1060 lines removed) - Bug fix: FipeZap national index now correctly standardized to name_muni == "Brazil" - Shared helpers: Created rppi-helpers.R with common functions to eliminate duplication - Removed overhead: Eliminated unused stack parameter, cli_debug calls, and metadata attributes - Simplified documentation: Removed verbose sections (Progress Reporting, Error Handling, Examples) from internal functions - All functions now @keywords internal: Only get_dataset() is user-facing

Benefits: - Easier to maintain and debug - Faster execution (less overhead) - Consistent error handling across all indices - Bug fixes apply to all functions automatically

📊 CBIC Dataset - Partial Release (Cement Only)

Note: In v0.4.0, the CBIC dataset is limited to cement tables only (validated data). Steel and PIM tables will be added in v0.4.1.

Available in v0.4.0: - ✅ cement_monthly_consumption - Monthly cement consumption by state - ✅ cement_annual_consumption - Annual cement consumption by region - ✅ cement_production_exports - Production, consumption, and export data - ✅ cement_monthly_production - Monthly cement production by state - ✅ cement_cub_prices - CUB cement prices by state

Coming in v0.4.1: - ⏳ Steel prices and production data - ⏳ PIM industrial production indices

# Works in v0.4.0
get_dataset("cbic")  # Default: cement_monthly_consumption
get_dataset("cbic", "cement_cub_prices")

# Will error with informative message
get_dataset("cbic", "steel_prices")  # Deferred to v0.4.1

New Internal Architecture

📋 Simplified Public API

New unified interface:

# Get data from any dataset
data <- get_dataset("abecip")               # Default table
data <- get_dataset("abecip", table = "sbpe")  # Specific table
data <- get_dataset("rppi", table = "fipezap")  # Hierarchical access

# Discover datasets
datasets <- list_datasets()
info <- get_dataset_info("rppi")

Removed functions (now internal): - get_abecip_indicators()get_dataset("abecip") - get_abrainc_indicators()get_dataset("abrainc") - get_rppi()get_dataset("rppi") - get_bcb_realestate()get_dataset("bcb_realestate") - get_bcb_series()get_dataset("bcb_series") - Plus 10 more functions

🔧 Enhanced Data Access

🧪 Comprehensive Testing

Migration Guide

For Existing Code (Breaking Changes)

# OLD (0.3.x) - Will no longer work
data <- get_abecip_indicators(table = "sbpe")
data <- get_rppi(table = "fipezap")
data <- get_bcb_realestate(table = "all")

# NEW (0.4.0) - Required migration
data <- get_dataset("abecip", table = "sbpe")
data <- get_dataset("rppi", table = "fipezap")
data <- get_dataset("bcb_realestate", table = "all")

Dataset Name Mapping

Old Function New get_dataset() Name
get_abecip_indicators() "abecip"
get_abrainc_indicators() "abrainc"
get_rppi() "rppi"
get_bcb_realestate() "bcb_realestate"
get_bcb_series() "bcb_series"
get_rppi_bis() "rppi_bis"
get_secovi() "secovi"
get_fgv_indicators() "fgv_indicators"
get_b3_stocks() "b3_stocks"
get_nre_ire() "nre_ire"
get_cbic_*() "cbic"
get_itbi() "itbi"
get_property_records() "registro"

RPPI Consolidation

# OLD - Multiple functions
fipezap <- get_rppi_fipezap()
igmi <- get_rppi_igmi()
bis <- get_rppi_bis()

# NEW - Unified hierarchical access
fipezap <- get_dataset("rppi", table = "fipezap")
igmi <- get_dataset("rppi", table = "igmi")
bis <- get_dataset("rppi", table = "bis")

Technical Implementation

Internal Architecture

Backward Compatibility


This release represents a major architectural shift toward a unified, maintainable API. While it introduces breaking changes, the new interface is significantly simpler and more powerful.

Full Changelog: https://github.com/viniciusoike/realestatebr/compare/v0.3.0…v0.4.0


realestatebr 0.3.0

Major Features and Improvements

🎯 Phase 2: Data Pipeline Implementation Complete

📊 Enhanced Data Processing

🔧 Improved Function Reliability

🚀 Infrastructure Improvements

📈 New Data Sources

Technical Implementation

Targets Pipeline Architecture

Enhanced Error Handling

Data Quality Improvements

Migration Notes

For Existing Users

For Developers


This release establishes the foundation for automated data processing and validation, setting the stage for Phase 3 implementation with large dataset support.

Full Changelog: https://github.com/viniciusoike/realestatebr/compare/v0.2.0…v0.3.0


realestatebr 0.2.0

Major Features and Improvements

🎯 Phase 1 Modernization Complete

📊 New Unified Data Architecture

🔧 API Standardization

📈 New Data Sources

🚀 Performance and Reliability

🌐 Bilingual Support

Breaking Changes

Parameter Changes

Cache Location

Modernized Functions

Fully Modernized (13 functions)

Legacy Functions (Maintained)

Infrastructure Improvements

New Architecture Components

Developer Experience

Migration Guide

For Existing Code

# Old (deprecated but still works)
data <- get_abecip_indicators(category = "all")

# New (recommended)
data <- get_abecip_indicators(table = "all")

For New Code

# Discover available datasets
datasets <- list_datasets()

# Get data with unified interface
data <- get_dataset("abecip_indicators")

# Use modernized functions with progress
data <- get_abecip_indicators(table = "indicators", quiet = FALSE)

Technical Details

Dependencies

Performance


This release represents the completion of Phase 1 modernization, establishing a solid foundation for Phase 2 (data pipeline automation) and Phase 3 (large dataset support with DuckDB).

Full Changelog: https://github.com/viniciusoike/realestatebr/compare/v0.1.5…v0.2.0