Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ggplot2]

Use this tag when referring to the R package for high level data visualization and mapping.

0
votes
1answer
24 views

Order features in a spatialpolygonsdataframe in ggplot2

I have a spatialpolygonsdataframe with many overlapping features. I want to create a map in which the smaller features are displayed on top of the larger ones so that the small ones aren't fully ...
0
votes
1answer
23 views

Plotting Geographical Grid from Long/Lat Coordinates in R

I have a file of coordinates (Long/Lat) that should enable me to plot a series of 10km grid squares covering the UK. However, for each grid square I have five sets of coordinates by way of plotting ...
0
votes
1answer
131 views

Simplifying a SpatialPointsDataFrame in ggplot world

I've been working on a map showing lines running across Europe. Each line is coming from a GPX file, parsed in like so: spdf <- readOGR("data/file.gpx", layer = "track_points") Now, if I plot the ...
0
votes
1answer
79 views

Combining postal codes into sales territories by value using R and ggplot2?

I have the shapefile for Canadian census subdivisions. For each subdivision I calculated some value (someValue). I want to combine census subdivisions into territories in such a way that territories ...
6
votes
0answers
2k views

How to prevent cross-world lines in ggplot world map?

I'm having issues displaying 'great circles' paths and polygons in ggmap, an extension of ggplot2. Please enter the following code to replicate my issues: https://gist.github.com/Robinlovelace/...
4
votes
0answers
1k views

Fortifying re-projected shapefile for ggplot2 in R

I have a shapefile of US county boundaries which I got from the NHGIS. I can load the file using the rgdal package and see information about it: library(rgdal) shp_1860 <- readOGR("shp", "...
3
votes
0answers
36 views

smearing in Linux, but not in Windows

I must have a Linux library out of wack since the following image has "smears" on the colors. Is there a better term? On my Windows 7 RStudio it works fine. this image is from a Ubuntu 16.04 LTS ...
2
votes
0answers
117 views

Plotting gam spatial estimates over map?

I have imported Italy map with the following code: library(ggplot2) library(mgcv) library(ggmap) Country <- "Italy" Get_Map_Country <- get_map( location = Country , zoom = 6 ,...
2
votes
0answers
284 views

About shp for ggmap in the R

I am a new in R and GIS, so I kindly ask you on advice. I had a shp which I want to plot on google map. The shpfile is here: http://www.filedropper.com/exercisestanddata First I do this: ogrInfo(...
1
vote
0answers
99 views

R colored raster from QGIS to ggplot or tmap

I am fairly new in doing GIS work in R, but I thought this would be a nice situation to get my feet wet. Here is the situation: I need to create multiple plots with the same background, the same ...
1
vote
0answers
112 views

could not find function “merge_eurostat_geodata”

Just a couple of codes with the same error at the time of merge data: FIRST CODE: library(eurostat) library(dplyr) library(ggplot2) library(stringr) fer <- search_eurostat("fertility") ...
1
vote
0answers
48 views

How to group different values of a variable so that they plot with same shape?

I have a table with two columns of number X and Y, and one column of strings called crystals. crystals A A B C B D B C Using ggplot2, how can I make a scatter plot of X versus Y with two ...
1
vote
0answers
168 views

ggmap with Gauss Krueger coordinates

I am using R for doing a map of groundwater levels which means I have some measurements at some coordinates in the Gauss-Krueger system and I interpolated between these measurements. I want to plot ...
1
vote
0answers
243 views

Sub setting shapefile to plot a region and addressing mismatch in ggplot & data

I am plotting India's district map with data (cases). First I read data for each district and district shapefile. Later I merge the two on district. Using fortify data I get ggplot. I get a beautiful ...
1
vote
0answers
88 views

How to solve coordinate differences between packages

I have two maps generated by two different methods. The first, I used maps package and the function map() and symbols(). On the other hand, I used the ggmap package with the ggmap() and geom_point() ...
1
vote
0answers
778 views

Trying to Create a Global Choropleth Population Density Map then add Biodiversity Level

I am trying, quite unsuccessfully, to create a global choropleth population density map for a specific 120 countries, using ggplot2. Once I have created this choropleth map, I want to add number of ...