download_table_sp: Extract data from SSP

Description Usage Arguments Value References

View source: R/funcoes.R

Description

Extract data avaliable in SSP's website: (1) number of criminal ocurrencies (2) police productivity indicators, by month and by municipalities.

Usage

1
2
download_table_sp(ano, municipio, type = c("ctl00$conteudo$btnPolicial",
  "ctl00$conteudo$btnMensal"))

Arguments

ano

is a number between 2002 e 2018 indicating the year,

municipio

is a number between 1 and 645 indicating the municipality (organized by alphabetical order)

type

a character string indicating the data resquested to the SSP's website. Use 'ctl00$conteudo$btnMensal' if you want to extract criminal ocurrencies 'ctl00$conteudo$btnPolicial' to request police indicators.

Value

a tibble

References

Web scraping do site da Secretaria de Seguranca Publica de Sao Paulo. Blog do Curso R. 2017. ultimo acesso em: 11/07/2018

Secretaria de Seguranca Publica do estado de Sao Paulo


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