fbi.v2: Numbers of crimes by state and source

fbi.v2R Documentation

Numbers of crimes by state and source

Description

A dataset containing the state-wide counts of offenses for a selected number of crimes since 1979 as reported through the API for the FBI's Crime Data Explorer at https://cde.ucr.cjis.gov/LATEST/webapp/#/pages/docApi. Last updated: Sep 20 2023
The variables are as follows (more detail on the FBI website):

Usage

fbi.v2

Format

A tibble with 26520 rows and 12 columns

state

name of the state for which numbers are reported.

state_id

id for each state.

state_abbr

two letter state abbreviation.

year

year of the reporting.

population

state population.

type

type of crime.

count

number of reported offenses.

total_agency_count

total number of crime-solving agencies in the state.

agency_submitting

number of agencies who reported data.

population_covered

percent of the state's population covered by reporting agencies.

source

source of the estimate: SRS (standard reporting system) or NIBRS (national incidence based reporting system)

Examples

# example code
library(tidyverse)

# compliance to report to NIBRS varies drastically by state
fbi.v2 %>% 
  ggplot(aes(x = year, y = agency_submitting/total_agency_count*100)) + 
    geom_point(aes(colour = source)) + 
    facet_wrap(~state, scales="free_y")

# population size is related to compliance
fbi.v2 %>% 
  filter(year==2021) %>%
  ggplot(aes(x = population, y = agency_submitting/total_agency_count*100)) + 
    geom_point() +
    geom_text(aes(label=state_abbr), 
              nudge_y = 3,
              data = fbi.v2 %>% 
                     filter(year==2021, 
                            agency_submitting/total_agency_count*100 < 50 | 
                            population > 2e+07) %>% unique())
    
# comparison of SRS and NIBRS counts in Iowa across all types of offenses
fbi.v2 %>% filter(state_abbr=="IA") %>%  
  ggplot(aes(x = year, y = count)) + 
    geom_point(aes(colour = source)) + 
    facet_wrap(~type, scales="free_y")

# comparison of SRS and NIBRS counts in New York across all types of offenses
fbi.v2 %>% filter(state_abbr=="NY") %>%  
  ggplot(aes(x = year, y = count)) + 
    geom_point(aes(colour = source)) + 
    facet_wrap(~type, scales="free_y")

heike/classdata documentation built on Nov. 24, 2023, 1:50 a.m.