Sample Code for: Creating Public Payroll Indicators: A Methodological Guide
Metadata & use
| Identifier | https://doi.org/10.60966/6x55ayx4 |
|---|---|
| License | Creative Commons Attribution 4.0 International |
| Related Knowledge Product | |
| Citation |
Naranjo, Sandra, et al. (2025). Sample Code for: Creating Public Payroll Indicators: A Methodological Guide. IDB Open Data. https://doi.org/10.60966/6x55ayx4 |
| Published date | 2025-11-06 |
| Modified date | 2026-07-15 |
| Tags/Keywords | public payrolls · public pay · public employment · turnover · gender pay gaps |
| Language |
|
| Temporal coverage | 2025-2025 |
| Country |
Argentina
Bahamas
Barbados
Belize
Bolivia
Brazil
Chile
Colombia
Costa Rica
Dominican Republic
Ecuador
El Salvador
Guatemala
Guyana
Haiti
Honduras
Jamaica
Mexico
Nicaragua
Panama
Paraguay
Peru
Suriname
Trinidad & Tobago
Uruguay
Venezuela
|
| Publisher |
Inter-American Development Bank
|
| Author |
Naranjo, Sandra
Schuster, Christian
Lipinski, Robert
|
| Data collection type | Administrative Data |
| Data structure | Structured Data |
| Data notes |
What is this? Is it a data file (e.g., a CSV)?This is a methodological toolkit, not a static dataset. It is a comprehensive R project containing a series of scripts. These scripts are designed to ingest raw public payroll data, clean it, standardize it, and generate a final set of key performance indicators (KPIs) for analysis. Who is the target audience for this toolkit?** This project is designed for two primary audiences: * Data Analysts: R-proficient analysts in government, academia, or civil society who can execute the scripts to process raw payroll data and explore the methodology. * Policymakers: Officials who need to understand the types of indicators that can be generated (like wage bill trends, turnover, and pay gaps) to inform public sector management and reform. What do I need to run this project?** You will need:
1. R and RStudio.
2. The R libraries listed in the What payroll key performance indicators (KPIs) can I calculate using this toolkit?** The scripts are structured to generate a wide range of indicators. Key categories include: * Wage Bill & Pay: Wage bill growth, average pay, pay compression (e.g., top 10% vs. bottom 10%), and pay composition (e.g., base pay vs. bonuses). * Employment: Headcount growth and total employment figures, calculated using Full-Time Equivalent (FTE) logic. * Turnover & Mobility: Employee turnover (hires and leavers) for the public sector as a whole and within specific organizations. * Promotions: Career progression, including rates of promotion and promotions into executive/director-level positions. * Pay Equity: Detailed gender pay gap analysis. How does this toolkit help me calculate the gender pay gap?** The toolkit provides a robust, multi-step approach:
1. Gender Assignment: It first cleans and assigns a gender to each employee record based on first names using a dedicated dictionary ( How is the project structured?** The project follows a clear, sequential pipeline:
* Scripts 00-02: Set up the global environment, convert raw How do the scripts define "turnover"?** Turnover is calculated in What is the generally accepted definition of the gender pay gap, and how is it measured?This dataset does not provide a textual definition of the gender pay gap. However, it gives two distinct R scripts for its measurement:
1. Unadjusted Gap: The Can you clarify the distinction between the 'unadjusted' and 'adjusted' gender pay gap figures?** Yes. This toolkit provides the methodology to calculate both:
* An 'unadjusted' (or raw) gap is calculated in the What are the core performance metrics for payroll departments?** This toolkit is designed to generate a final, clean database ( |