Skip to contents

This package is able to select any polgyon object(country, county or state) from any map visualization formed by ggplot or any other package extension deployed in Shiny. It is an extension of nearPoints() but specifically for maps. It takes in original data used to form map in ggplot, data collected by nearPoints function and input$plot_click value

Usage

mingiPolygons(data_main, click_vector, col_spec, thresh, max_pts)

Arguments

data_main

original data used to form map in ggplot

click_vector

input$plot_click value

col_spec

column containing names of polygon objects

thresh

the threshold value for data points that can be collected by nearPoints function

max_pts

the number of data points to be collected by nearPoints function

Details

Value

Name of the polygon object

References

Author

Martin Mburu Ted Muthomi

Note

See also

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--  or do  help(data=index)  for the standard data sets.

## The function is currently defined as
state <- mingiPolygons(final_stats, sep_df, unknown, "county")
#> Error in nearPoints(data_main, click_vector, threshold = thresh, maxpoints = max_pts,     xvar = "x", yvar = "y"): could not find function "nearPoints"
print(state)
#> Error in eval(expr, envir, enclos): object 'state' not found