Questions tagged [rmaps]

An R package to create, customize and publish interactive maps from R.

rMaps is an R package to create, customize and publish interactive maps from R. It supports multiple mapping libraries, including leaflet, datamaps and crosslet.

References:

34 questions
1
vote
1 answer

rmaps animate choropleth by month

I am using the ichoropleth function in rmaps [https://github.com/ramnathv/rMaps/blob/master/R/Datamaps.R#L43] to build an animated choropleth. I want to animated by month rather than by year. To achieve this I have changed all instances of the term…
Dr.B
  • 57
  • 1
  • 7
0
votes
2 answers

Can't get regional geometries to work with maps of the US (R)

TLDR: Trying to graph some simple US data by census regions and I wanted to put an outline surrounding the regions, but I can't seem to get the regional shapefiles to work. Hi All, I'm new to graphing geographic data in R and am trying something…
0
votes
1 answer

Getting Invalid input type, expected 'double' actual 'logical' error in gganimate

While replicating a question posed on this website, I tried to rerun the following code data <- structure(list(x = 1:6, y = 2:7, year = c(2010L, 2010L, 2011L, 2011L, 2012L, 2012L)), class = "data.frame",…
mzkrc
  • 219
  • 2
  • 7
0
votes
1 answer

How do I add a legend using aes, ggplot2 and maps?

I'm trying to make a map with points plotted for the Canadian prairie provinces, but I'm having no luck adding in a legend to my map. I'm very new to mapping in r, so I'm not understanding how I should include aes to get a legend. My data for…
KelseyB
  • 1
  • 1
0
votes
1 answer

Zoom in on a map in R

I've created a map of Cornwall and plotted some lats and longs of sampling locations on it using the code below (for worldHires database). library(maps) library(mapdata) map("worldHires", "uk", xlim = c(-5.8, -4.7), ylim = c(49, 51), col = blue,…
HarryCa
  • 1
  • 1
0
votes
1 answer

How can I add Axis Title to axes in R maps?

I am trying to add Lat and Lon axis titles to a map in R maps. I cannot find the appropriate arguments in R maps. library(rMaps) chile <- map("worldHires", regions="Chile", plot=FALSE, fill=TRUE) map("worldHires", xlim = c(-90,-50), ylim =…
0
votes
0 answers

Cannot run map_data(“state”)

Similar to this post, I have the following problem. states <- map_data("state") Error in .C(C_map_type, as.character(mapbase), integer(1)) : Incorrect number of arguments (2), expecting 0 for '' I have the latest maps library installed…
NSchleif
  • 1
  • 2
0
votes
0 answers

How to export my interactive r map to a clickable file?

There is a huge variety of r packages for interactive/dynamic maps out there, like leaftlet or rMaps etc. However, I am struggling to understand if and how I can export my interactive maps to a file, like .html or .js, which I than can sent to…
Til Hund
  • 1,543
  • 5
  • 21
  • 37
0
votes
0 answers

Adding javascript markers using Leaflet

I'm trying to do similar to https://github.com/ramnathv/bikeshare by @Ramnath but I can't get the markers/points to show up on the map. Here is the code: shinyServer(function(input, output, session) { output$interactivemap <- renderMap({ map…
galzra
  • 31
  • 7
0
votes
0 answers

can I know which versions of Rstudio and r is compatible for package "rmaps"

When I tried to use install r package 'Rmaps' I got this warning install.packages("rmaps") Installing package into ‘C:/Users/Anjana/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘rmaps’ is…
rbeginner
  • 43
  • 5
0
votes
0 answers

Can I use function-crosslet to plot states in America?

library(rMaps) crosslet( x = "country", y = c("web_index", "universal_access", "impact_empowerment", "freedom_openness"), data = web_index ) For this code, x="country", I want to change x to states. How can I do that?
zack
  • 1
0
votes
0 answers

R interactive maps with multiple layers

I'm trying to create a map of US states comparing two variables, over time. I'd like to make this web based, and interactive. I've successfully done this combining R, leaflet, and Shiny. However, it is really really…
0
votes
0 answers

R get_map Custom map

My data frame looks like that: Sho lat lon autoroute 1000001 46.20114 5.19791 0 1000002 46.21842 5.22767 1 1000004 46.18836 5.24447 0 1000006 46.20754 5.23758 1 1000007 46.20105 5.24891 0 I'm…
Jeisson
  • 25
  • 8
0
votes
0 answers

Crosslet Package not Working

https://github.com/ramnathv/rMaps I tried reproducing this example and the map isn't showing: library(rMaps) crosslet( x = "country", y = c("web_index", "universal_access", "impact_empowerment", "freedom_openness"), data = web_index ) Do I…
analytics
  • 149
  • 1
  • 9
0
votes
1 answer

r - add multiple markers to rMaps

Question How do you add multiple markers using rMaps? Data coords <- structure(list(stop_id = 19841:19843, stop_name = c("Flagstaff Railway Station (Melbourne City)", "Melbourne Central Railway Station (Melbourne City)", "Parliament Railway Station…
tospig
  • 7,762
  • 14
  • 40
  • 79