Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
1answer
173 views

Bubble Plots in R not displaying

I was attempting to follow a tutorial to create a bubble plot of school district proficiency rates. Data shapefile of school districts (Census2010.shp) ...
0
votes
0answers
16 views

overlay bubble plot and choropleth in R with maptools [duplicate]

I am working with US education data, and have been asked to create maps that overlay a measure of student poverty and academic achievement. Ideally, I would be able to do this by creating a choropleth ...
1
vote
0answers
152 views

Ordinary kriging with three dimensions in R

I want to interpolate temperature for a surface defined by three coordinates: longitude, latitude and altitude. I know one option is to use universal kriging on two dimensions and use altitude as a ...
-1
votes
1answer
251 views

WinBUGs giving 'Illegal memory write error' running under wine [closed]

Ok some I am trying to use Winbugs to do spatial smoothing. I am running r code in R study and using R2WinBUGS to call Wine 1.4 under Mac OSx Mountain Lion. It works ok for some models but for the CAR ...
0
votes
0answers
77 views

Why does a shapfile shift after transformation?

I have a shapefile created in the raster package (ER_14.3_2000_poly). > #read in a raster file > ER_14.3_2000<-raster('E:/Ecoregions Models/Outputs/ER_14.3/ER_14.3_ConsensusMap3.asc') > ...
4
votes
0answers
143 views

How to build Poisson autoregression model

I have a SpatialPolygonsDataFrame object in R with about 3000 polygons and associated data. I have columns of expected and observed cases. For the moment, I don't have any covariates. I'd like to ...
2
votes
1answer
78 views

Several algorithms done for topographic correction => black spots - how to solve?

I have done several algorithms for topographic correction in R including simple cosine, Minnaert, SCS. The input data aspect and slope for the hillshade raster have correctly been done in radians. The ...
2
votes
0answers
139 views

R, GeoJSON and Leaflet

I recently learned about leafletjs.com from an R-Bloggers.com post. One such tutorial that I would like to achieve is to create interactive choropleth maps with leaflet. I have been using the rjson ...
9
votes
3answers
3k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
1
vote
1answer
160 views

How to save R raster plot for ArcGIS raster file

I want to save my raster plot that produced with R to ArcGIS raster (.img, .tif and ASCII) file.
3
votes
1answer
130 views

Fix Labels United States Map Help R, R-Studio?

Does anyone know how to deal with the labels that do not fit within a states boarders? I need the labels on the east coast to be moved outside of the state and a line drawn pointing to the ...
3
votes
2answers
448 views

Add Numbers to United States Map Help R, R-Studio?

Can someone help me with creating a map in R? I need to make a map of the number of retail stores a company has in each state. All I need is the store count displayed in each state. For example: ...
3
votes
1answer
383 views

Setting extent and geographic projection in R

I have a raster and a shapefile that I am attempting to view and process in R. The shape file "ER_11.1" has the following specs: > ER_11.1 class : SpatialPolygonsDataFrame nfeatures : 22 ...
2
votes
1answer
275 views

extracting data from rasters using shapefile boundaries in r

