Closed SymbolixAU closed 4 years ago
This would bring googleway parameters more in line with other common libraries such as ggplot2
Yes it would. However, I'm going to re-design the whole library in a few weeks, so it might take a while to get working / right.
Is there a way to circumvent this behavior ? Using some form of quasiquotation or quick workarround to make it support variables? @SymbolixAU
I've made a "variables" branch where you can test out this functionality
devtools::install_github("SymbolixAU/googleway", ref = "variables" )
This is now working for me
library(googleway)
set_key( "GOOGLE_MAP_KEY")
col <- "stop_name"
myPoly <- "polyline"
polyColour <- "SA2_NAME"
google_map() %>%
add_circles(
data = tram_stops
, fill_colour = col
) %>%
add_markers(
data = tram_stops
) %>%
add_polygons(
data = melbourne
, polyline = myPoly
, fill_colour = polyColour
)
Please let me know if you have any issues.
It works! Thank you very much!
got completely sidetracked so never got around to redesigning this. However, I've now merged the variables branch into master.
By design using a variable as a column identifier doesn't work. Maybe it should in the next release?
So if the variable refers to a column in the
data.frame
it's recognised as such.related #182