Questions tagged [ggmap]

A package for plotting maps in R with ggplot2

is an package that allows for the easy visualization of spatial data and models on top of Google Maps, OpenStreetMaps, or Stamen Maps using .

Resources:

1005 questions
0
votes
1 answer

Simple Contour map

I just discovered ggmap and I've been playing around with plotting earthquake data from the USGS. I get the data in the form of Lat and Lon, depth and magnitude. I can easily plot the earthquakes as points with different colors based on depth but…
0
votes
0 answers

How to use gglocator without specifying number of clicks in advance?

Using gglocator() like that defaults to one click. Is it possible to use ggloactor such that it deals with the dynamic number of clicks? i.e. User should be free to click as many number of times he wants. ?
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
-1
votes
1 answer

Plotting a map in R with different labels and colors

This is the way I've organized my data to plot the map. I would like to have all points with the split label Night in one colour (let's say, blue) and all of the points with the label Day with a different colour (can't see Day on the sample…
juansalix
  • 503
  • 1
  • 8
  • 21
-1
votes
2 answers

Continue looping if address not found

AIM: I am trying to retrieve a series of maps using the get_map function from ggmaps. I know the following works when I use latitude and longitude: houses_maps <- lapply(latlon, function(x) get_map(location =…
delcast
  • 496
  • 1
  • 5
  • 16
-1
votes
1 answer

Labeling polygons with ggmap

I think I must be overlooking something very simple here. I'd like to apply labels to a set of polygons. Specifically, I'm trying to place labels on a handful of California congressional districts. I begin by getting the basemap (socal) and…
jubjub
  • 107
  • 8
-1
votes
1 answer

ggtitle not displaying with ggmap

I do not understand why ggtitle("My Title") + or labs(title = "My Title") + is not displaying my title. Here is my code: require(raster) country <- getData("GADM", country="Australia",level = 0) points <- data.frame(id = c(1:5), lon = c(125, 144,…
aterhorst
  • 625
  • 4
  • 14
-1
votes
1 answer

Plotting multiple lines on 1 map

I'd like to map 2 different routes on 1 map. This is the code I made as an example: ### Plot 2 routes on 1 map # libraries library(ggmap) library(ggplot2) # plot map basicmap <- get_map(location = c(lon = 3, lat = 50), zoom =…
1053Inator
  • 302
  • 1
  • 15
-1
votes
1 answer

Maptools: Plotting different geographic groups with different colors

I have a dataset with biological groups and its geographic information: results2 ID Latitude Longitude A -3,5 -39,5833 A -7,0167 -37,9667 A -9,2258 -43,4631 B -16,6667 -49,5 B -15,4333 -55,75 B -19,0333 -57,2167 C -29,2 …
-1
votes
1 answer

Obtaining maps that contain location with 2+ US states (cities, etc.) with get_map (location as a vector)

Concept of ggmap seems clear to me: Use get_map to obtain a map at a certain location at a certain spatial zoom. Use ggmap() + ggplot() to combine map image with ggplot graphics. The challenge at the moment lies in step 1 and, precisely, location…
topchef
  • 19,091
  • 9
  • 63
  • 102
-2
votes
1 answer

ploting ggmap with geom Points (lat_long) annotated 1 to19. Points data is in CSVfile

I am plotting with ggmap and ggplot2 using geom_point. I want to add annotation text (i.e., 1 to 19) close to the points as well. Here is my…
-3
votes
1 answer

How to fix overlaying polygons in US map?

The below gives overlaying polygons, how to fix it? library(ggplot2) ggplot(data = map_data("state")) + geom_polygon(aes(long, lat, group = region), color = "red", fill = "red", alpha = 0.2)
Dambo
  • 3,318
  • 5
  • 30
  • 79
-3
votes
1 answer

R - ggplot - How to automatically set point color based on values?

My question is similar to this question. But I can't transfer it to my own data. I have a dataframe like this (over 1400 rows): Code Stationsname Startdatum LAT LON Höhe Area Mean 1 AT0ENK1 Enzenkirchen im…
Essi
  • 761
  • 3
  • 12
  • 22
-3
votes
1 answer

Plotting sized circles using R

have visualised the following set of data in Tableau but need to know how to do it using R as I'm new to it. Dataset: Merchandise Stores Year Total.Sales Latitude Longitude 1 White goods Shop01 2015 45,547,000 -37.8594 144.7994 2 White…
-3
votes
1 answer

Plotting in R 3.1.2

I have records of data by account (say unique 400 records). Each record has three different indications indicated premium. For each record, I am concerned with how the indications compare to each other. In some cases, the indications may be all…
ActuaryGuy
  • 23
  • 1
  • 5
-4
votes
1 answer

How to create a data file in R program

I want to show sum of cluster in different districts on a map in R. The data file i have imported in R studio contains total of 11 clusters appearing multiple times in a district. Below is the data example: District cluster Rawalpindi …
Nido
  • 55
  • 1
  • 1
  • 10
1 2 3
66
67