Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
0answers
11 views

Supervised Random Forest in R

I did an image classification using random forest algorithm in R. I got the result but I do not understand what does the confusion matrix shows ? I mean what does the rows and column show? These are ...
2
votes
1answer
14 views

R/ggplot2 adding an additional line/polygon to a choropleth map

I have a choropleth map that represents the number of states being affected by a storm event. This is shown in the image below. I want to lay a transparent line or polygon over these states to ...
0
votes
0answers
8 views

Lock circleMarker size - Leaflet R

I am searching for a way to lock the size of the circle markers in Leaflet for R, addCircleMarkers(). I need the markers to retain the size they are relative to the polygon they are within upon ...
1
vote
0answers
5 views

Download Modis LAI/FPAR product with MODIStools R package

I want to download the full MODIS archive for the LAI product using the MODIStools R package. I am running the command lines below but the output file only contains data from 2014 onwards. Any idea ...
1
vote
2answers
29 views

Summarizing point data to multi point data and creating convex hull in R

I have latitude and longitude information like 26.847905 73.9575005 for about 800 points, I need to trim these lat/lon information to say 3 decimal places. I used the following syntax in R # ...
0
votes
0answers
17 views

Equivalent of “merge divided highways” in R

I want to make a map to print out based on openstreetmap data, and have successfully loaded the data into R, the programming language I'm most familiar with. To make things look nicer, I want to ...
0
votes
2answers
30 views

How to efficiently extract time series from a very large multi-band GeoTiff in R?

First some context: I want to run a time-series analysis function that is only available in R for a continental sized multi-band time-series raster, which is stored in disk in GeoTiff format, that was ...
0
votes
0answers
15 views

DBSCAN for spatial clustering based on X, Y and additional variables [closed]

Please you can provide a information about DBSCAN. I am trying to implement a spatial clustering for enterprises based on location and activity code (NACE). About the "# import your point data" step ...
0
votes
1answer
23 views

In R's raster::terrain function, which way is north?

The terrain function in R's raster package calculates slope and aspect from an elevation raster: see http://www.inside-r.org/packages/cran/raster/docs/terrain. With the unit="degrees" option, the ...
0
votes
0answers
16 views

How to get an azimuthal projection in an R plot?

I want to use R for geospatial data analysis, and I want to use a map of my local area as from an azimuthal projection if possible. Is it possible to generate a map using R of an azimuthal projection ...
0
votes
1answer
18 views

kde.points SpatialPixelsDataFrame to geojson

I have a multiple projected spatialpixelsdataframes produced from kde.points() and would like to use it in a leaflet map. Basically the same as Brunsdon example with the New Haven crime data, except ...
0
votes
0answers
11 views

how to calculate getis ord using R

I'm trying to use getis ord on the new york taxi dataset to identify the hotspots based on the number of pickups. I want to model the data into cells such that that score of each cell is calculated ...
0
votes
0answers
14 views

dismo::randomPoints generating fewer points than requested in R

I'm using the randomPoints function in the dismo package to generate sets of point locations within two polygons. I've converted the polygons to rasters, where the cells within the polygon = 1, and ...
1
vote
0answers
15 views

Error when running v.krige

I've been trying to get v.krige to run in the Grass7 command line, however, when I do so I get the following error: Error : .onAttach failed in attachNamespace() for 'rgrass7', details: call: if (...
-1
votes
1answer
44 views

R will not read shapefile / file.exists returns true

I cannot successfully read a shapefile in R. I'm using Rstudio version 0.99.902 I have read several articles on readOGR errors that concern reading a shapefile. My shapefile is error free, as it ...
0
votes
0answers
8 views

Using predict function in raster package for applications other than species distribution modelling?

