Skip to contents

Same body as morie_otis_tps_yoy_correlation; the alias preserves the Python entry-point name.

Usage

morie_otis_tps_composite_overlay(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

An object of class "morie_otis_analysis_result".

Examples

set.seed(2026)
b01 <- data.frame(
  EndFiscalYear = rep(2023:2025, each = 30),
  Region_AtTimeOfPlacement = sample(c("Toronto", "Central", "Eastern"), 90, TRUE),
  NumberConsecutiveDays_Segregation = sample(1:25, 90, TRUE))
tps <- list(assault = data.frame(OCC_YEAR = rep(2020:2025, times = 200)))
res <- morie_otis_tps_composite_overlay(b01, tps)
res$title
#> [1] "OTIS x TPS -- year-by-year correlation (Toronto region)"