Coder Social home page Coder Social logo

ribge's Introduction

ribge R package

R package for (down)loading data from IBGE (Instituto Brasileiro de Geografia e Estatística)

data: population

Yearly population for municipalities. See: Estimativas de População - 2015 - DOU & estatísticas/Estimativas de Populacao (or ftp://ftp.ibge.gov.br/Estimativas_de_Populacao/)

2007 data comes from Contegem da população: see http://www.ibge.gov.br/home/estatistica/populacao/contagem2007/

2010 Census data gathered from: http://www.sidra.ibge.gov.br/bda/tabela/listabl.asp?z=t&o=25&i=P&c=1378

years avaiable: 2000-2017

see doc/populacao_sources.csv

data: GDP (gross domestic product) / PIB (produto interno bruto)

Municipalities GDP. See: Produto Interno Bruto dos Municípios & Produto Interno Bruto dos Municípios 2011

years avaiable: 1999-2013

data: cartography/territory

Municipalities area. See: Cartografia » Área Territorial Brasileira

data: price indexes & GDP deflator

INPC index. See: Índice de preços » INPC - Índice Nacional de Preços ao Consumidor

years avaiable: 1991+

IPCA index. See: Índice de preços » IPCA - Índice Nacional de Preços ao Consumidor Amplo

years avaiable: 1991+

SINAPI construction price index. See: Sistema Nacional de Pesquisa de Custos e Índices da Construção Civil & índice de preços » índices da construção civil

years avaiable: 1986+

GDP deflator. See: sistema de contas nacionais » contas nacionais

years avaiable: 1948+

statistical series API (series estatísticas)

Generic functions to gather data from Séries Históricas e Estatísticas website.

See avaiable series codes on doc/seriesEstatisticas.md.

municipalities codes: ibge/tse mapping

Mapping between IBGE's & TSE's municipalities codes.

See also the csv file.

IPEA's & BCB's series (non-IBGE)

Function to gather data from Ipeadata

Function to gather data from BCB's Time Series Management System

install & load

# install.packages("devtools")
devtools::install_github("tbrugz/ribge")
library(ribge)

usage examples

population, main usage:

pop2000 <- populacao_municipios(2000)
# ...
pop2007 <- populacao_municipios(2007)
pop2008 <- populacao_municipios(2008)
pop2009 <- populacao_municipios(2009)
pop2010 <- populacao_municipios(2010)
pop2011 <- populacao_municipios(2011, dir="/tmp")
# ...
pop2017 <- populacao_municipios(2017)

GDP (PIB) example:

pib2013 <- pib_municipios(2013)

inflation & GDP deflator:

inpc2015 <- precos_inpc(2015)
ipca2015 <- precos_ipca(2015)
sinapi2015 <- precos_sinapi(2015)
deflatorpib <- precos_deflatorpib()

municipalities area:

munArea <- area_municipios()

Gathering data from "séries estatísticas" (statistical series website):

# Efetivo dos rebanhos por tipo de rebanho
df <- series_estatisticas_carrega("PPM01_BR_ABS")
# Docentes com curso superior no ensino médio, rede pública e privada
df <- series_estatisticas_carrega("SEE10_BR_PERC", transpose = T)

# Ver `seriesEstatisticas` para prefixos de códigos:
seriesEstatisticas
View(seriesEstatisticas)

TSE municipalities (see also the csv file):

tsemun <- tse_municipios()
# mapping between ibge & tse municipalities codes
data("municipioIbgeTseMap")

Ipeadata series:

# series 37667: real minimum wage / salário mínimo real
df <- ipea_serie_carrega(37667)

Brazil's central bank (BCB) series:

# series 193: Fipe IPC price index / Índice de Preços ao Consumidor da Fipe
df <- bcb_serie_carrega(193)

end notes

license: GPL-3

ribge's People

Contributors

tbrugz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.