I was wondering if the species distribution modelling technique can be used to analyze other variables such as human movement. For example I have data on whether a person attends a facility (binary ...
3
votes
2answers
28 views

“Downsample” a dense grouping of points onto a sparse grid

I have a SpatialPointsDataFrame with thousands of datapoints in a relatively small geographic area. The points are grouped around regions of physical measurements and are hence irregularly spaced: ...
0
votes
0answers
25 views

QGIS reads CRS different [duplicate]

I have a data frame with more than 100000 observations. I'm trying to convert this data into a shapefile in R. I give some CRS to data in R but when I open the shapefile in QGIS I see a different CRS. ...
0
votes
1answer
15 views

Extract lat long point values from EASE2 without reprojection

I have the following file: EASE2 and want to extract the values for this geographic location (148.1, -35.6) #lon lat. How can I do this without the need for reprojecting the ease grid file into ...
1
vote
1answer
35 views

Identifying differences in polygons across shape files

I am trying to compare the 2000 Census county boundaries with the 2010 Census county boundaries. Each county is uniquely identified in a given year by a FIPS code and I want to compare if the polygon ...
0
votes
1answer
48 views

R or ArcGis: average per polygon of the shortest distance to a river from each point in that polygon

All the shapefiles necessary can be found here. These are shapefiles of lakes, and rivers. Downloading one shapefile as an example should be enough to get me on the right track. The nuts file can be ...
0
votes
1answer
16 views

ArcGis: Count categorical variable per nuts3 by overlapping point-file and polygon-file

Download from this website the NUTS_RG_60M_2006 files (shapefile) and the csv-file T_DischargePoints_West.csv (source) and save them on your computer. Open them through ArcGis and plot xy-points. You ...
0
votes
2answers
19 views

R GIS layers not lining up (spplot/plot)

I'm trying to make a choropleth in R using a polygon file, with a points layer of local care homes on top. When I plot each layer individually they're fine, however when I put them both together (...
0
votes
0answers
9 views

How do you transform a STFDF into a raster?

How do you convert a STFDF object (spacetime in R) to a raster stack?
1
vote
0answers
22 views

How to query breadwinning mothers in IPUMS USA microdata?

Overall goal: Map rates of breadwinning mothers throughout South Carolina. I haven't been able to find exactly what I need in American Factfinder. I am looking for something that comes close to what ...
1
vote
1answer
35 views

Road snapping in R - snapPointsToLine / Projection Problem

1. Introduction (you may skip this if you like) In order to implement a road snapping feature in R for recorded positioning data, I first searched the internet for possible solutions to the problem: ...
2
votes
1answer
49 views

CityGML: Calculate orientation and inclination angles from a polygon's LinearRing coordinates

I have multiple CityGML files of different cities. Only one of them is in such a good condition that it includes the orientation and inclination angles of every roof polygon (as a gen:stringAttribute)....
1
vote
1answer
41 views

How to make a loop that interates over large raster cells in R go faster?

I am trying to add +1 to the cell value of certain cells in a raster. I have the cell numbers of the cells on which I'd like to perform said computation saved in a vector. I have a working code but ...
3
votes
2answers
46 views

How can a statistically significant difference between rasters be calculated?

so after some gruelling use of MaxEnt I have four occurrence probability rasters for the four quarters of the year, each one is about 70MB+. I want to test whether they are significantly different ...
1
vote
1answer
39 views

Rasterizing in R - how do resolutions work? (e.g. population within a circle)

I'm creeping into building surfaces - useful for a number of public health projects - and can't seem to make sense of what's happening with the resolution and raster building process to get what I ...
0
votes
0answers
10 views

Leave one out cross validation for krigeST in R

I am using the krigeST function in the gstat package in R. To run the kriging, I have created a space-time object STIDF that holds spatial and temporal information for my original point data. I ...
0
votes
1answer
15 views

Receiving higher values than should be possible in stackApply SUM for Frequency calculation in R

I am currently working on creating a frequency raster for a country based on multiple Rasters of the same day through following years and where the previous values are reclassified to 1's and 0's. The ...
1
vote
0answers
18 views

R least cost path

I'm looking at patterns of soil pollution over a specific site. I measured soil pollution in different plots across my site. I then performed a Principal Component Analysis to extract a composite axis ...
1
vote
1answer
19 views

Calculating distances of lines in R

I drew some lines in a GIS application in this projection: +proj=longlat+ellps=WGS84 +datum=WGS84 - is there a name for this projection? I imported my lines into R and to prepare for calculating ...
0
votes
1answer
29 views

Point in Overlapping Polygons using R

I have shape file with about 15,000 polygons. Some polygons overlap with other polygons. Most of them don't overlap with any other polygon. I also have a points data set with about 100 Mil points (lat/...
0
votes
0answers
13 views

List overlapping Polygons in a shape file using R

I have a KML file that has about 20,000 polygons. Each polygon has a name and ID. I need the list of Polygons that overlap with any other polygon. Or a list of Polygons that DO NOT overlap with any ...
2
votes
0answers
30 views

ggplot2 fills holes in polygons

I have a shapefile composed of polygons (sample here), many of which have holes in them. I cleaned the polygon layer in GRASS. After cleaning, QGIS's 'Check Geometry Validity' tool returned no errors. ...
0
votes
2answers
103 views

Any high-level GIS library for python from the point of view of a data-scientist? [closed]

I am a data-scientist (an applied economist) and I have often to deal with data that includes spatial attributes. I am hence interested in using spatial data, rather than producing spatial attributes....
0
votes
1answer
26 views

Set projection (netCDF) with R-ncdf4-Package

I want to create a netCDF-file that has a defined projection ("WGS 84 / UTM zone 32N") with the netcdf4 package in R. The input float array has the size of x=880 and y=760. So i define the two ...
1
vote
1answer
30 views

PC and Mac treating raster brick input differently in R

All - this is likely an idiotic question, but, I've been working on developing some GIS code in R that interacts with an online source. So, sprinkled in various places, I have myBrick <- brick("...
1
vote
0answers
20 views

MODIS Leaf Area Index data 2001

I am trying to convert MODIS Leaf Area Index data from .hdf to GeoTiff from 2001. I can successfully convert it using R for the more recent datasets using the following code (package gdalUtils): sds &...
1
vote
2answers
35 views

Integrating R in QGIS with Mac OS El Captain: missing dependencies

I have a Mac OS (El Captain) and I'm trying to run R scripts within QGIS 2.14. When I open a script (like one from the online list) I receive the error message: This algorithm cannot be run :-( ...
0
votes
1answer
23 views

What is the easiest way to create map using HDF-5 data subset?

I need to visualize some area using values provided in HDF-EOS version 5 file and create map using those values and other GIS layers. Unfortunately, my QGIS do not recognize the HDF5 file. Do I ...
2
votes
1answer
39 views

Gstat krige() error: Covariance matrix singular at location [917300,3.6109e+06,0]: skipping

Recently, I am facing a strange problem when using krige() in gstat library. This error was not there a few months ago because I am using the same code with the same data that I successfully used ...
0
votes
1answer
43 views

Convert SpatialPolygonsDF boundaries to SpatialLinesDF keeping information on polygons

I have a SpatialPolygonsDataFrame and I need to convert polygon boundaries into a SpatialLinesDataFrame retaining the attributes of the 2 polygons The structure of the SPDF looks like this 'data....
3
votes
1answer
30 views

raster::rasterize set wrong values with enclosed polygons

Similarly to this post rasterize (R package raster) fail to rasterize island polygons? the rasterize function in the raster package is giving me problems with enclosed polygons. In my case, some ...
1
vote
2answers
41 views

How to define season by month and average data

I have 10 year NDVI data i.e. two values per month. I would like to average values within a season e.g Season A (January, February and March) per year and plot a graph. y axis=average ndvi value, x ...
-1
votes
1answer
57 views

Calculate area for each polygon in R

I am working with a shapefile that has many polygons. How do I add one more field named "area_sqkm" and calculate area for each polygon in the shapefile?
2
votes
1answer
53 views

very basic question on extracting data from .tif raster layer in R- projection not in lat/long

I have data on N deposition in the US, which can be found in a .tif file from a zipped directory, which can be accessed here: nadp.sws.uiuc.edu/maplib/grids/2006/TotalN_dep_2006.zip. I loaded the ...
-1
votes
1answer
33 views

Select polygons (A) that contain polygons (B) by using R code

I am wondering how to select polygons (A) that contain polygons (B) by using R code. B<-readOGR(dsn="H:/AP", layer="WWTP") A<-readOGR(dsn="H:/AP", layer="catchment")