Statistical computing language and software environment.

learn more… | top users | synonyms

39
votes
10answers
4k views

What is the most useful spatial R trick?

R is becoming pretty strong tool for handling and analyzing spatial data. I learned some useful things through questions like these at SO and thought it might be useful to have something simmilar, but ...
27
votes
2answers
2k views

How can I conduct Geographically Weighted Principal Component Analysis using ArcGIS, Python and SPSS/R?

I am after a description/methodology for conducting a Geographically Weighted Principal Components Analysis (GWPCA). I am happy using Python for any portion of this and I imagine SPSS or R being used ...
26
votes
5answers
7k views

How to make beautiful maps in R?

There are quite some nice possibilities to analyse spatial data in R and in the context of my current project I would like to use R more frequently to do that. Until now I plot my maps with ggplot2 ...
25
votes
7answers
3k views

How to compare two spatial point patterns?

If I have two point pattern distributions within the same geographic region, how would I go about visually and quantitatively comparing those two distributions? Also assume I have many points within ...
23
votes
6answers
6k views

Tutorials to handle spatial data in R

Does anyone know some good tutorials to handle spatial data in R? I know that there are some packages like rgdal and maptools but I haven't actually found usefull tutorials to get in touch with the ...
18
votes
6answers
700 views

What are sources for current geo-statistical analysis classes/events: open or proprietary

I am keenly interested in geo statistics (and many other words with 3 t's :). I am not very programatically inclined but have been following several lists with this theme. One being the R filter on ...
16
votes
1answer
1k views

Robust alternatives to Moran's I

Moran’s I, a measure of spatial autocorrelation, is not a particularly robust statistic (it can be sensitive to skewed distributions of the spatial data attributes). What are some more robust ...
15
votes
4answers
11k views

How to open a Shapefile in R?

I need to open a shape file from ArcMap in R to use it for further geostatical analysis. I've converted it into ASCII text file, but in R it is recognized as data.frame. Coordinates function doesn't ...
15
votes
3answers
3k views

Using R with ArcGIS for Desktop (without using GME)? [duplicate]

I am trying to learn R generally and making statistics for maps. I found some useful tricks for making maps with it but it is not the best you can do. My everyday GIS program is ArcGIS. How I can use ...
15
votes
5answers
923 views

Speed of various raster data formats

I'm having trouble locating any discussion or comparative benchmarking of different raster file formats (e.g., for use in data analysis in R). Does anybody have any insight into why particular formats ...
14
votes
2answers
4k views

How can I convert data in the form of lat, lon, value into a raster file using R?

I have a data set of values over a km grid in the continental U.S. The columns are "latitude", "longitude", and "observation", e.g.: "lat" "lon" "yield" 25.567 -120.347 3.6 25.832 ...
14
votes
2answers
2k views

Performing Raster Noise Reduction and Edge Smoothing?

I have a raster image like this I want to delete the isolated noise point and smooth the edge (say the white single points, and I want the edges of the entity look smooth). How can I do this in ...
14
votes
2answers
3k views

Using R to calculate the area of multiple polygons on a map that intersect with another overlaid polygon

I have a shapefile downloaded from the Ordnance Survey that gives electoral ward (division) boundaries for a county of the United Kingdom. I have successfully used R to load the shapefile and plotted ...
14
votes
3answers
591 views

Ecological geospatial conundrum

I am looking for a different, more elegant solution to a spatial statistics problem. Raw data consists of an x-y coordinate for each individual tree (i.e. converted to a point .shp file). Although ...
14
votes
3answers
473 views

How to determine if trees within forest gaps are clustered?

The attached dataset shows approximately 6000 saplings in approximately 50 variable sized forest gaps. I am interested in learning how these saplings are growing within their respective gaps (i.e. ...
14
votes
1answer
704 views

Monte Carlo simulation using QGIS and pgRouting on optimal sidewalk construction

I am new to spatial analysis and would appreciate some general direction on a project I am attempting, outlined below (I am starting from scratch). GOAL: To find the best locations to install 2000 ...
13
votes
4answers
5k views

How to cluster spatial data in R?

I am very new to R, so please bear with me : > I have bunch of data points with latitude and longitude. I want to use R to cluster them based on their distance. I have already taken a look at this ...
13
votes
2answers
795 views

How to generalize SpatialPolygons and conserving topology in R?

I would like to generalize a SpatialPolygonsDataFrame in R to make plotting more efficient. The polygons I have result in huge pdf plots that are slow to load and hard to integrate into a document. ...
12
votes
2answers
541 views

Need a spatial database that can be used by QGIS and R

I'm quite new to QGIS and I'm searching for a simple way to create a Database that allows me to use the tables in QGIS and R. I have a lot of data stored in Excel spreadsheets wich will be used for ...
12
votes
1answer
3k views

How to create an attractive choropleth map in R?

I've been experimenting with choropleth mapping techniques in R, having reaped the benefits of ggplot2 for creating beautiful graphs within a powerful data analysis package. When it comes to mapping ...
11
votes
4answers
1k views

How can I generate irregular grid containing minimum n points?

Given a large (~ 1 million) sample of unevenly distributed points - is it possible to generate irregular grid (in size, but could also be irregular in shape if that is possible?) that will contain ...
11
votes
2answers
3k 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 ...
11
votes
5answers
3k views

Get Raster Values from a Polygon Overlay in Opensource GIS Solutions

I have two layers. A polygon-shape-layer with many tiles and a raster-layer containing CORINE 2006 land cover with many categories in a colourmap. I want to obtain for each polygon in the shapelayer a ...
11
votes
1answer
1k views

Random sampling of raster using R

Is there a straightforward way of randomly sampling a raster so that the output of the process is a raster? I'm using an example that I found on the r-sig-geo list and I have also tried the ...
11
votes
6answers
940 views

How to implement value-by-alpha map in GIS?

I've been doing some background reading about cartograms recently and stumbled upon interesting alternative - value-by-alpha maps. Concept is described in more details here and full paper is ...
11
votes
1answer
3k views

Projecting sp objects in R

I have a number of shapefiles in different CRSs (mostly WGS84 lat/lon) that I'd like to transform into a common projectly (likely Albers Equal Area Conic, but I may ask for help on choosing in another ...
11
votes
2answers
2k views

How to efficiently read a kml file into R

Hi I'm working with huge .kml files (up to 10 Gb) and need an efficient way to read them into R. Until now I've been converting them to shapefiles via QGIS and then back into R with readShapePoly and ...
11
votes
1answer
1k views

How to perform Random Forest land classification?

This is a follow-up to a previous post: Machine Learning Algorithms for Land Classification. It seems that the Random Forest (RF) classification method is gaining much momentum in the remote ...
11
votes
1answer
2k views

Using R with ArcGIS Desktop

In response to comments below, a re-phrasing of the question. I've used the integration of R with QGIS, and found it a very uesful tool. Having taken a look at the R toolbox extension for 9 and the ...
10
votes
4answers
1k views

Problems with NA values when reading .DEM file with R 'raster' package in Windows

I am trying to read a raster file in a .DEM format on windows using the 'raster' package in R. I get problems with NA values, when loading the data into R in Windows 7, but I do not have the problem ...
10
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 ...
10
votes
4answers
561 views

Does Google Maps API provide statistical tools or even raster to vector conversion?

I am working with a web developer who is working with Google maps API, trying to determine what pre-processing steps I should perform (e.g. in R and GRASS), and what can be done within the google maps ...
10
votes
2answers
243 views

Count raster value in a bounding box (spatial extent)

I have simple question: given a bounding box, how can I count the number of specific values (say, I am interested in the number of value == 1 ) in a raster in 1) arcpy, or 2) raster package in R?
10
votes
5answers
4k views

