Consolidates Information from the Federal Government Payment Card.
📦 cpgfR
The cpgfR
package provides a consolidated database of the Federal Government Payment Card (CPGF).
The Federal Government Payment Card (CPGF) is a payment instrument used by the government that operates similarly to a regular credit card, but within specific limits and regulations. The government uses the CPGF to cover its own expenses, provided they qualify as advances of funds (suprimento de fundos).
📥 Installation
cpgfR
is also available on GitHub. You can install pre-release versions via:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("datafobia/cpgf")
How does it work?
Database the Federal Government Payment Card CPGF - Brazil (2013 up to April 2025)
# Load the package
library(cpgfR)
# Access the dataset
dataset <- cpgf_data()
# See the data
View(cpgf_data)
But you may need the database directly from the source: https://portaldatransparencia.gov.br/download-de-dados/cpgf, which provides monthly data. In this case, you can use the get_cpgf function.
# Download
january24 <- get_cpgf(2024, 1)
# See the data
View(january24)
To automatically create a variable with the deflated value, simply provide the reference month and year in the deflate parameter.
# Download
january2023 <- get_cpgf(2023, 1, "01/2024")
# See the data
View(january2023)