Statistical computing language and software environment.

learn more… | top users | synonyms

3
votes
1answer
254 views

How to link R script to Algotithm output in QGIS modeler?

I constructed a simple R script for QGIS modeler (.rsx) that calculates groupwise summary statistics of a vector layer table (sum by field "subject" and "FRC"). The script correctly works. When ...
1
vote
1answer
220 views

r.surf.contour in QGIS 2.0

I have a problem with r.surf.contour. I create a DTM with v.to.rast.attribute and then use the r.surf.contour and it works fine in QGIS 1.9 but with QGIS 2.0 doesn't work. I have a contour shapefile ...
3
votes
1answer
160 views

ggmap, ggimage… - Saving and loading maps in R

In my current R project I'm working with the ggmap package to download and display maps. What bothers me is that you need internet access to load maps from google etc. I'd like to load a map from the ...
2
votes
2answers
109 views

How to do regression analysis out-of-memory on a set of large rasters in R?

I am trying to do a regression analysis on a set of large rasters (254,004,000 cells each). Ultimately, I want to run something like the following (or a bit more complex, but let's start simple!): ...
1
vote
1answer
399 views

GDAL loads in Python, but not IPython (Linux)

I am trying my hardest to utilize the work of the good folks at the GeoDa center, but I cannot seem to get all of the components to load. GDAL, in particular, has been giving me some difficulty. The ...
0
votes
2answers
85 views

How can I fix a geoTiff with an incorrect CRS?

Trying to load and plot a raster (it's a DEM) in R, but having problems. Using R I read in a raster file: library(raster) dem <- raster("DEM_Victoria.tif") # >70 MB print(dem) class ...
2
votes
1answer
241 views

How to cluster Raster data

I have thousands of Raster data concerning the ice coverage at the pole at different times (days) over several years. Now I would like to perform a cluster analysis. I want to split the data into ...
9
votes
1answer
199 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 ...
2
votes
2answers
140 views

MODIS calculations with non cloud contaminated pixels

I have 11 files showing 8day daytime LST temps in .tif format from MODIS. Is there any way to calculate the average 8day daytime temperature for march 2013 for example but using in the calculations ...
4
votes
2answers
269 views

Reduce the resolution of a shapefile in R (or QGIS if necessary)

I'm using shapefiles of history U.S. state boundaries from NHGIS to make maps in R. These shapefiles are much higher resolution than I need when making maps at the scale of the country: over 2 million ...
2
votes
0answers
154 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") ...
1
vote
0answers
60 views

level of spatial aggregation of polygons

I am looking for a method that allows me to obtain the spatial aggregation of polygons for each cell of a grid with 10kmx10km resolution. In each cell (10kmx10km), I want to be able to consider that ...
1
vote
1answer
88 views

Interpolation with netcdf4 file

I have a netcdf4 data set that contains array and information about latitude and longitude which can be accessed with the following R command: ncvar_get(dataname, 'lon'); ncvar_get(dataname, 'lat'); ...
6
votes
2answers
99 views

Finding lines in point patterns?

I have a point pattern (see below) in which I assume to find "significant" lines of points. However, I did not find any method that is integrated in a GIS or in R that searches for such line pattern ...
4
votes
1answer
930 views

R - Plotting shapefile with geographical (raster) data

Over the last few days I have been trying to plot a shapefile over data loaded into a data.frame within R. It should be a view of radar precipitation with an overlay of the country borders from a ...
1
vote
1answer
90 views

Extract polyline of border between differing polygons

I have a shape file with polygons with an associated variable that can take different values. I would like to extract the borders between polygons of differing value (red and blue) as a polyline (dark ...
1
vote
1answer
45 views

How to return values of its order?

I have a matrix like this: 10 0.646519601 0 0.085929349 0.255477717 0.012073334 40 0.138403594 0 0.065979943 0.776693742 0.018922721 I want to keep the first column, and get rest ...
6
votes
1answer
321 views

Anyway to remove points outlying shape in ggplot2?

I am to map a plot of an area and then plot points over it (given by Easting and Northing). However, I found out that there are certain mistakes in the data entered for Easting and Northing resulting ...
1
vote
1answer
205 views

What is the equivalent of arcpy “Con” in QGIS and/or R raster-package?

I'm looking for an equivalent of the conditional expression "Con" from arcpy in an open source spatial analysis package? I'd prefer to use QGIS or R. To provide some additional detail, I need to ...
2
votes
2answers
256 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from ...
3
votes
1answer
199 views

Change Circle Size According to Value using R

How do I change circle size in a population map according to the population density of the location? library(maptools) library(RColorBrewer) library(classInt) library(maps) ## load the file ## pop ...
0
votes
1answer
118 views

Plot specific area of map

Is there a way to zoom in a map on an R spatial polygons object. i.e. if I have polygons for a whole country but I want to zoom in on a specific city and just plot that area how do I do that ? At ...
0
votes
0answers
156 views

Drawing a map of a country with specific boundaries/zones using postcodes latitude and longitude

I'm quite new in geocoding - it has been fun! My project is to draw Australia with specific boundaries/zones using R program. I was able to successfully upload a shapefile of Australia in R program, ...
0
votes
1answer
68 views

How long should it take to load a point layer with readOGR? [closed]

I am afraid I am quite new to spatial analysis at anything beyond a superficial level, and I have only recently transitioned to utilizing R. I have been quite pleased with the versatility of areal ...
0
votes
1answer
40 views

Error in performing transect in ambur R?

I'm trying to filter a transect, window size is 5 and filter individual baselines is set to 0. I select the transect shapefile, then the inner baseline shapefile and it gives me this error. Error in ...
0
votes
1answer
239 views

How to count number of polygons inside another polygon layer?

I am looking for a tool in arcgis 10.1 Qgis or R that allows me to count the number of polygons that are inside specific areas (defined also as polygons). My data consists in: 1 shape file with ...
2
votes
1answer
102 views

How to work with flt & hdr files

I have been working on a vector-based spatial analysis in R using shapefiles. I wish to use some environmental data that is downloadable, however it is only available in raster format (FLT & HDR ...
0
votes
0answers
138 views

R program and shape files

I have an R program that sketched a country. This is done by reading a shape file that contains the coordinate of a country (latitude and longitude). How do I export the data from shape file into ...
1
vote
0answers
32 views

How to load or query data directly to R from a PostGIS database using RPostgreSQL and rgdal [duplicate]

Is it possible to load/query a shapefile to R, which is stored in a postgres/postgis database? I've built up a connection to my postgres database via DBI, RPostgreSQL and I want to make some ...
1
vote
1answer
82 views

Find all census tracts N miles from a lat, lon point

Using R, I'd like to find all census tracts within a given distance of a point (lon,lat). i.e. All census tracts within 20 miles of 34.0522, 118.2428 I have used the sp library and over command to ...
2
votes
1answer
303 views

Population density map

I have California population density data from from the U.S. Census in an Excel file. The spatial information is provided in ZIP Code Tabulation Areas (ZCTAs). How do I plot a population density map ...
0
votes
1answer
109 views

Saving geotiff in R - why resolution on x and y is not the same?

I have some data and i want to save it as a geotiff in R. This is not a problem but even if in my command line i set the resolution on x as 1 and on y as 1 after the geotiff is generated the ...
1
vote
1answer
100 views

Retrieving the proportion of specific pixel class from CHM rasters

CHM = canopy height model I am very new to R (specially for GIS purposes) and I am struggling a bit in getting the following pixel statistics: Proportion of zero value pixels = [nº of zero value ...
4
votes
1answer
354 views

How to split a polygon using R

I have an irregular polygon which is a spatial object. I want to divide it into multiple polygons (say, n=25) with equal height. To show how I want to divide it, I've plotted grids on the ...
4
votes
1answer
191 views

Moving window regression (MWR) in R

I'm looking for some package in R to estimate the value of a variable by moving window regression. I have read in Local Models for Spatial Analysis, which is a good method to predict values ​​at ...
2
votes
2answers
282 views

Using Regression Trees in ArcGIS

Hi I have a follow up question to this post: Statistical analyses for survey against raster? I have a very similar problem as the initial poster David. I am creating a multivariate model from ...
4
votes
0answers
230 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 ...
1
vote
0answers
108 views

How to import binary arcgis maps into R

I have imported arcgis rasters into R. The rasters are binary maps and the legend in arcgis shows this to be binary as the colors are only 0 and 1. Now, when I import the raster into R it is no ...
3
votes
1answer
202 views

How do I create a heatmap in ggplot?

I'm using R with ggplot2 to generate maps from shapefiles and from data in SQL Server. I'm trying to get to a stage where I can automate a large chunk of the mapping I do. So far this is working well ...
0
votes
0answers
33 views

Creating clumps in a raster from 1 pixel

I want to make clumps of cells (pixel) within a raster. My raster data is binary form as "1" or "0" representing "0" is nothing but "1" is something. I want to make clump from "1" data. If my raster ...
0
votes
0answers
97 views

US MAP using Zipcode in R [closed]

I have a set of US zip codes grouped into two groups. I'm plotting those two groups on US MAP using R code. I'm using following code to plot group A & B combining together ...
2
votes
1answer
254 views

combine raster and polygon values in R

My question is similar to this one Get Raster Values from a Polygon Overlay in Opensource GIS Solutions but I think I need another step. I have a polygon layer of ecoregions which I brought into R ...
3
votes
1answer
188 views

Replace NA's with 0 for raster data using R

I am new in R. How can I replace NA's with 0 for my raster data which have spatial information?
4
votes
1answer
150 views

How to compare spatial patterns (crime cases vs population)?

I am looking for a way to statistically compare two spatial patterns in shape polygon data (not point pattern analysis). Let's say I have a city map divided in neighborhoods (barrios), in shape ...
3
votes
0answers
83 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 ...
0
votes
4answers
140 views

Buffer in QGIS/R is 650-670 m wide instead of 500 m

I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a ...
1
vote
1answer
85 views

Union of polygons doesn't work 100 % correctly

I'm using the function gUnaryUnion to merge polygons in R. In one particuliar case this doesn't work correctly - some of the old polygon contours are still visible: Can anybody help ?
3
votes
0answers
124 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
171 views

Bubble Plots in R not displaying

I was attempting to follow a tutorial to create a bubble plot of school district proficiency rates. Data shapefile of school districts (Census2010.shp) ...
0
votes
0answers
16 views

overlay bubble plot and choropleth in R with maptools [duplicate]

I am working with US education data, and have been asked to create maps that overlay a measure of student poverty and academic achievement. Ideally, I would be able to do this by creating a choropleth ...