Introduction of Spatial Data Analysis By R
作者: 赵博 • 2006 年 11 月 24 日 • 技术主义 • 一条评论
Today I read a lot of documents on Spatial Data Analysis By R. The Spatial Analysis maintainner of R is Roger Bivand。 and the paper below describes an overall view about the Spatial Analysis, which is implemented by R.
Base R includes many functions that can be used for reading, vizualising, and analysing spatial data. The focus in this view is on “geographical” spatial data, where observations can be identified with geographical locations, and where additional information about these locations may be retrieved if the location is recorded with care. Base R functions are complemented by contributed packages, some of which are on CRAN, and others on the R-spatial sourceforge repository. The contributed packages address two broad areas: moving spatial data into and out of R, and analysing spatial data in R.
The R-SIG-Geo mailing-list is a good place to begin for obtaining help and discussing questions about both accessing data, and analysing it. More information about the functions is available from the Rgeo website. The packages in this view can be roughly structured into the following topics. If you think that some package is missing from the list, please let me know.
- Classes for spatial data : Because many of the packages importing and using spatial data have had to include objects of storing data and functions for vizualising it, an initiative is in progress to construct shared classes and plotting functions for spatial data. The sp package has been published on CRAN, and wrapper packages are available from a repository for work in progress at the R-spatial Sourceforge home page. The sp package is discussed in a note in R News . Some other packages have become dependent on these classes, including rgdal and maptools. An alternative approach to some of these issues is implemented in the PBSmapping package.
- Reading and writing spatial data : Maps may be vector-based or raster-based. The rgdal package provides bindings to GDAL -supported raster formats and OGR -supported vector formats. It contains functions to write raster files in supported formats. The package also provides PROJ.4 projection support for vector objects. The Windows binary of rgdal includes a subset of possible data source drivers; if others are needed, use FWTools conversion utilities. There are a number of other packages for accessing vector data on CRAN: maps (with mapdata and mapproj) provides access to the same kinds of geographical databases as S, RArcInfo allows ArcInfo v.7 binary files and *.e00 files to be read, and maptools and shapefiles read and write ArcGIS/ArcView shapefiles. The maptools package also provides helper functions for writing map polygon files to be read by WinBUGS, Mondrian, and the tmap command in Stata. For visualization, the colour palettes provided in the RColorBrewer package are very useful, and may be modified or extended using the colorRampPalette function provided with R. The classInt package provides functions for choosing class intervals for thematic cartography.
Integration with version 5.* of the leading open source GIS, GRASS, is provided in CRAN package GRASS (but not version 6.0, see below for developments). A family of wrapper packages is being written to interface these packages to sp classes, and can be found on the R-spatial Sourceforge home page. Packages are already available for interfacing version 6.0 of the GRASS GIS, and for interfacing the maps, PBSmapping, gpclib, and spatstat packages. - Point pattern analysis : The spatial package is available as part of the VR bundle (shipped with base R), and contains several core functions. In addition, spatstat allows freedom in defining the region(s) of interest, and makes extensions to marked processes and spatial covariates. Its strengths are model-fitting and simulation, and it has a useful homepage . It is the only package that will enable the user to fit inhomogeneous point process models with interpoint interactions. The splancs package also allows point data to be analysed within a polygonal region of interest, and covers many methods, including 2D kernel densities. The functions for binning points on grids in ash may also be of interest.
- Geostatistics : The gstat package provides a wide range of functions for univariate and multivariate geostatistics, also for larger datasets, while geoR and geoRglm contain functions for model-based geostatistics. A similar wide range of functions is to be found in the fields package. The spatial package is available as part of the VR bundle (shipped with base R), and contains several core functions. The RandomFields package provides functions for the simulation and analysis of random fields. For diagnostics of variograms, the vardiag package can be used. The sgeostat package is also available. Within the same general topical area are the tripack for triangulation and the akima package for spline interpolation. In addition, there are the spatialCovariance package, which supports the computation of spatial covariance matrices for data on rectangles, the regress package building in part on spatialCovariance, and the tgp package.
- Disease mapping and areal data analysis : DCluster is a package for the detection of spatial clusters of diseases. It extends and depends on the spdep package, which provides basic functions for building neighbour lists and spatial weights, tests for spatial autocorrelation for areal data like Moran’s I, and functions for fitting spatial regression models, such as SAR and CAR models. These models assume that the spatial dependence can be described by known weights. The spgwr package contains an implementation of geographically weighted regression methods for exploring possible non-stationarity.
- Ecological analysis : There are many packages for analysing ecological and environmental data. They include grasper for environmental prediction using GAM, ade4 for exploratory and Euclidean methods in the environmental sciences, adehabitat for the analysis of habitat selection by animals, pastecs for the regulation, decomposition and analysis of space-time series, vegan for ordination methods and other useful functions for community and vegetation ecologists, and many other functions in other contributed packages. The Environmetrics Task View contains a much more complete survey of relevant functions and packages.
相关文章:

终于换成英文的拉,娃哈哈