This function wraps the process I have been using to construction data classes for
choropleth maps using ggplot2
.
1 |
.data |
A tbl or sf object |
var |
The existing variable to create classes of |
newvar |
The new variable for storing the factor data |
classes |
The number of breaks or classes to create |
style |
The method for calculating classes, see classInt::classIntervals |
clean_labels |
A logical scalar; if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.