We've been quietly building Crime Brasil — an open-data platform covering violent crime across Brazil. Here's what's in it and how to use it.
What the data covers
- Rio Grande do Sul: 2.99 million occurrences (2022–2025), 497 municipalities, geocoded to neighborhood level
- Minas Gerais: 965K violent-crime records (2019–2026), 853 municipalities
- Rio de Janeiro: 37K ISP/CISP records
- PRF DATATRAN: ~500K federal road accidents nationally (2020–2026)
- DATASUS SINAN: interpersonal-violence records nationally (2009–2024)
All data comes from state Secretariats of Public Security (SSP-RS, SSP-MG, ISP-RJ) and federal sources. License: CC BY 4.0.
The API
Every city/state has its own endpoint:
# Crime counts by month for Porto Alegre
curl 'https://crimebrasil.com.br/api/city/rs/porto-alegre?type=monthly'
# Top 10 neighborhoods by homicide, last 12 months
curl 'https://crimebrasil.com.br/api/city/rs/porto-alegre/bairros?crime=homicidio'
The response is plain JSON — crime counts aggregated by type, period, and neighborhood.
Downloading datasets
Full datasets are on:
-
Zenodo — DOI
10.5281/zenodo.19712036(RS, 3M rows) -
Zenodo — DOI
10.5281/zenodo.19711971(MG, 965K rows) - Kaggle — MG dataset
- HuggingFace — RS dataset
Quick Python example
import pandas as pd
# Load RS dataset from Zenodo
df = pd.read_csv(
'https://zenodo.org/records/19712036/files/crime-brasil-rs-2022-2025.csv.gz',
compression='gzip'
)
# Homicides per year in Porto Alegre
homicidios = df[
(df['municipio_fato'] == 'PORTO ALEGRE') &
(df['tipo_enquadramento'].str.contains('HOMICIDIO'))
].groupby(df['year_month'].str[:4]).size()
print(homicidios)
Coverage and methodology
We cover 99.4% of the Brazilian population across the states we have data for. The geocoding pipeline assigns lat/lon using a four-pass hierarchy:
- Exact address match
- Neighborhood centroid
- Municipality centroid
- State centroid (fallback)
99.99% of RS records land at pass 1 or 2.
LAI requests in progress
We've filed Freedom of Information (LAI) requests in 14 states: AL, AM, BA, ES, MA, MG, PR, RJ, RN, RO, RR, RS, SC, TO. As responses arrive, we publish them.
The platform is at crimebrasil.com.br. Press kit and methodology at crimebrasil.com.br/imprensa.
Top comments (0)