knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

spcrimr: tidy data from Secretaria de Segurança Pública - São Paulo, Brazil

spcrimr is a simple package to download and use tidy data from Secretaria de Sweegurança Pública, state of Sao Paulo, Brazil.

With this package you can easily download tables from SSP's website.

The download_table_sp() function request tables from SSP's website with R and displays it in the conlose.

Installation

You can install spcrimr from github with:

# install.packages("devtools")
devtools::install_github("rdurl0/spcrimr")

Example

Data

library(spcrimr)
library(tibble)

glimpse(ssp_ocorrencias_crimes)

glimpse(ssp_produtividade_policial)

glimpse(ssp_variables_names)

glimpse(seade) # a database from SEADE

Functions

The download_table_sp function download tables from SSP's website

download_table_sp(ano = 2019,
                  municipio = 500,
                  type = "ctl00$conteudo$btnMensal") %>% glimpse()
insert_munic_idx("any vector") %>% glimpse()

Citation

To cite spcrimr, write citation("spcrimr"):

To cite package ‘spcrimr’ in publications use:

  Raul de Sá Durlo (2019). spcrimr: tidy data from SSP-SP.
  R package version 0.0.9000.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {spcrimr: tidy data from SSP-SP},
    author = {Raul de Sá Durlo},
    year = {2019},
    note = {R package version 0.0.9000},
  }


rdurl0/spcrimr documentation built on June 6, 2020, 7:50 a.m.