How lapop-central/lapop works
lapop is an R package for preparing AmericasBarometer data and producing LAPOP-style visualizations. Its documented workflows cover multilingual variable-label extraction and assignment, response-option labels, design-effect preparation, graph-specific data preparation and plotting, and figure export. Relationships below follow the README’s stated workflows; source excerpts were not provided, so internal calls beyond those documented are omitted.
Main entry points: lpr_hist.R Prepare histogram data · lpr_cc.R Prepare country comparison · lpr_ts.R Prepare time series · lpr_mover.R Prepare covariate breakdown
Components 16
Label workflows
- Extract question labels
R/lpr_extract_notes.R - Assign variable labels
R/lpr_set_attr.R - Assign response labels
R/lpr_set_ros.R
Visualization
- Apply design effects
R/lpr_data.R - Prepare histogram data
R/lpr_hist.R - Prepare country comparison
R/lpr_cc.R - Prepare time series
R/lpr_ts.R - Prepare covariate breakdown
R/lpr_mover.R - Plot histogram
R/lapop_hist.R - Plot country comparison
R/lapop_cc.R - Plot time series
R/lapop_ts.R - Plot covariate breakdown
R/lapop_mover.R
Presentation
- Load LAPOP fonts
R/lapop_fonts.R - Export figure
R/lapop_save.R
Other components
- R user
- Stata data
Connections 16
- R user → Stata data: loads data
README.md - Stata data → Extract question labels: provides metadata
README.md - R user → Extract question labels: extracts labels
README.md - R user → Assign variable labels: assigns labels
README.md - R user → Assign response labels: assigns response labels
README.md - R user → Apply design effects: applies effects
README.md - R user → Prepare histogram data: chooses graph type
README.md - R user → Prepare country comparison: chooses graph type
README.md - R user → Prepare time series: chooses graph type
README.md - R user → Prepare covariate breakdown: chooses graph type
README.md - Prepare histogram data → Plot histogram: plots prepared data
README.md - Prepare country comparison → Plot country comparison: plots prepared data
README.md - Prepare time series → Plot time series: plots prepared data
README.md - Prepare covariate breakdown → Plot covariate breakdown: plots prepared data
README.md - R user → Load LAPOP fonts: loads fonts
README.md - R user → Export figure: exports figure
README.md