# install remotes if you do not have it already install.packages("remotes") # install globe4r remotes::install_github("JohnCoene/globe4r")
Once installed, you can load the package.
Every globe will be initiated with the
You can use any background you want for globe using the
globe_img_url function; as indicated by the function name these must be served on a server (i.e.: the
www forlder of a Shiny app). The
image_url function provides easy access to four popular such backgrounds, you can also use any from the echarts4r.assets package.
With a globe drawn we can pipe (
%>%) various data layers:
The package makes use of
coords (coordiantes) which behaves like the
aes function in ggplot2.
create_globe() %>% globe_pov(-21, 179) %>% # position camera globe_bars( coords(lat, long), data = quakes )
There are numerous coordinates (
You can use the various
altitude is ideally between 0 (flat) and 1 (radius of the globe).