I have a raster.stack of 8 environmental variables and a shapefile of Ecoregions for the southern U.S. files<-list.files(path='E:/Ecoregions Models/Border Bioclim/',pattern='asc', ...
1
vote
2answers
1k views

Choosing the correct value for proj4string for shape file reading in R “MapTools”

I am having a shape file of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs.. I want to check for each (lat, lng) pair from the CSV file which polygon does it fall ...
4
votes
0answers
142 views

Cut polygon and retain data

I have these two polygons: library(sp); library(rgeos); library(maptools) coords1 <- matrix(c(-1.841960, -1.823464, -1.838623, -1.841960, 55.663696, 55.659178, 55.650841, ...
1
vote
2answers
299 views

Checking if Lng and Lat fall inside polygons from ESRI Shape file

I have two input files. First: CSV file with a list of points each defined with Lng, Lat, Name Second: ESRI Shape file defining a number of polygons I would like to determine for each point I have ...
2
votes
1answer
187 views

LSA-SAF data reprojection with GDAL and R

The Land Surface Analysis Satellite Applications Facility (LSA SAF) distributes several products derived from the EUMETSAT satellites data. I am working with R to read and process the data (the file ...
1
vote
1answer
172 views

Overlay points over gadm map

This is a crosspost with stackowerflow and I hope for understanding and that it will no be closed as it concerns both cartography and R. I have already asked about plotting points dependent on ...
3
votes
0answers
190 views

Novel ways of filling in missing values in a raster

I am looking for robust ways to fill in missing values in some rasters. They all have a single layer. Missing values consist of single pixels to medium sized patches. Rasters are around 1000 x 1000 ...
3
votes
1answer
269 views

Find clusters of points based distance rule [duplicate]

I have some points that I need to divide into groups based on clusters of points: x <- c(-1.482156, -1.482318, -1.482129, -1.482880, -1.485735, -1.485770, -1.485913, -1.484275, -1.485866) y <- ...
1
vote
1answer
79 views

r raster package rasterize failing:no slots

I'm having trouble rasterizing a shapefile using the raster package in R. shp<-shapefile(ZoneShape); lcRas<-raster(lcRaster); r<-raster(ncol=ncol(lcRas), nrow=nrow(lcRas), crs=CRS); ...
2
votes
1answer
143 views

Convert lat/long four corners data to raster

I have a data set in the following format.each row represents the coordinates of the four corners of a cell and the last column is the value associated to the cell. lon1 lat1 lon2 lat2 lon3 lat3 lon4 ...
2
votes
0answers
96 views

Plot points map of population [closed]

I want to plot kind of isarhytmoc points map like in this tutorial, but with population data. However, unfortunately, I have no enough skill and only came with such code: require(sp) require(rgdal) ...
1
vote
2answers
158 views

How to modify the results of a geological dataset from vertical to horizontal?

I have a 3-D point shapefile of a geological fault dataset consisting of x,y, and z columns. I need to create a raster dataset from this point dataset. I have been trying to do this in ArcGIS; ...
2
votes
1answer
450 views

Correlation between rasters using R

In R, anyone know a method for measuring correlation between raster and spatialpixels, or between two rasters?. I read something about Kulldorff but do not understand how to use it, and maybe it's not ...
0
votes
1answer
142 views

How to shift polygons by updating their details in R

I have two polygon shapefiles and I want to see to what extent the observed amount of overlap is due to chance. I'd like to randomly move the polygons in one shapefile to new locations, measure the ...
0
votes
2answers
394 views

How to add a field to a shapefile using R

This question is trying to make sense of a post that already exists that looks good, but is failing in practice. The second ranked answer uses the foreign package to read a shapefile attribute table ...
2
votes
2answers
833 views

Setting “R Folder” Path in QGIS Sextante

I have installed R via the R-Project website. I have QGIS installed via OSGEO4W (currently 1.9.0 Master), and have Sextante plugin installed and working with GRASS and SAGA providers. I am now trying ...
4
votes
1answer
257 views

Zonal Statistics for Polygons with R

I'd like to do zonal statistics / terrain analysis with polygon overlays - I achieved to get min / max like so: library(raster) library(rgdal) alt <- getData('alt', country = "AT") gadm <- ...
3
votes
4answers
1k views

how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?

I have a SpatialPointsDataFrame with some additional data. I would like to extract those points inside a polygon and at the same time, preserve SPDF object and its corresponding data. So far I've ...
6
votes
4answers
441 views

animated map in R

everybody, sorry for disturb, but I am being quite new with r faced a crucial difficuty: I want to create an animated map of Russin with changes in unemployment with differnt years, like. On the image ...
1
vote
4answers
178 views

Detection of geographical trend of a variable

What is the best method to detect and graphically display the spatial trend of a variable? I'm looking for something that tells me the probability that the trend is from "north-west to south-east" or ...
2
votes
1answer
762 views

joining polygons

I am wondering how to join spatial polygons using R code ? I'm working with census data where certain areas change over time and I wish to join the polygons and the corresponding data and simply ...
6
votes
1answer
112 views

Open source implementation of “feature density” algorithm

I'm working on a dataset of house searches - 1 polygon for each area in which people want to find a house from an online search tool. This produces many overlapping polygons. It would be great to ...
1
vote
0answers
352 views

Validation of Regression Kriging

I am interested in exploring the idea of generating a predictive model for a target variable in a spatial context. I would then like to correct the residuals of this model using kriging, i.e. in a ...
8
votes
2answers
314 views

Problem with plotting map in R

While plotting the gadm map of Russia in R, I have a problem at the 180 degree meridian, where part of the Russian region is plotted separately. You can see it on the plot using the following code ...
1
vote
1answer
85 views

Use of Grass and R w.r.t. Land Use Prediction

In my data mining term project I need to conduct a work on geospatial data related to a big city to show possible urbanization fields in next years. I've used GRASS lately on other projects so I'm a ...
2
votes
1answer
206 views

Confused about reprojecting Google Maps (latlong) to Irish Grid TM65

Trying to transform points taken from Google maps (as latitude and longitude) to Irish Grid TM65 using the spTransform in R, and I'm confused on something. Everything I find on the net tells me ...
1
vote
1answer
92 views

Remove parts of line that fall within a polygon

I have a polygon and two lines. How can I remove the portion of each line that falls within the polygon? # polygon coords <- matrix(c(-1.798123, -1.793072, -1.805767, -1.804129, -1.798123, ...
2
votes
1answer
730 views

Raster spplot legend: how to add a title beside it

After studying for a while how to create a chart from a raster object, I got almost everything I needed except to add a title to spplot's legend. What I tried: to use mtext("XXX (m)", side=4), ...
4
votes
2answers
110 views

remove segments of lines in R

I have these 3 lines: line1 <- matrix(c(-1.81209, -1.80470, -1.80616, 55.68024, 55.67947, 55.67544), ncol=2) line2 <- matrix(c(-1.80468, -1.80330, -1.79690, 55.68322, ...
1
vote
0answers
76 views

kriging Error dimensions do not match: locations xxxx data yyyy in R

I've been working (for hours) on a kriging problem. When I run an ordinary kriging model: y.ok <- krige(y~x, locations=data1,newdata=data2), I keep getting the message: Error dimensions do ...
6
votes
2answers
550 views

How to speed up the plotting of polygons in R?

I want to plot the country borders of North America over a raster image depicting some variable and then overlay contours on top of the plot using R. I have been successful in doing this using base ...
4
votes
1answer
192 views

R gridding and contouring options

I want to make an interactive web mapping application, which will grid and contour user data. My plan is to implement R scripts with Shiny, but the only R package I can find to do this is gstat. And ...
8
votes
2answers
165 views

spatial and spatiotemporal analyses

I have a dataset that consists of 247 mosquito traps placed in fixed positions and sampled weekly for 23 weeks. I also have dengue disease incidence data (indexed to home address) during the same time ...
5
votes
1answer
1k views

R : convert a spatial polygon objet to spatial polygon data frame

My goal is to modify an existing shapefile by merging certain polygons. After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want. However, this ...
8
votes
2answers
2k views

Clipping a raster in R

I am building a map for the northeastern U.S.A. The map background needs to be either an altitude map or a mean annual temperature map. I have two rasters from Worldclim.org which give me these ...
0
votes
1answer
210 views

Extraction of raster cell values based on 'rgeos' and 'raster' buffering approaches in R

I am trying to extract cell values from a raster that lie within a certain distance from a given location (i.e. buffering). Evaluating different approaches, I found out that applying gBuffer(..., ...
6
votes
2answers
290 views

Creating randomly shaped clumps of cells in a raster from seeds of 1 cell/pixel?

As my title says, I wish to "grow" clumps of cells from seeds within a raster. My base raster is full of 1's and 0's, 1's indicate land and 0's sea/NA areas. From the 1's I wish to select 60 random ...