Skip to contents

Year-over-year correlation between OTIS Toronto-region segregation placements and TPS incident counts (per category)

Usage

morie_otis_tps_yoy_correlation(otis_b01, tps_datasets)

Arguments

otis_b01

OTIS b01 data.frame (e.g. read.csv("b01_segregation_detailed_dataset.csv")).

tps_datasets

A named list of TPS data.frames, one per category (e.g. list(assault = <df>, robbery = <df>)). Each data.frame must have OCC_YEAR or REPORT_YEAR.

Value

A morie_otis_analysis_result with a per-category Pearson r table.

Examples

if (FALSE) {
  b01 <- read.csv("b01_segregation_detailed_dataset.csv")
  tps <- list(
    assault = read.csv("Assault_Open_Data.csv"),
    robbery = read.csv("Robbery_Open_Data.csv")
  )
  morie_otis_tps_yoy_correlation(b01, tps)
}