Statistical computing language and software environment.

learn more… | top users | synonyms

5
votes
2answers
127 views

How to make a bivariate colour ramp with QGIS, R or similar?

Many recent maps I have seen have these neat two-way color gradients that can be used to color correlations between continuous estimates. Here is an example taken from a recent publication (Source: ...
2
votes
1answer
376 views

Mapping Geocoded addresses onto Census shapefiles in R

I have a list of addresses that I have geocoded to get the corresponding longitude and latitude. > AddressDetail <- geocode(match_address) > coordinates(AddressDetail) <- c("lon", "lat") ...
2
votes
1answer
47 views

R function for Thiessen Polygons

For a point data set with temperature data I have, I want to create their Thiessen Polygons in R. So far, the only algorithm I have found is that of Carson Farmer ...
4
votes
3answers
64 views

How can I snap one set of points to another in R

I would like to snap one set of points (SpatialPoints* objects) to another in R using Euclidean distance. I'm hoping for a function like maptools::snapPointsToLines. The attributes of the points ...
6
votes
5answers
3k 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 ...
3
votes
1answer
210 views

Is co kriging appropriate for interpolation of three spatial co variates?

I want to estimate an interpolation model(s) for daily minimum temperature, daily maximum temperature and daily rainfall. I have samples of approximately the same size for all three variables at ...
2
votes
1answer
510 views

Variogram model fit compatability among geoR, gstat, and nlme packages in R

I'm trying to specify the covariance structure parameters in a linear mixed model (using the correlation structure facilities in nlme). The parameters are estimated from a gstat or geoR variogram ...
3
votes
1answer
205 views

Three-dimensional interpolation of temperature profiles using gstat in R?

I'm working on a problem in which I'd like to interpolate a set of oceanographic temperature profiles over a three-dimensional matrix of unsampled x, y, & z locations. The data to interpolate is ...
4
votes
1answer
305 views

R Raster package loop over pixels

I want to perform a trend analysis for each pixel over it's time dimension. Therefore I wrote a loop over each pixel doing the calculation but this is extremely slow. I am sure there must be a faster ...
4
votes
1answer
119 views

Classical or robust variogram for incorporation into generalized linear model

I'm modeling counts of organisms over time at eleven locations. I'd like to account for temporal autocorrelation in the counts, assuming it's present. As the data are not equally spaced in time, ...
1
vote
1answer
51 views

resize map and add points to it using R

I am working with spatial data UK. The map is plotted here. I want to resize the map and make it bigger and clear! here is my code LA <- readOGR(dsn =".", "infuse_dist_lyr_2011_clipped") ...
2
votes
1answer
51 views

Geographic Heatmaps with Concentric Circles by Distance

I'm looking to generate a geographic heatmap (using 'ggmap') that overlays some dimension (to start, housing prices) over the lat/lon near a city center. Then I want to create circles of equi-distant ...
1
vote
1answer
115 views

Legend and coloring of markers with plotGoogleMaps in R

I have a data frame (X) that looks like this: code cluster name longt latit 101 1 A -89.6171 35.24992 105 1 B -90.0154 35.10510 106 2 C ...
1
vote
2answers
29 views

How to import several GeoTiff files into R?

I think that must be a "simple" way to import several Geotiff files into R instead of copy and paste n times Rfd<-readGDAL() and then save them as individual objects. I found the following code in ...
0
votes
0answers
18 views

using raster.predict for Cubist model, factor levels list

I would like to thank in advance any help or advice. Let me know if I need to provide more reproducible data/code. I am working on a Cubist prediction model for soil texture, using continuous and ...
11
votes
7answers
1k 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 ...
0
votes
0answers
26 views

Intersection of two Raster objects

I have two raster objects r1 (in grey and green) and r2 (in pink) that I want to intersect with R. I tried with the R function intersect from the raster package but it only intersect the extent of the ...
4
votes
1answer
112 views

Working with MODIS in R

I am new to using MODIS data and was hoping to get some help starting out. I have been able to download the hdf file but viewing it in R has been a problem for me. What I have found so far, and ...
0
votes
2answers
25 views

Export GRASS raster as GeoTiff : nodata values exported as -nan (what happens in R?)

I am using the package raster to work with GeoTiff raster files which I expoerted from GRASS using r.out.gdal. GRASS assigned the value -nan to some raster files (type FLOAT32) for missing values. ...
0
votes
0answers
40 views

Couldn't load plugin processing in QGIS: Access is denied for R

Couldn't load processing plugin due to flowing error. Any help? thanks. Couldn't load plugin processing due an error when calling its initGui() method Traceback (most recent call last): File ...
0
votes
1answer
82 views

export list as shp in R

I have a list of coordinates with which i can create a path and I want to export this list as shp. I have "shapefiles" package but I didn't find the way to do this. Is there a way to do this with this ...
5
votes
1answer
196 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 ...
0
votes
1answer
30 views

R code for SDM using randomForest

I wonder if someone can provide me with R code for running Species Distribution model using randomForest where I can't find any tutorials or demos for this.
3
votes
1answer
69 views

Dissolve Polygons using R / join specific polygons

I have data in shapefile format :: UK_boundaries I am new to R and Spatial data as well, I am trying to join some areas to be as one area no line(s) between them. Based on my search I understand ...
1
vote
0answers
16 views

R geographically weighted regression with negative binomial distribution

I'm trying to find a R package that allows me to do geographically weighted negative binomial regression. I'm aware there's 'spgwr' and 'glm.nb' package. But is there a package that combines the two? ...
1
vote
1answer
115 views

How to do supervised image classification in saga with the help of R script or Python script

I am using Ubuntu 12.04 and want to do image classification in SAGA. SAGA has numerous classification algorithms which is not present in GRASS and QGIS. I am new to SAGA, but more accustomed to work ...
2
votes
4answers
59 views

In R, set NA cells in one raster where another raster has values

I have two rasters in R. I want to set values to NA in the first raster where the second raster has values. I think this should be simple, using the raster package, with two RasterLayer objects ...
1
vote
2answers
63 views

rasterize produces a raster full of NA values

I am having trouble converting a polygon to a raster. The desired raster is created, however all its values are equal to NA. require(rgdal) require(raster) #download a shapefile with 2010 census ...
1
vote
1answer
43 views

Is there any statistical measure/tool that compares two different sets of location configurations in R or ArcGIS/QGIS?

Here is what I'd intend to do; I have a given set of facility locations as shown below; And based on a predefined one optimization criterion, I obtained the following configuration (and there are ...
5
votes
1answer
950 views

Interpolating Maps - Statistical Learning Techniques vs Spatial Statistics Techniques

I have recently begun experimenting with the interpolation of variales over a whole country. I have good sized training set where I have several dependant variables (continuous and categorical) ...
4
votes
0answers
52 views

ArcGis Raster Resampling Question [duplicate]

Possible Duplicate: How do you decide what interpolation method to use for resampling raster data? I want to interpolate a certiain target variable over a large territory. I trained a ...
3
votes
2answers
500 views

How to utilise single 'randomForest' model for several rasters in R?

I am using randomForest package in R to derive species distribution models. When I predict the model to the RasterStack containing the predictors in which the values were extracted to build my model, ...
0
votes
1answer
27 views

Raster import from GRASS to R - handling nan/NA

I have several doubts, so I will try to be as clear as possible... thanks for your understanding. I am generating a regression model using several environmental covariates. Before importing the GIS ...
2
votes
2answers
162 views

Converting LANDSAT-8 TIFF to matrix, data frame, or SpatialGridDataFrame formates

I need to correct the reflectance values of LANDSAT-8 data for steep terrain and find it too tedious and clunky in ArcGIS. The data I have is: LANSDAT-8 DEM (ASTER) Slope and aspect (Derived using DEM ...
3
votes
1answer
327 views

ggmap: create circle symbol where radius represents distance (miles or km)

I am trying to add a circle around a given latitude and longitude point where the circle size (radius) reflects distance in miles or km. I managed to come up with this example using ggmap, where I ...
1
vote
0answers
42 views

Is it better to work with non-contiguous or contiguous polygons?

I would like to find width-height of a non-contiguous polygon in order to draw paths within it. My question: Is it better to use a bounding box (contiguous polygon) and then clip keeping my real area ...
1
vote
1answer
47 views

Checking if points within shapefile

Zillow has a set of shapefiles for different neighborhoods of major US cities. I wanted to check if certain buildings were present in certain neighborhoods using R: library(rgeos) library(sp) ...
0
votes
2answers
230 views

Unable to run R in QGIS 2.6 - rgdal unavailable for R 3.1

I'm attempting to use R within QGIS2.6 on OSX Mavericks but cannot get R to run because rgdal is not available as binary for R3.1.2 (see QGIS log output from R execution console below). I have ...
1
vote
1answer
608 views

Calculate area covered by a particular raster layer within polygons in QGIS

I am trying to extract information on vegetation cover within a set radius of point locations (my sites). I have succeeded in creating a new vector layer of circles with a 5 km radius around my sites. ...
0
votes
0answers
54 views

Simulation of random flight paths for helicopters

I am trying to simulate 130 (random) flight paths for helicopter (just for practice) and I use R. So far I didn't find a package for simulation of random paths. I only found Random Walk but is not ...
3
votes
1answer
52 views

Spatial interpolation with breaklines in R

I have a dataset consisting of irregularly-spaced points (x,y,value) that represent an area of ocean that contains some land. I need to interpolate these to a regular grid, ensuring that the ...
1
vote
1answer
110 views

What's the difference in these two shp files?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area ...
2
votes
1answer
38 views

How to handle duplicate id's when using the as_sp function in the R osmar package

Sometimes when I want to convert a subset of ways from an osm file loaded with the osmar package, I run into an error complaining about duplicate row names. The following code run on this file in ...
2
votes
1answer
42 views

How to do a Kernel Density with “population field” in r?

In ArcGIS, I can generate a kernel density map and weigh it by population field. For example, I can use city's population as weighting factor, so that more populated city has higher influence to the ...
3
votes
1answer
38 views

How to compare a classified raster dataset to another polygon dataset?

I am going to perform an unsupervised classification on my dataset and will get a map as a result. The objective is to rebuild an already existing map (of different soil types) with my new dataset. ...
1
vote
2answers
275 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 ...
8
votes
1answer
3k views

Converting point data into gridded dataframe for histogram analysis using R?

I am very new at using GIS data and only modestly experienced with R. I've been reading about how to analyze spatial data using the spatial-analyst.net PDF book, so I'm not completely lost, but I ...
0
votes
1answer
66 views

how to convert list of stack images to timseries files in R

Iam using bfast package for time series analysis. But it requires the files to be read as timeseries Problem: How to convert list of stacked images from 2000 t0 2013 into a time series and given as ...
2
votes
1answer
336 views

NDVI time series in R — how do I create a time series object from a data frame?

I am doing a time series analysis of NDVI using the bfast package in R. Bfast requires a time series (TS) object. I have successfully created a data frame with the NDVI at various point locations ...
0
votes
0answers
12 views

Converting adf rasters to asc? [duplicate]

I have a number of adf raster files, and I need to use their data in asc format. I have QGIS, but prefer to do the conversion using R so that it can be batched and coded with the rest of my project.