How luizinhoh2o1/tabelas-ibpt works
This repository builds a static archive and API for historical IBPTax tax tables, plus browser-based consultation and a tax-rate panel. The main workflow is to read archived ZIPs, parse their CSVs, and generate compressed records, indexes, and consolidated yearly CSVs for static hosting; users then filter and fetch the published data. Economic series and panel calculations are an additional capability. Source excerpts show the build and panel internals; browser behavior and some generated outputs are documented in the README rather than sampled source.
Main entry points: geradorJson.ts Static API files · construir.ts Build orchestrator · gerarPainel.ts Panel data generator · economia.ts Economic calculations
Components 16
Data inputs
- IBPT ZIP archive
repositorio-ibpt - Economic series
dados
API generation
- CSV parser
src/processadorCsv.ts - Types and UF map
src/constantes.ts - Data contracts
src/tipos.ts - Build orchestrator
src/construir.ts - API file generator
src/geradorJson.ts
Panel and economics
- Economic calculations
src/economia.ts - Economic data updater
src/gerarIndices.ts - Panel data generator
src/gerarPainel.ts - UF map generator
src/gerarMalha.ts
Static product
- Static API files
src/geradorJson.ts - Browser consultation
docs/index.html - Tax panel
docs/painel.html - GitHub Pages
Other components
- Browser user
Connections 17
- Build orchestrator → IBPT ZIP archive: reads ZIPs
README.md - Build orchestrator → CSV parser: parses CSVs
src/construir.ts - CSV parser → Types and UF map: maps types
src/processadorCsv.ts - Build orchestrator → API file generator: generates files
src/construir.ts - API file generator → Static API files: writes JSON and CSV
README.md - Build orchestrator → Static API files: publishes data
src/construir.ts - Build orchestrator → Panel data generator: generates panel data
src/construir.ts - Panel data generator → Static API files: reads compressed records
src/gerarPainel.ts - Panel data generator → Economic calculations: uses calculations
src/gerarPainel.ts - Economic calculations → Economic series: reads series
src/economia.ts - Economic data updater → Economic series: updates series
src/gerarIndices.ts - Economic data updater → Economic calculations: checks INSS rules
src/gerarIndices.ts - UF map generator → GitHub Pages: writes map data
src/gerarMalha.ts - Browser user → Browser consultation: chooses filters
README.md - Browser consultation → Static API files: fetches filtered data
README.md - Tax panel → Static API files: loads panel data
README.md - Static API files → GitHub Pages: serves static files
README.md