Composite per-neighbourhood crime-risk index across TPS categories
Source:R/tps_crime.R
morie_tps_composite_index.RdFor each TPS category, computes per-HOOD_158 counts, z-standardises across neighbourhoods, and sums (or weight-and-sums) the z-scores to yield a single composite per neighbourhood. Positive composite = neighbourhood with elevated incidence across many crime types; near-zero = average; negative = below-average exposure.
Arguments
- dfs
Named list of TPS data.frames keyed by category.
- categories
Optional character vector restricting categories.
- weights
Optional named numeric vector of per-category weights; defaults to 1.0 for every loaded category.
- top_n
How many top/bottom neighbourhoods to surface in the tables (default
25L).