Consolidates Information from the Federal Government Payment Card

Provides access to consolidated information from the Brazilian Federal Government Payment Card. Includes functions to retrieve, clean, and organize data directly from the Transparency Portal < https://portaldatransparencia.gov.br/download-de-dados/cpgf/> and a curated dataset hosted on the Open Science Framework < https://osf.io/z2mxc/>. Useful for public spending analysis, transparency research, and reproducible workflows in auditing or investigative journalism.


📦 cpgfR

R-CMD-check Build status

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)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("cpgfR")

0.0.1.0 by Dalson Figueiredo, a year ago


Report a bug at https://github.com/datafobia/cpgf/issues


Browse source code at https://github.com/cran/cpgfR


Authors: Dalson Figueiredo [aut, cre] (ORCID: , Denisson Silva [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports data.table, stringr, osfr, lubridate, deflateBR, curl


See at CRAN