Skip to contents

The spopt R package provides R-native implementations of spatial optimization algorithms for regionalization, facility location, route optimization, and corridor routing. Inspired by Python’s PySAL spopt, the package brings these algorithms to R users with an sf-first API, a Rust backend for graph and routing algorithms, and the HiGHS solver for facility location.

Install from r-universe:

install.packages('spopt', repos = c('https://walkerke.r-universe.dev', 'https://cloud.r-project.org'))

For developers who need to build from source (requires Rust), see CONTRIBUTING.md.

Read through these vignettes to learn how to use the package:

Support and how to learn more

If you find this project useful in your work and would like to ensure continued development of the package, you can provide support in the following ways:

To stay on top of package updates / new features and to get information about trainings, be sure to sign up for the Walker Data mailing list here.