Title: | Open Welfare Data Brazil |
Version: | 1.0.1.1 |
Description: | Tools for collecting municipal-level data http://www.transparencia.gov.br/swagger-ui.html from several Brazilian governmental social programs. |
Depends: | R (≥ 3.4.4) |
License: | MIT + file LICENSE |
URL: | https://github.com/kimjoaoun/owdbr |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | tibble, dplyr, httr, jsonlite, data.table, magrittr |
RoxygenNote: | 6.1.1 |
NeedsCompilation: | no |
Packaged: | 2019-11-10 23:31:02 UTC; joaopsantos |
Author: | Joao Pedro Oliveira dos Santos
|
Maintainer: | Joao Pedro Oliveira dos Santos <joaopsantos@pm.me> |
Repository: | CRAN |
Date/Publication: | 2019-11-11 06:00:02 UTC |
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Collects municipal level data from the program BOLSA FAMILIA database.
Description
The program BOLSA FAMILIA is a brazilian social welfare program that provides financial aid for poor families. This function collects municipal level data from the program, some data like the number of citizens in a municipality which are enrolled in the program, and the total amount of money invested by the program in that city.
Usage
getpbf_mun(IBGECODE, AAAA, MM = NULL, PAGE = 1, YEARLY = TRUE)
Arguments
IBGECODE |
IBGE unique identifier of the municipality which you want the data. The list of municipalities and its codes might be requested with the function owdbr::munlist() |
AAAA |
Year of the data (AAAA format) |
MM |
Month of the data (MM format) |
PAGE |
Request's page. In normal situations: page=1. |
YEARLY |
If True, it is not needed to fill the MM param, the package will request the data for the entire year (AAAA). Default= TRUE. |
Value
a tibble with the requested data, if there are more than one IBGECODE, returns all of them in the same tibble.
- dataReferencia
Reference date
- valor
Amount of money invested in the municipality.
- quantidadeBeneficiados
Number of citizens wich are enrolled in the program in that moment
- municipio.codigoIBGE
IBGE code of the municipality.
- municipio.nomeIBGE
Name of the municipality.
- municipio.pais
Country of the municipality.
- municipio.uf.sigla
Abbreviation of name of the state in which the municipality is.
- municipio.uf.nome
Full name of the state in wich the municipality is.
- tipo.id
Type
- tipo.descricao
Abbreviation of the program's name.
- tipo.descricaoDetalhada
Full name of the program.
Author(s)
Joao Pedro Oliveira dos Santos, International Relations Institute, Pontifical Catholic University of Rio de Janeiro
Examples
## Not run:
getpbf_mun("3304557", AAAA = "2015", MM = "05", PAGE = 1, YEARLY = FALSE)
## End(Not run)
Collects municipal level data from the PETI (Child Labour Erradication Program) database.
Description
PETI (Child Labour Erradication Program) is a brazilian social welfare program that provides financial support for poor families. Its objective is to protect these families children from any type of work before the age of 16 years old, with that, the Federal Government expect them to keep going to school. This function collects municipal level data from the program, some data like the number of citizens in a municipality which are enrolled in the program, and the total amount of money invested by the program in that city.
Usage
getpeti_mun(IBGECODE, AAAA, MM, PAGE = 1, YEARLY = TRUE)
Arguments
IBGECODE |
IBGE Unique Identifier of the municipality which you want the data. The list of municipalities and its codes might be requested with the function owdbr::munlist() |
AAAA |
Year of the Data (AAAA format) |
MM |
Month of the Data (MM format) |
PAGE |
Request's page. Default= 1. |
YEARLY |
If True, it is not needed to fill the MM param, the package will request the data for the entire year (AAAA). Default= TRUE. |
Value
a tibble with the requested data, if there are more than one IBGECODE, returns all of them in the same tibble.
- dataReferencia
Reference date
- valor
Amount of money invested in the municipality.
- quantidadeBeneficiados
Number of citizens wich are enrolled in the program in that moment
- municipio.codigoIBGE
IBGE code of the municipality.
- municipio.nomeIBGE
Name of the municipality.
- municipio.pais
Country of the municipality.
- municipio.uf.sigla
Abbreviation of name of the state in which the municipality is.
- municipio.uf.nome
Full name of the state in wich the municipality is.
- tipo.id
Type
- tipo.descricao
Abbreviation of the program's name.
- tipo.descricaoDetalhada
Full name of the program.
Author(s)
Joao Pedro Oliveira dos Santos, International Relations Institute, Pontifical Catholic University of Rio de Janeiro
Examples
## Not run:
getpeti_mun("3304557", AAAA = "2015", MM = "05", PAGE = 1, YEARLY=FALSE)
## End(Not run)
Collects municipal level data from the Seguro Defeso Program database.
Description
The program Seguro Defeso is a brazilian social welfare program that provides financial aid for fisherman and fisherwoman in periods in which this activity is prohibited by law due to the fish reproduction season. This function collects municipal level data from the program, some data like the number of citizens in a municipality which are enrolled in the program, and the total amount of money invested by the program in that city.
Usage
getsd_mun(IBGECODE, AAAA, MM = NULL, PAGE = 1, YEARLY = TRUE)
Arguments
IBGECODE |
IBGE unique identifier of the municipality which you want the data. The list of municipalities and its codes might be requested with the function owdbr::munlist() |
AAAA |
Year of the data (AAAA format) |
MM |
Month of the data (MM format) |
PAGE |
Request's page. In normal situations: page=1. |
YEARLY |
If True, it is not needed to fill the MM param, the package will request the data for the entire year (AAAA). Default= TRUE. |
Value
a tibble with the requested data, if there are more than one IBGECODE, returns all of them in the same tibble.
- dataReferencia
Reference date
- valor
Amount of money invested in the municipality.
- quantidadeBeneficiados
Number of citizens wich are enrolled in the program in that moment
- municipio.codigoIBGE
IBGE code of the municipality.
- municipio.nomeIBGE
Name of the municipality.
- municipio.pais
Country of the municipality.
- municipio.uf.sigla
Abbreviation of name of the state in which the municipality is.
- municipio.uf.nome
Full name of the state in wich the municipality is.
- tipo.id
Type
- tipo.descricao
Abbreviation of the program's name.
- tipo.descricaoDetalhada
Full name of the program.
Author(s)
Joao Pedro Oliveira dos Santos, International Relations Institute, Pontifical Catholic University of Rio de Janeiro
Examples
## Not run:
getsd_mun("3304557", AAAA = "2015", MM = "05", PAGE = 1, YEARLY = FALSE)
## End(Not run)
Get a tibble with a all municipalities from a State.
Description
Download a tibble with all the IBGECODE from municipality of the desired State.
Usage
munlist(UF_Num)
Arguments
UF_Num |
A number given by the IBGE (Brazilian Institute for Geography and Statistics) for each state, a list of them might be requested with the owdbr::uflist() function. |
Value
a tibble with the requested data divided in 11 columns, if there are more than one IBGECODE, returns all of them in the same tibble.
- dataReferencia
Reference date
- valor
Amount of money invested in the municipality.
- quantidadeBeneficiados
Number of citizens wich are enrolled in the program in that moment
- municipio.codigoIBGE
IBGE code of the municipality.
- municipio.nomeIBGE
Name of the municipality.
- municipio.pais
Country of the municipality.
- municipio.uf.sigla
Abbreviation of name of the state in which the municipality is.
- municipio.uf.nome
Full name of the state in wich the municipality is.
- tipo.id
Type
- tipo.descricao
Abbreviation of the program's name.
- tipo.descricaoDetalhada
Full name of the program.
Author(s)
Joao Pedro Oliveira dos Santos, International Relations Institute, Pontifical Catholic University of Rio de Janeiro
Examples
## Not run:
munlist(11)
## End(Not run)
All the State's UF Codes.
Description
Returns a tibble which contains the IBGE identification code of each one of all 23 UFs (Units of the Federation) in Brazil.
Usage
uflist(region = NA)
Arguments
region |
filter the UFs (Units of the Federation or States) by geographical region. If NA, all state are shown. According to the Brazilian Institute of Geography and Statistics, the country is divided in 5 regions: "Norte", "Nordeste", "Centro-Oeste", "Sul" and "Sudeste". |
Value
a tibble with 3 columns.
- State
The full name of the state.
- UF
The abbreviation of the state's name.
- num
The identification number of the state.
- region
Region of the country in which the State is located.
Author(s)
Joao Pedro Oliveira dos Santos, International Relations Institute, Pontifical Catholic University of Rio de Janeiro
References
Source: IBGE (Brazilian Institute of Geography and Statistics)
Examples
## Not run:
uflist(reg = NA) # show all states of the country.
uflist(region = "Sul") # only exhibit States in the 'Sul' region of the country.
## End(Not run)