An R interface to the Open Data API of the Tribunal de Contas do Estado de Pernambuco (TCE-PE), the Court of Accounts of the State of Pernambuco, Brazil. Provides tidy, ready-to-use functions to query public data on revenues, expenditures, commitments, procurement, contracts, agreements, public works, legal processes, personnel and reference tables for all state and municipal government entities in Pernambuco.
Access to the API
The TCE-PE API host (sistemas.tcepe.tc.br) is geo-restricted
and only accepts requests from Brazilian IP addresses. Users outside
Brazil will see connection or TLS errors. The discovery functions
(tce_catalog(), tce_endpoint(), tce_params(), tce_fields())
are unaffected – they read from a built-in catalog and work offline
from any location.
Recommended workflow
Discover endpoints with
tce_catalog()(filter withsearch =).Inspect input parameters with
tce_params()and output fields withtce_fields().Query using a wrapper function (e.g.
tce_contracts()) or the low-leveltce_request().
Parameter names
All query parameters are passed through ... using the names shown
by tce_params(). You can use either the original API name (e.g.
CodigoEfiscoUG) or its snake_case equivalent (e.g.
codigo_efisco_ug); the package maps them automatically.
Options
tceper.verboseIf
TRUE, all functions print the final API URL. Default:FALSE.tceper.progressIf
FALSE, suppresses progress messages. Default:TRUE.tceper.cache_ttlCache time-to-live in seconds. Default:
3600(1 hour).
See also
tce_catalog(),tce_params(),tce_fields()— endpoint discoverytce_request()— low-level query functiontce_cache_info(),tce_cache_clear()— cache management
Author
Maintainer: Andre Leite leite@castlab.org
Authors:
Andre Leite leite@castlab.org
Marcos Wasilew marcos.wasilew@gmail.com
Hugo Vasconcelos hugo.vasconcelos@ufpe.br
Carlos Amorin carlos.agaf@ufpe.br
Diogo Bezerra diogo.bezerra@ufpe.br