Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
1answer
22 views

Getting range value from exponential variogram model

I am using vgm() from the gstat library in R: variogr <-vgm(sill,"Exp",range=range,nugget=0) output <-krige(...,model=variogr) As you can see I'm using fixed psill and range values. Before ...
0
votes
1answer
48 views

How to rank according to a distance in a shapefile using R?

I would like some help on the theory behind this. I have done this in GRASS easily but doing it in R is not the same. Here's the table with the info, there are more tables similar to that but refer ...
1
vote
1answer
31 views

Is it possible to zoom out a plot of a map in R?

Sometimes a plot looks zoomed in how to arrange that? i use the rgeos package mainly. When i do a buffer for example somewhere the plot tends to zoom in some part of the map which is not good since it ...
2
votes
1answer
57 views

How to join a dataframe with a dbf via a common column in R?

I have a SpatialPointsDataFrame with the data of a city and i want to join it with a dbf that contains the population via a common column that they have. How do i do that so the first one has the ...
3
votes
1answer
37 views

Association shape files to custom data in r

This is probably an obvious question. I have an Australia Shapefile (can be found here http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1259.0.30.001July%202011?OpenDocument) and some custom data ...
0
votes
0answers
24 views

NetCDF4 Files: Missing Projection & Varying Dimensions (Multiple Files)

All, I hope you can shed some light on issues I've been having regarding NCEP Reanalysis-I netCDF-4 file format: First issue, Projection information is not stored on the downloads I obtained from ...
0
votes
1answer
54 views

R-Leaflet: Plotted points on wrong country

I am learning the leaflet package and am running into a snag. To learn the package I am using the Snow deaths dataset from the package HistData which contains historic Cholera deaths from an epidemic. ...
1
vote
0answers
54 views

way in R or Python to add image/video in map plot marker click popup/infowindow

I have many different (lat,long data) points of world associated with unique place names and corresponding each point specific image or video data. Now I want to create an html file where if user ...
2
votes
0answers
31 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 ...
0
votes
0answers
19 views

Calculating maximum mean temperature of the coldest month with a lists of rasters

I need calculate the maximum mean temperature of the coldest month. I need first select the coldest month in a list and then in this month determine the maximum temperature. I do this: Create the ...
13
votes
1answer
9k 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 ...
1
vote
0answers
34 views

how to calculate distance in sub pixel mapping from Atkinson's paper?

Condition from atkindon's paper http://info.asprs.org/publications/pers/2005journal/july/2005_july_839-846.pdf for every sub-pixel the attractiveness Ai of a pixel i is predicted as a ...
6
votes
3answers
135 views

Waypoints with coordinates in R

I have a SpatialLineDataFrame with 20 observations of 4 variables (in WGS84). I want to create waypoints every 10 meters. Every waypoint will has the x y coordinates. I tried to do it manually like: ...
1
vote
0answers
62 views

Download Google maps data points

Is it possible to download google map data points? it would be usefull in order to gather in datasets all the restaurants in a dataset for example. I am using R but suggestions is other programs are ...
5
votes
3answers
100 views

Save and load maps for ggmap to use without internet access

I would like to use the ggmap package to download and display maps. Unfortunately I have some firewall restrictions preventing R from accessing the internet directly. The error I get from get_map is ...
5
votes
1answer
663 views

Convert coordinates from readShapePoly in R to long-lat coordinates

I'm trying to find some centroids of a shapefile for Danish municipalities and afterwards find the driving time between them. I use R's readShapePoly function from maptools combined with the ...
1
vote
0answers
29 views

Modelling zero-inflated spatially autocorrelated data with extreme values

I have spatially explicit data (above; Longitude, Latitude) with measurements on a random variable (z). This data was not collected in a random or systematic fashion, but instead was recorded ...
0
votes
1answer
106 views

R using fortify to project shapefile on google map gives wrong results

I have a shapefile that looks like this > str(FieldsMap) Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 3 obs. of 2 variables: .. ..$ id : ...
1
vote
1answer
63 views

Convert shapefile to WGS84 [duplicate]

I have a shapefile with shapelength and shapearea, and would like to convert to WGS84 to use with ggmap. Eventually, I would like to get plot google map of individual regions of the shapefile, and ...
1
vote
0answers
13 views

weighting scheme of gstat for fitting models to variograms

I use R and the gstat package to construct variograms of temperature, and I would like to ask If anyone knows what weighting scheme does the gstat package use to fit a model to the sample variogram?
0
votes
0answers
21 views

Why does R(gdal) mangle data when converting to geojson?

I've encountered issues with projections in .geojson files created by rgdal, but I never thought it would destroy my data, until I tried this (reproducible example): ...
0
votes
1answer
48 views

Add Points shp attributes to Polygon shp by Point location (as Spatial Join in ArcGIS)

