calc_dots: calc_dots

Description Usage Arguments Details Author(s)

View source: R/calc_dots.R

Description

A function which calculates the position of number and position of dots in the final plot for each row of data.

Usage

1
calc_dots(df, col_names, n_per_dot)

Arguments

df

the merged df of a shapefile and population data

col_names

a vector of col_names to select from this merged data. If selecting all columns, can leave as NULL

n_per_dot

the number of n people in each category for every dot

Details

credit to Paul Campbell for the function in his blogpost https://www.cultureofinsight.com/blog/2018/05/02/2018-04-08-multivariate-dot-density-maps-in-r-with-sf-ggplot2/

Author(s)

Paul Campbell, Robert Hickman


RobWHickman/sf.chlorodot documentation built on June 18, 2021, 6:22 p.m.