Skip to contents

educabr2 0.1.0.9000 (development version)

CRAN-readiness polish plus two new themes (public expenditure and grade-progression). No breaking changes to existing get_*() signatures or to enrollment_kang_fgv / schooling_kang_fgv contents.

Overview tab and documentation corrections (2026-07-12)

  • New curated Overview tab in the Shiny dashboard, now the landing tab: four fixed story charts for non-technical audiences (secular expansion 1908-2024; public vs. private networks with the 1997/2005 regulatory landmarks annotated; the EAD share reaching majority in 2024; the 1983 gender reversal in schooling), with active titles, direct line labels, and no controls. The exploratory apparatus remains in the six thematic tabs.
  • Documentation correction (fact-checked against Walter & Kang 2024, Economic History of Developing Regions): the mean-years-of-schooling series refers to the population aged 15 to 64 (not 25+); get_schooling() and schooling_kang_fgv docs updated, and the state/region coverage (1950-2015) made explicit.

CI and documentation convergence (2026-07-11, second round)

  • Fixed the failing CI: showtext and sysfonts (used conditionally by theme_educabr()) are now declared in Suggests; ggplot2 was promoted from Suggests to Imports (the visualization components are public API); the %+replace% operator is now namespace-qualified.
  • Fixed the failing pkgdown build: the visualization functions (theme_educabr, scale_educabr, scale_x_year_educabr) are now listed in a “Visualization” group of the reference index.
  • New vignette visualization.Rmd documenting the plotting toolkit (theme, plot_titles, Okabe-Ito scales, historical year axis, palette reference).
  • Vignettes updated to match the current package: five-function API (with get_attainment() and a new international-comparison case), six dashboard tabs, the deduplication hierarchy, the dimension asymmetries, educabr_cite() demos, and the correct version.
  • README: six dashboard tabs, deduplication hierarchy and validation notes, fixed moved/404 URLs; dashboard About now points to the documentation site and mentions the visualization system and citation helpers.

Visualization system (2026-07-11)

  • New exported scale scale_x_year_educabr() — a year-axis scale for the century-long historical series that are the norm in the package. Break spacing follows the span of the data plotted (every 20 years beyond six decades, every 10 years for spans of 25–60 years, pretty() breaks below that); the first and last year present in the series are always labelled, and grid breaks that would collide with those extremes are dropped (tolerance proportional to the span).
  • The Shiny dashboard (live charts and the “View R code” snippets) now uses the package’s own visualization system — theme_educabr(), scale_colour_educabr() (Okabe-Ito, applied where the colour dimension has at most 8 levels), and scale_x_year_educabr() — instead of theme_minimal() and generic pretty breaks.

Source-key aliases (2026-07-11)

  • walter_kang_2024 is now accepted everywhere walter_kang_2023 is (all get_*() source filters and educabr_cite()), resolving to the same source. The peer-reviewed article is Walter & Kang (2024, Economic History of Developing Regions); the legacy 2023 key — minted when the source was still an FGV-IBRE working paper — remains the key carried by the data until the physical rename planned in planning/cran-checklist.md.

CI / build

  • Renamed vignettes from 01-introduction.Rmd / 02-introducao-pt.Rmd to introduction.Rmd / introducao-pt.Rmd — the numeric-prefix pattern triggered an R CMD check --as-cran WARNING about invalid file names in inst/doc, which had been breaking the CI matrix since the dashboard-tabs push. vignette("introduction", "educabr2") and vignette("introducao-pt", "educabr2") are now the canonical entry points (the pkgdown URLs follow the new names too).
  • inst/WORDLIST extended with the new technical vocabulary (GDR6, regressivity, Unitless, …) and the PT-BR terms introduced in Case 5 / Case 6 of the vignettes — spell check is clean again.

New themes & datasets

  • expenditure_kang_fgv — 1,170 rows. Public expenditure on education, Brazil, 1933-2010 (Kang & Menetrier 2024). Four indicators: expenditure_share_gdp, expenditure_per_student_pct_gdp_pc, and the two “double ratio” indicators of fiscal regressivity (expenditure_double_ratio_es_ef1, expenditure_double_ratio_es_ef_em).
  • progression_kang_fgv — 1,090 rows. Grade-progression ratio GDR6 (enrollment in grades 4-6 / grades 1-3 of the old eight-year primary system), BR + 20 UFs, 1955-2010 (Kang, Paese & Felix 2021).

New public API

  • get_expenditure() — long-format access to the public-expenditure series. Supports indicator aliases ("share_gdp", "per_student", "double_ratio_es_ef1", "double_ratio_es_ef_em").
  • get_progression() — long-format access to grade-progression indicators. Supports indicator alias "gdr6". Filters by geo_level / geo like get_enrollment().

