Some of the code is inspired by https://www.blog.cultureofinsight.com/2017/06/building-dot-density-maps-with-uk-census-data-in-r/

compute_dots(geo_data, categories, scale = 1, datum = NA)

Arguments

geo_data

The base geographic data (sp or sf format)

categories

Vector of column names to re-aggreagte

scale

How many units should be represented by 1 dot

datum

allow the selection of dataum in which we sample dots in polygon