Title: | Accesses Brazilian Public Security Data from SINESP Since 2015 |
Version: | 0.3.0 |
Maintainer: | Giovanni Vargette <g216978@dac.unicamp.br> |
Description: | Allows access to data from the Brazilian Public Security Information System (SINESP) by state and municipality. It should be emphasized that the package only extracts the data and facilitates its manipulation in R. Therefore, its sole purpose is to support empirical research. All data credits belong to SINESP, an integrated information platform developed and maintained by the National Secretariat of Public Security (SENASP) of the Ministry of Justice and Public Security. https://www.gov.br/mj/pt-br/assuntos/sua-seguranca/seguranca-publica/sinesp-1. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
VignetteBuilder: | knitr |
Imports: | dplyr, forecast, ggplot2 |
Depends: | R (≥ 4.1.0) |
Suggests: | knitr, rmarkdown, bookdown, kableExtra, tidyr, stringr, ggcorrplot, formatR, lubridate, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2025-09-05 18:10:54 UTC; giova |
Author: | Giovanni Vargette |
Repository: | CRAN |
Date/Publication: | 2025-09-05 22:10:08 UTC |
br_crime_predict Function
Description
Performs automatic ARIMA modeling and forecasting on crime time series data.
Usage
br_crime_predict(
dados,
ts_col,
freq = "monthly",
h = 12,
log = FALSE,
level = 95
)
Arguments
dados |
Data.frame contendo as colunas da serie: evento, uf, municipio, data, e uma coluna com os valores numericos. |
ts_col |
Nome da coluna (string) com os dados da serie temporal (ex: "total_vitima"). |
freq |
Frequencia temporal: "monthly" ou "yearly". Padrao e "monthly". |
h |
Horizonte da previsao. Padrao: 12. |
log |
Logico. Se TRUE, aplica transformacao logaritmica. Padrao: FALSE. |
level |
Nivel de confianca do intervalo de previsao. Padrão: 95. |
Value
Lista com modelo ajustado, previsao e grafico ggplot2.
get_sinesp_vde_data Function
Description
This function collects criminal data from the SINESP VDE database (2015–2024). It supports filtering by state, city, year, crime category and typology.
Usage
get_sinesp_vde_data(
state = "all",
city = "all",
year = "all",
category = "all",
typology = "all",
granularity = "month"
)
Arguments
state |
State to be filtered. Character or vector. Default is "all". |
city |
City to be filtered. Character or vector. Default is "all". |
year |
Year(s) of the crime. Integer or vector. Default is "all". |
category |
Crime category. Character or vector. Default is "all". |
typology |
Crime typology (e.g., "Furto de veículo"). Character or vector. Default is "all". |
granularity |
Level of temporal granularity: "year" or "month". Default is "month". |
Value
A data frame with the filtered or summarized data.
Examples
dados <- get_sinesp_vde_data(state = "SP", year = 2020:2022)