Cross-link OTIS (Ontario corrections) with TPS (Toronto police) data
Source:R/otis_tps_overlay.R
morie_otis_tps_overlay.RdR port of morie.otis_tps_overlay. Both feeds touch Toronto,
so three overlay analyses are meaningful:
Details
morie_otis_tps_yoy_correlation()– year-over-year Pearson r between OTIS Toronto-region segregation placements and TPS incident counts (per category).morie_otis_tps_per_region_rollup()– OTIS seg/RC totals per region x year, with the Toronto row flagged for overlay use.morie_otis_tps_composite_overlay()– alias formorie_otis_tps_yoy_correlation()(preserves the Python name, same body).
All three return a morie_otis_analysis_result (the shared
RichResult-shaped list from otis_all_analyze.R).
Cross-year invariants
OTIS
UniqueIndividual_IDis reassigned every fiscal year (seevariable_taxonomy.R); the overlay therefore joins at the year grain, never at the person grain.OTIS uses fiscal-year (
EndFiscalYear); TPS uses calendarOCC_YEARorREPORT_YEAR. The Pearson r here is computed on the year-aligned intersection – there is a small fiscal/calendar misalignment that is documented in the interpretation but not corrected. Toronto OTIS data covers only 2023-2025, so common-year samples are necessarily small.