rgeoda is a R package for spatial data analysis based on libgeoda and GeoDa. It provides spatial data analysis functionalities including Exploratory Spatial Data Analysis, Spatial Cluster Detection and Clustering Analysis, Regionalization, etc. based on the C++ source code of GeoDa, which is an open-source software tool that serves as an introduction to spatial data analysis. The GeoDa software and its documentation are available at https://geodacenter.github.io.
The rgeoda site is built using pkgdown: https://geodacenter.github.io/rgeoda
install.packages("rgeoda")
library(sf)
library(rgeoda)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
w <- queen_weights(guerry)
lisa <- local_moran(w, guerry['Crm_prs'])
clusters <- skater(4, w, guerry[c('Crm_prs','Crm_prp','Litercy','Donatns','Infants','Suicids')])
Anselin, L., Li, X. and Koschinsky, J. (2022), GeoDa, From the Desktop to an Ecosystem for Exploring Spatial Data. Geogr Anal, 54: 439-466. Download Citation
https://geodacenter.github.io/rgeoda/articles/rgeoda_tutorial.html
https://geodacenter.github.io/rgeoda/reference/
Map Classification
Spatial Weights
Spatial Autocorrelation
Spatial Clustering
In R console, one can use devtools to install rgeoda from its source package:
devtools::install_github("geodacenter/rgeoda")
For Mac users, the “Xcode Command Line Tools” need to be installed for installing rgeoda. It is a free software provided by Apple, which can be installed by using the following command in a terminal:
xcode-select --install
Note that the Xcode tools are not automatically updated when a new version of Xcode is installed. In order to make sure you have the latest version, use:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
In order to make sure to have the correct C++ compiler for R 4.0 and later, follow the instructions on https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/.
On Windows, the Rtools
needs to be installed first. https://cran.r-project.org/bin/windows/Rtools/
For Linux users, the “Build Essential Tools” needs to be installed first.
sudo apt-get update
sudo apt-get install build-essential