I have a set of points in .shp (ESRI, available here: http://ulozto.cz/xGqRVFrR/voronoi-zip). I would like to calculate Voronoi tesselation from the points, thus create polygons. So far, so good. ...
1
vote
0answers
33 views

rgdal with multiple Feature Datasets in R

I am trying to read shapefiles contained within a geodatabase file (.gdb) into R. The .gdb contains two Feature Datasets with multiple Feature Classes within each. The problem is only one of the two ...
9
votes
2answers
2k 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 ...
14
votes
2answers
3k 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 ...
14
votes
3answers
668 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. ...
3
votes
1answer
116 views

R - How to “smooth” a raster map

I am trying to create a map from raster data. The file came from a crop model, with resolution of 0.5 degree. Even when I disaggregate it (i.e. increase spatial resolution), the map looks really ...
1
vote
1answer
112 views

unsupervised random forest classification in R

I want to compute an unsupervised random forest classification out of a raster stack in R. The raster stack represents the same extent in different spectral bands and as a result I want to obtain an ...
14
votes
1answer
3k 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 ...
1
vote
1answer
214 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 ...
1
vote
3answers
48 views

Creating a new raster layer based on mean of other raster layers, ignoring NA values in R

I am trying to create a new raster layer that is made up of the mean values from 7 other raster layers. I get results using overlay function mean: mean <- overlay(2000, 2001, 2002, 2003, 2004, ...
0
votes
0answers
23 views

plot rasters with the same line diagram

I have 6 raster files with continuous values for an area with the same extent. I have created a raster stack and I want to plot one line for each cell in the raster stack of my six rasters (like the ...
0
votes
1answer
47 views

Cross validation in thiessen polygons interpolation

I apply Thiessen Polygons interpolation using the krige command in the gstat R package. Using krige without a variogram model sets automatically krige function to perform IDW, and when nmax parameter ...
11
votes
2answers
217 views

How does spatial polygon %over% polygon work to when aggregating values in r?

I'm working on an environmental epidemiology project where I have point exposures (~ 2,000 industrial hog operations - IHOs). These IHOs spray on nearby fields, but the feces water droplets and smell ...
0
votes
0answers
36 views

Using R to find attributes of spatial neighbors, especially with big spatial polygon data frames

If it's not too much, I have a specific question that leads to a more general one: I'd love thoughts on both if it's possible. First, the specific: I have an analysis involving census blocks and ...
0
votes
1answer
72 views

in R : get a SpatialPolygonDataFrame from gIntersection{rgeos] with sub-area as attribute?

I am using gIntersection (package rgeos) to intersect a polygon shapefile containing 20 buffers zones, with another polygon shapefile containing "ground occupation mode (GOM)" (an area divided in ...
6
votes
5answers
2k views

Create a ground overlay kml from georeferenced raster

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file. Using ...
6
votes
2answers
246 views

Calculating Shannon's diversity using moving window in R

I have a raster where each pixel is a particular vegetation type. I'm interested in the diversity of vegetation types around each pixel. I'd like to assign a Shannon's diversity index value (see ...
6
votes
3answers
4k 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 ...
4
votes
2answers
67 views

writeOGR with a spatialpolygon simplified by gSimplify

I'm using gSimplify (rgeos package) to simplify the geometries of a shapefile. The funcion works good, but now I can't write the output in a new shapefile. I tried some ways: writeOGR(simplyshape, ...
0
votes
2answers
38 views

How to produce a finer resolution spatial grid from coarser grid in R?

I have a spatial grid of an image. Now I want to use this grid and make a finer resolution grid out of it. For example an image structure in R is given below: str(c) Formal class ...
0
votes
0answers
13 views

Dynamic polygons grid with specified area based on raster

I'm interested if anyone have idea how to automatically create (maybe in R?) dynamic grid of polygons with specified approx. area (for example around 20000 m2) based raster data or points with values ...
7
votes
3answers
3k views

Reading File Geodatabase using R?

File geodatabase (fgdb) includes numerous file geodatabase tables. As far as I know they exist as dbf files, but are within a Database.gdb. In ArcCatalog, the file pathway resembles ...
2
votes
0answers
45 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, ...
6
votes
1answer
508 views

Stats on individual grid points nearest neighbours

I have shp of points where each point is the centroid of the individual cells of a 1*1km grid (~ 500 000 points). For each of these points, I have their coordinates and elevation. What I want: for ...
3
votes
3answers
65 views

Lines on reprojected sp objects with Mollweide projection

I'm having an odd problem such that when I reproject maps to a Mollweide projection in R using sp, I get additional lines stretching across the globe. What is going on here, and do you have any ...
0
votes
1answer
47 views

How to choose a shapefile interactively in R

I am writing a function in R where i want the user to choose a Esri shapefile from its destination folder. Since a shapefile is made of several files how can i select them. For a point feature class i ...
-2
votes
1answer
32 views

I need to create a function in R that processes rasters in esri grid format [duplicate]

I have loads of data (6500 files that I need to process and find yearly winter sums/averages/variance for. the format for my naming system is Syyyymmdd_rp. Each file is in the same file folder. I ...
3
votes
1answer
81 views

Processing large amounts of Rasters in R

I have 6500 processed and clipped rasters that indicate snow levels on a daily basis in the northern hemisphere. I need to create a raster that represents a sum of the snow for the season. The winter ...
1
vote
2answers
60 views

Getting attribute table from WFS data source

I am attempting to get some WFS 2.0 INSPIRE data from the Finnish meteorological institute into a table format of some kind. Is there any software which can easily grab the attribute data for the WFS ...