Skip to contents

Aggregates incident counts by year, restricts to the 1990-2030 window, fits an OLS line, and reports slope, intercept, and R-squared.

Usage

morie_tps_year_over_year_trend(df, year_col = "OCC_YEAR", ds_name = "?")

Arguments

df

A data.frame with one row per incident.

year_col

Character. Name of the year column (default "OCC_YEAR").

ds_name

Character label for the dataset shown in titles.

Value

A morie_rich_result list with slope, intercept, r2, direction, years, counts, fitted.