Statistical computing language and software environment.

learn more… | top users | synonyms

9
votes
0answers
279 views

Identifying overlapping time intervals with two more criteria in R?

I have to check birds observations made over a longer period for duplicate/overlapping entries. Observers from different points (A,B,C) made observations and marked them on paper maps. Those lines ...
7
votes
0answers
686 views

How to get rpy2 for QGIS on OSX?

I am a new QGIS user, have installed QGIS on a Mac running Snow Leopard OSX 10.6.8 following all the instructions. QGIS seems to work well for everything other than when I boot up I get the message ...
5
votes
0answers
185 views

How to display wind data in R with the leaflet package

I have some data like this : longitude latitude speed direction 1 6.10722222 46.23639 4 360 2 6.95416667 43.54694 4 360 3 7.21472222 43.66556 ...
5
votes
0answers
93 views

rMaps choropleth with custom json

With R I want to make an animated choropleth map with the rMaps package and a custom map. I tried to follow the example of Diego Valle described here and to use the custom map info for Datamaps. ...
5
votes
0answers
112 views

Interpreting semivariogram high nugget

I made a semivariogram in R using package gstat, variogram() function. I want to see if there is spatial autocorrelation in the residuals of my model (species abundance as a function of habitat, ...
5
votes
0answers
98 views

Resampling air temperature gridded data to sub-grid resolution

I'd like to obtain a 30-m resolution gridded dataset of air temperature from the ~1km gridded data of WorldClim, of Hijmans et al., 2005) for a mountainous region. The easiest procedure (I thought ...
5
votes
0answers
825 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 ...
4
votes
0answers
46 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
4
votes
0answers
84 views

Which statistical methods to compare the spatial distribution of two different variables in two raster maps?

I am working with two global raster maps using the R Software (original file: netCDF for map 1 and GeoTIFF for map 2), with a resolution of 5 min of arc. Map 1 contains data on the share of the land ...
4
votes
0answers
70 views

Crop raster based on another raster R

library(raster) How can one clip one raster based on another raster? RasA: class : RasterLayer dimensions : 459, 533, 244647 (nrow, ncol, ncell) resolution : 10000, 10000 (x, y) extent ...
4
votes
0answers
56 views

How to interpolate within defined boundaries of a deformed mesh using R?

My goal is to create an interpolation map of some output model results that are mapped on a deformed mesh (from a numerical simulation). The model results are in an x-y plane (representing ...
4
votes
0answers
73 views

Why does @data@values slot for RasterLayer only contain logical(0) and not the actual values?

Trying to get to the bottom of why, when I read in a raster of NDVI, the @data@values slot does not contain the actual values until I set them manually. For example: NDVI <- ...
3
votes
0answers
92 views

MODIS R Package: GDAL Not Available

I am trying to analyze the MODIS EVI 250m, 16day dataset. I found the R MODIS package and am following the instructions here: ...
3
votes
0answers
100 views

Interpreting Global Moran's I and should I krig?

I am trying to weigh up if kriging (or cokriging) the residual error from my model is a valid approach. My first step was to compute whether the error is spatially autocorrelated. I have done this ...
3
votes
0answers
113 views

Spatial weight matrix with boundary effects in R?

I need some help to finalize code for a spatial weight matrix that uses a nearest neighbor definition within regions, but does not allow neighbors from across a political border. For example, ...
3
votes
0answers
191 views

Subset two rasters with different extent and origin (and resolution) only where there are data in both in R

in R, I have two rasters with different extents and origins (and possibly even resolution). How to efficiently take the subset of each of them only where there are data in both of them? Here is a ...
3
votes
0answers
129 views

kriging of compositional data (grain size)

I have posted this already in the GEONet Forum but without any suggestions, now I am hoping for some feedback here: I have a problem concerning interpolation of compositional data of grain sizes. I ...
3
votes
0answers
51 views

How to set m parameter of clusterR function in R?

I want to manage a clustered computation on raster and thus use the "clusterR" function in R (package 'raster'). However, there's a tuning m parameter to set, but the only explanation about this ...
3
votes
0answers
209 views

How to calculate 90% confidence interval in a raster stack

I have a stack of grid files (23) in ASC format from a MODIS sensor and I need to calculate a 90% confidence interval, mean, min, etc, for each one in R, how can I do that? specially the interval. ...
3
votes
0answers
197 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
3
votes
0answers
839 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
184 views

Can extracting raster values work in polygons' CRS without raster resampling?

I am trying to extract raster values using polygon layer with different CRS. Raster is in WGS84 (EPSG:4326) and the polygons in UTM (EPSG:23031). 1. If I want to work in the projection of the ...
3
votes
0answers
693 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
0answers
349 views

How do I access layer attributes from within QGIS' manageR plugin?

This is probably a fairly basic question, but searches for manageR come up with a lot of noise, and there's no manageR tag. What I'd like to do is load the attributes from a particular field of a ...
2
votes
0answers
20 views

Kernel Density with vector output and/or possible automation?

I'm currently working on a project that will have me calculate the kernel density of a number of shapefiles with varying parameters. My current workflow goes like this: Import shapefiles in QGIS ...
2
votes
0answers
16 views

TryCatch for if two extents?

I have some spatial processing in R that I want to do. After selecting out the appropriate polygon (clip1) I want to crop the raster on that polygon with the command clip1 <- crop(imported_raster, ...
2
votes
0answers
34 views

Failed to create a raster-brick from a netCDF file (.nc)

I am trying to build a raster-brick from a netCDF file (network Common Data Form) leave this link for more information () but to make a brick (which is part of the package raster) throws me the ...
2
votes
0answers
26 views

Filtering Small Areas of Shapefiles Using R

I'm trying to use the method proposed by the @ialm in the Question "How to speed up the plotting of polygons in R?" There, he loads the maps using getData from the raster package, I tested and it ...
2
votes
0answers
19 views

Creating a reference raster in R

I need to create global reference raster (100km grid, Eckert IV). Later, I will project other various rasters (with different resolutions and projections) into the resolution/projection of the ...
2
votes
0answers
60 views

Differences in MaxEnt between 'Biomod2' and 'Dismo' package

I am trying to run an ensemble species distribution, however the the results I am getting for MAXENT.Phillips model are not reasonable projections compared to the Random Forest and Boosted Regression ...
2
votes
0answers
42 views

Is there an R package for finding the maximum-area rectangle in a non-convex polygon?

Does anyone know if there is an R package out there with an algorithm which finds the largest rectangle within non-convex polygons? I have Googled, searched the R Sig Geo archives, and looked here on ...
2
votes
0answers
39 views

How to clip a .osm.pbf file to a shapefile in R

I have (1) an OpenStreetMap file of a large area in .osm.pbf format that I would like to clip with (2) a shape file .shp of a smaller area using R. The output output I would like to get is a ...
2
votes
0answers
53 views

Extract values from Rasters in R based on spatial points and spatial polygons

I am trying to extract values from a raster file using the extract command in R mentioned here: http://www.inside-r.org/packages/cran/raster/docs/extract My raster file is unprojected (WGS84 ...
2
votes
0answers
31 views

Converting u and v from WGS84 to NZTM2000 - Do I need to do vector conversion?

I have u and v wind component values in latitude and longitude in WGS84. I want to convert this to NZTM2000. I've converted the lat/lon in ArcView - (and will try in R) - but do I need to also do some ...
2
votes
0answers
23 views

In QGIS 2.12 processing R scripts fails (plots remain blank) due to a wrong variable name - Is there a workaround?

I am trying to execute r scripts in 2.12. All of them fail. Plots remain blank. It seems that the variable "Layer[[Field]]" returns NULL: E.g: hist(Layer[[Field]],main=paste("Histogram ...
2
votes
0answers
69 views

Adding a custom color scale for a sp.points layer to levelplot() legend

I'm wondering how I can add a customized color palette that I used to display a sp.points layer in a call to levelplot (lattice plotting) in the rasterVis package in R. I used a function that Dave X ...
2
votes
0answers
91 views

R: Setting pop-ups dependent on zoom level using leaflet

I have data that I would like to group differently, depending on the zoom scale in an interactive map made using leaflet. I have expenditure data and I would like to show expenditure by lake at ...
2
votes
0answers
75 views

R Efficient Way to Resample, Crop, and Mask a Raster Image

Does anyone know an efficient way to resample an image? I am currently trying to crop a large image and clip 2 regions from a shape file. From this clipped image, I would like to increase the pixel ...
2
votes
0answers
43 views

Keys for merging US state/county ANSI's with GADM Unique identifiers?

I've got county-level data from USDA NASS, and I want to merge it with gridded climate data. A preliminary step is the associate the counties with the coordinates of their centroids. If I merge by ...
2
votes
0answers
68 views

How to pull a shapefile into R from PostGIS database (in Windows)?

I'm currently working on pulling data from a PostGIS database for the first time to map in R and need some help. The database contains a shapefile of countries/regions of the world. I am able to pull ...
2
votes
0answers
159 views

In R: Convert from WGS84 lat/long to UTM and back again to WGS84 lat/long

I am looking for a way in R to project WGS84 latitudes and longitudes to a UTM grid and then convert the UTM coordinates back to the WGS84 latitudes and longitudes. I have found a number of ways to ...
2
votes
0answers
76 views

Doing spatial regression using big data when Spatial weight matrix is too large for R?

I am currently doing an analysis on a quite huge data set - 250,000 polygons. I have figured out the general Moran's I for a linear model, but when I was trying to do a spatial lag or spatial error ...
2
votes
0answers
48 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: ...
2
votes
0answers
73 views

How to visualise change matrices over time

i've hit a bit of a tricky visualisation issue; I am quantifying some land use and land use change (LULUC) over a number of years. Typically, for data going from year to the next, a land change ...
2
votes
0answers
51 views

Raster memory usage in R

I am working with raster/brick data in R and running into memory issues. I am basically trying to use raster objects to perform some simple agent-based modeling, but the objects keep increasing in ...
2
votes
0answers
82 views

Efficiently calculate distance between raster patch edges

I have a binary raster which I've classified into patches using raster::clump. I now want to efficiently calculate the edge-to-edge, i.e. minimum, pairwise distance between patches. I am currently ...
2
votes
0answers
75 views

Merge Spatial polygons from shapefiles

I have downloaded the shapefiles from the following website: http://download.geofabrik.de/europe/france.html Each zip contains a "landuse" shapefile and I want to merge all of them in one single ...
2
votes
0answers
127 views

Get the intersection of two dataframes of coordinates R

I have two dataframes with geocodes. The first looks something like this: spoints<- data.frame(x=c(1,2,3,4,5,6),y=c(6,5,4,3,2,1)) spoints maps a country. My second data frame looks like this: ...
2
votes
0answers
64 views

From track+waypoints to elevation profile with waypoints

I have a track and waypoints (1) imported in QGIS. I want to calculate the closest point from every waypoint to the track (2). Then, I want a table with data that allows me to draw an elevation ...
2
votes
0answers
80 views

How to clip or erase a csv file with a non-rectangular shapefile?

I can clip a csv file with a ogr2ogr having 4 extents of a rectangular polygon. Is it possible to clip a csv file with a non rectangular shapefile?