How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
10
votes
1answer
526 views

How to visualize azimuthal data with uncertainties?

I am trying to make a figure showing azimuthal data with a different range of uncertainties at each point. This oldschool figure from a 1991 paper captures the "bowtie plot" idea that I'm aiming for: ...
10
votes
1answer
403 views

Spatial operators in R?

How can I do spatial selections or filters in R? I can do this in PostGIS using (e.g.): SELECT * FROM mypoint, mypoly WHERE ST_Within(mypoint.geom, mypoly.geom); and it is similarly a piece of cake ...
10
votes
3answers
3k views

How to find and merge duplicate points?

I have two point shapefiles: Red and Blue. Each point shapefile has a z value which represents a radius (i.e. represented as buffers in the example). A duplicate point is defined as a point that ...
9
votes
2answers
1k views

How to get the second nearest neighbor between two point patterns in R?

Is there a way to get the distances for the second nearest neighbor between two point patterns in R? The spatstat package has a function called nncross but it only applies to the nearest neighbors ...
9
votes
1answer
2k views

Instantiating spatial polygon without using a shape file in R

So, the usual way we read a shapefile in R is via the maptools package, like this: sfdata <- readShapeSpatial("/path/to/my/shapefile.shp", proj4string=CRS("+proj=longlat")) However, I have a use ...
9
votes
1answer
379 views

How do I randomly alter a raster map of habitat types?

I have a raster of habitat types for a specific area in Scotland. I need to create future habitat scenarios with changes in habitat to assess the population viability of a bird species. For example, ...
9
votes
2answers
1k views

Aggregating points to grid using R

I have a question with regard to spatial aggregation in R. What I am trying to do is aggregate a point dataset to a grid. I am unsure however how to do this as I have little experience with this sort ...
9
votes
1answer
3k views

Raster legend in R: how to colour specific values?

I have an elevation model plotted in R r <- raster("example.dem") plot(r, col = topo.colors(20)) Some of the values are below sea level (0), and I'd like to have those display in red. How can ...
9
votes
1answer
216 views

Proximity in space and time

I have some point data which represent daily lat-lon locations of an animal, with an associated timestamp. I would like to identify all points where STATIONARY = TRUE. A point qualifies as being ...
9
votes
1answer
270 views

How to find the most spread out locations?

Probably a very simple question. I have a list of about a thousand potential geographical locations (lat lon), and of those I need to select the 200 locations that are "most spread out". I think that ...
9
votes
1answer
269 views

How to find the buildings (polygons) a user can see from a given location (point) and orientation (angle range)?

I would like to retrieve the set of buildings I can see from a given location (point -lat,lng) and orientation (interval of angles) + certainly with a given depth (e.g. 100 meters). Ideally I would ...
8
votes
4answers
2k views

R spplot tutorials

I'm in need of some tutorials/books/other training materials which cover how to use the spplot function in the sp package in R properly. As with many of these functions, it seems very powerful, but ...
8
votes
2answers
386 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 ...
8
votes
3answers
2k views

R: Download a large DEM, change projection, and adjust to smaller scale

This is a process that takes just a few seconds in GIS software. My attempt to do it in R uses a large amount of memory then fails. Is there something wrong in my code, or is this just something R ...
8
votes
2answers
1k views

How to Find the Average Raster Value of an area defined by a shapefile using R?

I have a set of raster images which represent a specific month over the years, and I want to make a timeline of the average values of an area using a shapefile. How do I extract the values from the ...
8
votes
3answers
582 views

Identification of consecutive points within a specified buffer

I have a point file, hourly relocations of an animal, and I want to be able to place a buffer around each point and calculate the number of subsequent points which are within the buffer zone. I am ...