The base Choropleth2 object.
The base Choropleth2 object.
Public fields
user.df
input from user
map.df
geometry of the map
choropleth.df
result of binding user data with our map data
title
title for map
legend
title for legend
warn
warn user on clipped or missing values
ggplot_scale
override default scale.
ggplot_polygon
null
projection_sf
null
projection
null
ggplot_sf
null
Methods
Method new()
a choropleth map is defined by these two variables
Arguments
map.df
a data.frame of a map
user.df
a data.frame that expresses values for regions of each map
Method get_min_long()
left
Usage
Choropleth2$get_min_long()
Method get_max_long()
right
Usage
Choropleth2$get_max_long()
Method get_min_lat()
bottom
Usage
Choropleth2$get_min_lat()
Method get_max_lat()
top
Usage
Choropleth2$get_max_lat()
Method get_bounding_box()
get_bounding_box
Usage
Choropleth2$get_bounding_box(long_margin_percent, lat_margin_percent)
Arguments
long_margin_percent
null
lat_margin_percent
null
Method get_x_scale()
get_x_scale
Usage
Choropleth2$get_x_scale()
Method get_y_scale()
get_y_scale
Usage
Choropleth2$get_y_scale()
Method get_reference_map()
get_reference_map
Usage
Choropleth2$get_reference_map()
Method get_choropleth_as_polygon()
get_choropleth_as_polygon
Usage
Choropleth2$get_choropleth_as_polygon(alpha)
Method render_with_reference_map()
render_with_reference_map
Usage
Choropleth2$render_with_reference_map(alpha = 0.5)
support e.g. users just viewing states on the west coast
Method discretize()
discretizing values means
Method prepare_map()
prepare_map
Usage
Choropleth2$prepare_map()
Method get_scale()
get_scale
Method theme_clean()
theme_clean
Usage
Choropleth2$theme_clean()
Method theme_inset()
theme_inset
Usage
Choropleth2$theme_inset()
format_levels
Usage
Choropleth2$format_levels(x, nsep = " to ")
Method set_zoom()
set_zoom
Usage
Choropleth2$set_zoom(zoom)
Method get_zoom()
get_zoom
Method set_num_colors()
set_num_colors
Usage
Choropleth2$set_num_colors(num_colors)
Method clone()
The objects of this class are cloneable with this method.
Usage
Choropleth2$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.