Crime data for Canadian provinces and territories, showing mischief offenses. This dataset is adapted from the original Bayesian Surprise paper's Canada example and is useful for exploring base-rate effects: Ontario and Quebec dominate raw counts because of population, while model-based surprise scores ask which provinces are unusual relative to the chosen model space.
Format
A data frame with 13 rows and 6 variables:
- name
Province or territory name
- population
Population count
- mischief_count
Number of mischief offenses
- rate_per_100k
Mischief rate per 100,000 population
- pop_proportion
Proportion of total Canadian population
- mischief_proportion
Proportion of total mischief offenses
Source
Correll & Heer (2017). Surprise! Bayesian Weighting for De-Biasing Thematic Maps. IEEE InfoVis.
Examples
data(canada_mischief)
# Basic exploration
head(canada_mischief)
#> name population mischief_count rate_per_100k pop_proportion
#> 1 Ontario 13448494 45123 335.5246 0.38235126
#> 2 Quebec 8164361 28456 348.5392 0.23211920
#> 3 British Columbia 4631302 22145 478.1593 0.13167156
#> 4 Alberta 4067175 18234 448.3210 0.11563298
#> 5 Manitoba 1278365 9876 772.5493 0.03634492
#> 6 Saskatchewan 1098352 8123 739.5625 0.03122701
#> mischief_proportion
#> 1 0.31378344
#> 2 0.19788182
#> 3 0.15399540
#> 4 0.12679847
#> 5 0.06867729
#> 6 0.05648700
# Compute surprise
result <- auto_surprise(
observed = canada_mischief$mischief_count,
expected = canada_mischief$population
)
# See which provinces are most surprising under the selected models
canada_mischief$surprise <- result$surprise
canada_mischief$signed_surprise <- result$signed_surprise
canada_mischief[order(-abs(canada_mischief$signed_surprise)), ]
#> name population mischief_count rate_per_100k
#> 1 Ontario 13448494 45123 335.5246
#> 2 Quebec 8164361 28456 348.5392
#> 4 Alberta 4067175 18234 448.3210
#> 3 British Columbia 4631302 22145 478.1593
#> 13 Nunavut 35944 678 1886.2675
#> 7 Nova Scotia 942926 4321 458.2544
#> 8 New Brunswick 753914 3456 458.4077
#> 5 Manitoba 1278365 9876 772.5493
#> 6 Saskatchewan 1098352 8123 739.5625
#> 11 Northwest Territories 43283 456 1053.5314
#> 12 Yukon 35874 234 652.2830
#> 10 Prince Edward Island 146447 567 387.1708
#> 9 Newfoundland and Labrador 526702 2134 405.1627
#> pop_proportion mischief_proportion surprise signed_surprise
#> 1 0.382351260 0.313783440 0.6176481 -0.6176481
#> 2 0.232119203 0.197881824 0.6018849 -0.6018849
#> 4 0.115632983 0.126798467 0.5882624 0.5882624
#> 3 0.131671558 0.153995396 0.5876511 0.5876511
#> 13 0.001021916 0.004714783 0.5860292 0.5860292
#> 7 0.026808128 0.030048052 0.5856093 0.5856093
#> 8 0.021434368 0.024032878 0.5854757 0.5854757
#> 5 0.036344922 0.068677288 0.5853355 0.5853355
#> 6 0.031227011 0.056487000 0.5851333 0.5851333
#> 11 0.001230570 0.003171005 0.5850940 0.5850940
#> 12 0.001019926 0.001627226 0.5849625 0.5849625
#> 10 0.004163603 0.003942894 0.5543334 -0.5543334
#> 9 0.014974552 0.014839746 0.5515620 -0.5515620