This repository reproduces the analysis presented in the Public
Institutions Global Observatory (PIGO): Annual Review 2025. The
Pigographs package is designed to streamline the analysis and
visualization of institutional and governance indicators. It provides
the following key features:
Data Transformations: Scripts to clean and reshape raw inputs, located
in the data-raw/source directory. Data Analysis: Functions in the R
directory and scripts in the analysis directory for generating
visualizations and insights. This README guides you through setting up
your environment, restoring dependencies, and running the full analysis
pipeline.
Project Structure:
The repository is organized as follows:
├── data-raw/ # Raw data and initial processing scripts.
│ ├── source # Scripts for transforming raw data
│ ├── input # Raw data files (provided by the EGVPI Team)
│ └── output # Transformed data for ad-hoc analysis
├── analysis/ # Scripts for analysis and plotting.
├── R/ # Custom R functions.
├── documentation/ # Reproducibility documentation.
├── data/ # Processed data for analysis.
├── figures/ # Final generated plots.
├── man/ # R package manual pages.
├── renv/ # R package dependency management.
├── README.Rmd # Overview to run workflow.
├── pigographs.Rproj # RStudio project file.
├── .gitignore # Files ignored by Git.
├── .Rbuildignore # Files ignored when building.
├── .Rprofile # Project-specific R startup settings.
├── DESCRIPTION # Project metadata.
├── LICENSE # Licensing information.
├── LICENSE.md # License in Markdown format.
├── NAMESPACE # Package namespace definition.
├── main.R # Main file to reproduce the whole workflow
└── spielplatz/ # Sandbox/experimentation area.
Requirements:
-
R: Version 4.3 or higher
-
Dependency Management:
renvfor managing package dependencies -
Development Tools:
devtoolsfor package loading
-
Memory: No minimum required, but 16 GB is recommended for optimal performance.
-
Run Time: ~3 minutes on recommended hardware.
Replicating the results involves the following steps:
1. Restore Package Dependencies:
a. Clone this repository and open the pigographs.Rproj file in RStudio.
b. Execute the command renv::restore() in the RStudio console. This will install the exact package versions specified in the renv.lock file.
2. Execute the Full Workflow: To perform both stages conveniently, open the Main R script and run it. This will execute the following tasks in the required order.
a. Data Transformation:
-
Confirm that you have received and placed the input/ folder provided by the EGVPI team in the project’s root directory.
-
Source each of the raw data preprocessing scripts located in the data-raw/source/ subdirectory. Execute these scripts sequentially.
b. Data Analysis & Visualization:
-
Source all analysis and plotting scripts found within the analysis/ subdirectory.
-
Carefully verify that each plot generated in the figures/ folder matches the corresponding figure in the PIGO Annual Review exactly.
All generated figures and outputs will be saved in the figures folder. For detailed information on each exhibit, please refer to the List of Exhibits.