Schema additions (additive only)

  • New level value: fundamental_medio (EF + EM combined; appears in expenditure data).
  • New unit values: percent_gdp and percent_gdp_per_capita (alongside the existing percent, ratio, years, count).
  • inst/dict/vocabularies/indicators.yaml gains entries for every indicator emitted by the new datasets, with PT-BR translations surfaced in inst/dict/i18n.yaml.

Dashboard

  • Two new navbar tabs: Public Expenditure and Grade Progression, built on top of get_expenditure() and get_progression(). Each tab carries the standard educabr2 layout — sidebar filters, series plot (plotly), table view (DT), source cards, CSV download, and a “View R code” modal that emits a reproducible educabr2 + ggplot2 + plotly snippet.

Other changes

  • list_sources() — new helper returning a tibble of every entry in the source vocabulary (key, short_name, type, coverage, DOI, URL, notes). Discovery counterpart to educabr_cite().
  • get_enrollment() / get_schooling(): examples now run during R CMD check (previously skipped with @examplesIf FALSE).
  • CI: added windows-latest, r: 'devel' to the R-CMD-check matrix — covers what check_win_devel() does, on every push.
  • Docs: .github/CONTRIBUTING.md, inst/WORDLIST for clean spell checks, abbreviation “anos inic.” → “anos iniciais” in enrollment_kang_fgv Rd table for readability.

educabr2 0.1.0

First public release. Initial set of harmonised long-run series on Brazilian education plus a bundled Shiny dashboard.

Datasets

  • enrollment_kang_fgv — 6,238 rows. Brazilian school enrollment counts and gross rates by stage (EF1, EF2, EF, EM, ES), 1933-2010 at national level and 1955-2010 at UF level, with breakdown by colour/race 1960-2010. Per-paper source attribution (kang_paese_felix_2021, kang_menetrier_2024, kang_menetrier_comim_2024).

  • enrollment_tertiary — 1,341 rows. Brazilian tertiary enrollment 1907-2024 compiled across seven primary sources: IBGE Estatísticas do Século XX, Durham (2005), Maduro Junior (2007), Kang/Paese/Felix (2021), INEP CENSUP Synopsis (1995-2008), INEP CENSUP Microdata (2009-2024), and the INEP CENSUP Power BI panel. Multiple sources per year-network are kept on purpose to support cross-source comparison. Includes 25 reconstructed total rows (is_derived = TRUE) that fill the 2000-2008 transition period where INEP published in-person and EAD enrollment separately.

  • schooling_kang_fgv — 2,287 rows. Mean years of schooling for the adult population, 1925-2015 (BR), 1950-2015 (region, UF), with sex and race breakdowns at BR level (Walter & Kang 2024).

API

  • get_enrollment() — long-format access to enrollment series with filters for level, network, institution_type, modality, year, geo_level/geo, dimension, indicator, source, include_derived. Returns the canonical schema with English labels (lang = "en") or PT-BR labels (lang = "pt").

  • get_schooling() — long-format access to the mean-years-of-schooling series with filters for year, geo_level/geo, dimension, source, lang.

  • run_dashboard() — launches the bundled Shiny dashboard locally.

  • educabr_cite() — builds bibentry objects (or APA-style prose, or BibTeX) for any of the harmonised data sources, driven by the controlled vocabulary in inst/dict/vocabularies/sources.yaml.

  • list_sources() — returns a tibble describing every entry in the source vocabulary (key, type, temporal/geographic coverage, DOI, URL). Discovery counterpart to educabr_cite().

Dashboard

  • Three-theme navbar (English UI): Enrollment, Tertiary Education, Educational Attainment.
  • Tertiary Education tab features multi-source comparison with interaction-based colour palette (each source × modality combination gets a unique colour shade), shape-by-source, and linetype-by-modality encoding.
  • “View R code” button on every tab generates a self-contained, copy-pasteable R snippet (educabr2 + ggplot2) that reproduces the current chart locally.

Schema

  • Canonical tidy-long schema documented in inst/dict/schema.yaml with primary-key constraints, year domain, controlled vocabularies for factor levels, and conventions for missing values.
  • 13 primary source entries documented in inst/dict/vocabularies/sources.yaml with DOIs, URLs, and coverage metadata.
  • PT-BR labels for every factor level in inst/dict/i18n.yaml.

Build pipeline

  • data-raw/01_build_enrollment_kang_fgv.R — Kang/FGV-IBRE 2023 compilation (4 xlsx files → enrollment_kang_fgv.rda).
  • data-raw/02_build_schooling_kang_fgv.R — Walter & Kang 2024 series (1 xlsx file → schooling_kang_fgv.rda).
  • data-raw/03_build_enrollment_tertiary.R — multi-source tertiary compilation, with canonicalisation of 69 raw source strings into 7 canonical keys and 4 composite derived-row keys, plus exact-duplicate deduplication.

Tests

  • 9 tests for get_enrollment() (core filters and pivots).
  • 9 tests for get_schooling().
  • 7 tests for the tertiary-specific arguments (institution_type, modality, include_derived, composite source keys, loader normalisation of legacy datasets).