An R package for high level data visualization and mapping.

learn more… | top users | synonyms

3
votes
2answers
149 views

Converting osm file to shapefile (or data frame) in R

I was looking for a road shapefile for Australia today. I ended up going to Geofabrik. Open Street Map has data in .osm format. But they do not have one in .shp for Australia. If possible, I want to ...
3
votes
1answer
84 views

Projection mismatch when plotting precipitation with ggplot

I'm trying to plot accumulated precipitation in Brazil for a given period, see code below: Load packages library(raincpc) library(SDMTools) library(raster) library(ggplot2) library(rgdal) ...
0
votes
1answer
43 views

ggmap fortify start and end jumble

I have a census tiger line file for counties available from the Census website. I am trying to display this file on a ggmap, but fortify seems to jumble the regions. I can't find anyone else who has ...
0
votes
0answers
46 views

Chloropeth Map in R, Data on map not represented as in listed in the file

Below is the code for creating the Chloropeth Maps, once created, the actual problem is that the heat intensity indicated by the map is not according to the dataset column called value mentioned in ...
1
vote
0answers
144 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 ...
0
votes
0answers
63 views

Resources for mapping and displaying spatial data in R

I'd like this to be a repository for all resources available specifically for mapping and displaying spatial data in R. I've seen (and contributed) to this post, but would like this post to focus ...
8
votes
1answer
232 views

Help choosing most suitable bivariate choropleth mapping coloring scheme

I am trying to overlay a nominal variable (2 categories - rainfed vs irrigated) in a choropleth map over a numeric variable. In order to highlight the difference in pattern among the two ...
3
votes
2answers
288 views

How can I create a choropleth from the 2010 census ZCTA shapefile using R and ggplot2?

I have created state and county choropleths in R using ggplot2. The method I have used for this came from Winston Chang's "R Graphics Cookbook". For those choropleths the map was already represented ...
3
votes
1answer
117 views

plotting a SpatialPolygons object using lines() without lines connecting separate polygons

This is almost an extension of a question asked on stackoverflow (http://stackoverflow.com/questions/12196440/extract-feature-coordinates-from-spatialpolygons-and-other-sp-classes), so I'll use the ...
2
votes
2answers
232 views

How to use ggplot with Processing in QGIS 2.0?

I'm trying to use R scripts within QGIS thanks to Processing. There are some example scripts available and I achieved to plots different columns of the attribute table (with the plot built-in ...
2
votes
2answers
132 views

Plotting a certain range in azimuthal projection using ggplot2

I would like to limit a map to a particular range of values (i.e. northern hemisphere) under an azimuthal or orthographic projection in ggplot2. When I set ylim, I receive an error message that ...
1
vote
1answer
380 views

Can't plot polygons with R and ggplot2

I am new to shapefiles so I maybe ask some stupid questions, sorry. I want to plot a map of my region, with colour filled polygons using R. I have downloaded municipal (lines) and province (polygons) ...
3
votes
0answers
377 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
261 views

R with ggplot2/ggmap - How to load a png image as a map

I am trying to find a workaround for ggmap's missing support of world maps (i.e. you can't create any maps that show latitudes > 80°, due to idiosyncrasies in the mapproj package). To a limited extend ...
3
votes
1answer
621 views

Layer map plots on top of one another in R/ggplot2

I'm making a choropleth map in R/ggplot2. I have the colored part working just fine. This code p <- ggplot() + geom_map(data=c_1860, aes(map_id = GISJOIN, fill = AHL002), ...
4
votes
1answer
244 views

How to join data from NHGIS to make choropleth maps in R/ggplot2?

I have downloaded shapefiles of county/state boundaries and census data keyed to those shapefiles from the NHGIS. Both the shapefiles and the census data have a GISJOIN column to be used for merging ...
6
votes
1answer
472 views

Anyway to remove points outlying shape in ggplot2?

I am to map a plot of an area and then plot points over it (given by Easting and Northing). However, I found out that there are certain mistakes in the data entered for Easting and Northing resulting ...
4
votes
0answers
419 views

Using stat_density2d with coord_map in ggplot2

In my example I am plotting a shapefile for all England & Wales, however I'm interested in the greater London area. If I allow ggplot to simply default and display the entire shapefile then the ...
3
votes
1answer
403 views

How do I create a heatmap in ggplot?

I'm using R with ggplot2 to generate maps from shapefiles and from data in SQL Server. I'm trying to get to a stage where I can automate a large chunk of the mapping I do. So far this is working well ...
2
votes
1answer
309 views

R: How can I create a polygon from several polygons and a line?

I have some spatial objects that I want to combine, namely three polygons and a line. The ultimate goal is to create a polygon that I can overlay on an area of a map of administrative divisions of the ...