Hot answers tagged spatial-statistics
20
"Geographically weighted PCA" is very descriptive: in R, the program practically writes itself. (It needs more comment lines than actual lines of code.)
Lets begin with the weights, because this is where geographically weighted PCA parts company from PCA itself. The term "geographical" means the weights depend on distances between a base point and the ...
18
As always, it depends on your objectives and the nature of the data. For completely mapped data, a powerful tool is Ripley's L function, a close relative of Ripley's K function. Lots of software can compute this. ArcGIS might do it by now; I haven't checked. CrimeStat does it. So do GeoDa and R. An example of its use, with associated maps, appears in
...
18
Depending on which Kriging type you want to apply, there are different packages to choose from:
Ordinary Kriging
The most common version is implemented for example in:
GRASS - v.krige
QGIS Kriging as part of the SDA4PP plugin
SAGA - Module: Ordinary Kriging
HPGL - ordinary-kriging() (PDF page 12)
gstat - krige
Simple Kriging
Simple Kriging uses the ...
14
It looks like there are a few options with GRASS GIS. Check out the GRASS Kriging Wiki page: http://grass.osgeo.org/wiki/Kriging
A Google Summer of Code project in 2009 produced V.krige: http://grass.osgeo.org/wiki/V.krige_GSoC_2009
The GPL gstat package should work by itself or interfaced with GRASS GIS. http://www.gstat.org/
Dylan Beaudette has a ...
13
ArcGIS v10 will do this. First run "Add XY coordinates". Then run Dissolve, select Point_X and Point_Y as the dissolve fields, add a statistics field, Sum. I just tested it on overlapping Points. The output has a single Point at each overlap location while the numeric field is summed, for that location.
11
If you are happy to read your raster into a numpy array (gdal can do this), then you could use the High Performance Geostatistics Library implementation from Python or C/C++.
HPGL implements the following algorithms:
Simple Kriging (SK)
Ordinary Kriging (OK)
Indicator Kriging (IK)
Local Varying Mean Kriging (LVM Kriging)
Simple CoKriging ...
11
There are several Free and Open Source tools for geospatial statistics.
R Language
The R Language has several spatial extensions.
Spatstat
The Spatstat module for R provides a host of spatial statistics functions.
R Studio
R Studio is a very nice IDE for the R Language, and will help you to easily locate and install the R spatial libraries.
System ...
11
There's no strict algorithmic relationship between latitude and longitude and zip code - they're all custom areas generated by the postal service. You need access to a dataset that codes polygons / polygon centroids by zip code.
1) Complex
Traditionally, this task (coupled with address lookup) is termed 'Geocoding'. The most convenient method for full ...
10
The R-project has substantial number of spatial statistics software packages, but R has rather steep learning curve.
10
Simple question, difficult solution.
The best method I know uses simulated annealing (I have used this to select a few dozen points out of tens of thousands and it scales extremely well to selecting 200 points: the scaling is sublinear), but this requires careful coding and considerable experimentation, as well as a huge amount of computation. You should ...
9
Regarding R in general I'd really recommend having a look at Applied Spatial Data Analysis with R book. It offers very good introduction to spatial concepts within R framework. And webpage provides lots of code snippets and data to practice what you read about.
Regarding coupling R and ArcGIS specifically, Python is one of the options here. Have a look at ...
9
"Statist" plugin calculates StDev. It has a "use only selected features option".
You'll need to use "Select by location" first to select the features within your polygon-of-interest. Then run Statist.
9
GeoDa is free, cross-platform software designed for dynamic visualization, exploratory spatial data analysis, and spatial statistics. It has been around for almost 15 years (starting as an ArcView 3.x extension, it was recoded to be independent of ArcView after ESRI abandoned the old AV architecture). It is associated with an illustrious group of GIS ...
9
I doubt if a 'ready to use, plug in your data' solution exist.
But I'm very much hoping to be proven wrong since I'd love to test this method with some of my data.
Some options to consider:
Marí-Dell'Olmo and colleagues used Bayesian factor analysis to calculate deprivation index for small areas in Spain:
Bayesian factor analysis to calculate a ...
9
The ArcGIS online help page has the answer here: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How%20GWR%20Regression%20works
In particular this quote seems particularly pertinent:
Parameter estimates and predicted values for GWR are computed using the following spatial weighting function: exp(-d^2/b^2). There may be differences in this ...
8
The function get.knnx in package FNN can compute the N-nearest neighbours in point patterns.
x1 = cbind(runif(10),runif(10))
x2 = cbind(runif(10),runif(10))
nn = get.knnx(x1,x2,2)
now nn$nn.index is a matrix such that nn$nn.index[i,j] is the row in x1 of the two nearest neighbours to row i in x2 - sorted so that the nearest is [i,1], and the next ...
8
A Caveat
A standard error is a useful way to estimate an uncertainty from sampled data when there is no systematic error in the data. That assumption is of dubious validity in this context, because (a) the KDE maps will locally have definite errors that may persist systematically among the layers and (b) a potentially huge component of uncertainty due to ...
7
Note: the following was edited following whuber's comment
You might want to adopt a Monte Carlo approach. Here's a simple example. Assume you want to determine if the distribution of crime events A is statistically similar to that of B, you could compare the statistic between A and B events to an empirical distribution of such measure for randomly ...
7
First problem:
You're looking at a mixture of minima. One gigantic tree with an acre-sized crown looks quite a lot, interpreted on a point / kernel density basis, like a field with no trees at all. You will end up with high values only where there are small, rapidly growing trees, at edges and in gaps in the forest. The tricky bit is, these dense smaller ...
7
This does not seem to be documented in the clusthr manual page, but because the source code is available, we can try to figure it out.
By typing
> clusthr
at the R prompt (shown as the initial >), you can see the code. It's opaque, but a quick look indicates (1) there's no plotting or color selection going on and (2) the clustering is performed ...
6
I would stick to R. If speed is really a problem ( I doubt so 90.000 is not such a big number) you could try finding relationships between a subset of your data.
Actually the first thing I would do is make a plot to look for obvious relationships.
Even if arcgis contains tools to compare rasters, R will always give you a lot more statistical tools.
Eg:
...
6
Calculation
Subtract one raster from the other. (The direction of subtraction does not matter.)
-1 0
-1 3
Square the result.
1 0
1 9
Average the values.
(1 + 0 + 1 + 9)/(1 + 1 + 1 + 1) = 11/4.
(I wrote this in a suggestive way to show how missing-data cells can be handled if your GIS does not have this capability: Create an indicator grid with 1's ...
6
The Geospatial Modelling Environment (the successor of Hawth's Tools for ArcGIS) links python scripting, R and ArcGIS in a useful way. I haven't investigated the links with R in detail, but it looks like it may be useful for what you're trying to do.
If you're trying to do something yourself then StatCONN may be useful.
6
The +1 is a convention. It's all about converting the ranks to percentiles. Consider 99 iterations. The rank will run from 1 through 99 (in whole steps). You can convert the rank to a percentile by dividing by 99 and multiplying by 100. That would produce percentiles from 100/99 = 1.01% to 99*100/99 = 100%. That lacks a desirable symmetry: you're ...
6
I just discovered that spatstat has a crossdist function.
Description
Computes the distances between pairs of ‘things’ taken from two
different datasets.
It takes two point patterns X and Y as inputs, and returns the matrix whose [i,j] entry is the distance from X[i] to Y[j]. To get the second nearest neighbors using crossdist:
xdistances ...
6
See also GRASS and R integration:
http://grass.osgeo.org/wiki/R_statistics
For example boxplots:
... or decision trees (rpart example):
6
you can check out Hub Distance in MMQgis.
The hub distance tool iterates through each feature on the source
points layer and finds the closest "hub" from the destination hubs
layer based on Ellipsoidal distance. The output is a shapefile
containing all the attributes from the source layer along with a
distance field and the name of the hub based ...
6
Use focal statistics instead of block statistics: when using rectangular neighborhoods this produces the same results in the centers of the blocks, but focal stats are computed with moving (overlapping) windows, effectively creating a representation of a surface of relative slopes. Moreover, focal stats can be computed with more natural neighborhoods, such ...
6
Yes, the Heatmap plugin can be used for this.
Suppose we have a point layer called pointrates.shp with rates between 0 and 1 associated with each point:
We can run the Heatmap plugin on this, using a Decay Ratio of 1 (which means that the value at the edge of each search radius is the same as at the center), and using the "Ratio" column as the Weight. In ...
6
Average slope sounds like a natural quantity but it's rather a strange thing. For instance, the average slope of a flat horizontal plain is zero, but when you add a tiny bit of random, zero-average noise to a DEM of that plain, the average slope can only go up. Other strange behaviors are the dependence of the average slope on DEM resolution, which I have ...
Only top voted, non community-wiki answers of a minimum length are eligible
