Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
15 of 125 committers (12.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Simple Features for R
Basic Info
- Host: GitHub
- Owner: r-spatial
- License: other
- Language: R
- Default Branch: main
- Homepage: https://r-spatial.github.io/sf/
- Size: 140 MB
Statistics
- Stars: 1,385
- Watchers: 62
- Forks: 301
- Open Issues: 81
- Releases: 8
Topics
Metadata Files
README.md
Simple Features for R
A package that provides simple features access for R.
Blogs, links • Cheatsheet • Installing • Contributing • Acknowledgment • How to cite
Package sf:
- represents simple features as records in a
data.frameortibblewith a geometry list-column - represents natively in R all 17 simple feature types for all dimensions (XY, XYZ, XYM, XYZM)
- interfaces to GEOS for geometrical operations on projected coordinates, and (through R package s2) to s2geometry for geometrical operations on ellipsoidal coordinates
- interfaces to GDAL, supporting all driver options,
DateandPOSIXctand list-columns - interfaces to PRØJ for coordinate reference system conversion and transformation
- uses well-known-binary serialisations written in C++/Rcpp for fast I/O with GDAL and GEOS
- reads from and writes to spatial databases such as PostGIS using DBI
- is extended by
- lwgeom for selected liblwgeom/PostGIS functions
- stars for raster data, and raster or vector data cubes (spatial time series)
- sfnetworks for geospatial network data
(Illustration (c) 2018 by Allison Horst)
Books, journal articles, blogs, presentations, vignettes, sp-sf wiki
- an open access R Journal article summarizes the package
- two books: Spatial Data Science: with applications in R, Geocomputation with R
- package vignettes: first, second, third, fourth, fifth, sixth, seventh
- blog posts: first, second, third, fourth
- the original R Consortium ISC proposal, the R Consortium blog post
- presentations: rstudio::conf 2018 (video), UseR! 2016
- wiki page describing sp-sf migration
Cheatsheet
Installing
Install either from CRAN with:
r
install.packages("sf")
This will install binary packages on Windows and MacOS, unless you configured R such that it tries to install source packages; in that case, see below.
Install development versions from GitHub with:
r
library(remotes)
install_github("r-spatial/sf")
Windows
Installing sf from source works under Windows when Rtools is installed.
MacOS
MacOS users are strongly encouraged to install the sf binary packages from CRAN, unless they are familiar with compilers, linking, C++ source code, and homebrew. If you experience that R tries to install sf from source (or otherwise your install fails but you don't understand what is going on) try again by explicitly installing the binary, using
r
install.packages("sf", type = "binary")
The remainder of this section is for those who understand what source installs mean, and imply.
Perhaps the easiest way of an install from source is to first install gdal using Homebrew. Recent versions of Homebrew include a full-featured up-to-date gdal formula, which installs proj and gdal at the same time:
brew install pkg-config
brew install gdal
Once gdal is installed, you may be able to install sf package from source in R. With the current version of proj on homebrew, installation requires additional configuration:
r
install.packages("sf", type = "source", configure.args = "--with-proj-lib=$(brew --prefix)/lib/")
Or the development version:
r
library(remotes)
install_github("r-spatial/sf", configure.args = "--with-proj-lib=$(brew --prefix)/lib/")
Alternatively, these instructions explain how to install gdal using kyngchaos frameworks.
For Mac OS 11 Big Sur source install instruction, see here
Linux
For Unix-alikes, GDAL (>= 2.0.1), GEOS (>= 3.4.0) and Proj.4 (>= 4.8.0) are required.
Ubuntu
Dependencies for recent versions of Ubuntu (18.04 and later) are available in the official repositories; you can install them with:
sh
sudo apt -y update && apt install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev libsqlite3-dev
However, to get more up-to-date versions of dependencies such as GDAL, GEOS and PROJ we recommend adding the ubuntugis-unstable PPA to the package repositories and installing them as follows:
sh
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install libudunits2-dev libgdal-dev libgeos-dev libproj-dev libsqlite3-dev
Adding this PPA is required for installing sf on older versions of Ubuntu (e.g. Xenial).
Another option, for advanced users, is to install dependencies from source; see e.g. an older Travis config file for hints.
Fedora
The following command installs all required dependencies:
sh
sudo dnf install gdal-devel proj-devel geos-devel sqlite-devel udunits2-devel
Arch
Get gdal, proj, geos and podofo from the main repos, and udunits from the AUR:
pacman -S gdal proj geos arrow podofo
yay/pacaur/yaourt/whatever -S udunits
renv or conda
There are several reports that sf fails to install as a source package when R is used with renv, or when R is installed in a conda environment. If you experience this, please do not raise an issue here, but
- try to sort this out with the
renvdevelopers or thecondamaintainers, or - try to use binary installs of the
sfpackage, e.g. from r2u, or the Posit package manager
Other
To install on Debian, the rocker geospatial Dockerfiles may be helpful. Ubuntu Dockerfiles are found here.
Multiple GDAL, GEOS and/or PROJ versions on your system
If you use dynamic linking (installation from source) and have multiple versions of these libraries installed (e.g. one from ubuntugis-unstable, another installed from source in /usr/local/lib) then this will in general not work, even when setting LD_LIBRARY_PATH manually. See here for the reason why.
lwgeom
Functions and methods that require liblwgeom, including ellipsoidal (not spherical or Euclidean) metrics (area, distances), are provide by and used from lwgeom, which is also on CRAN.
Contributing
- Contributions of all sorts are most welcome, issues and pull requests are the preferred ways of sharing them.
- When contributing pull requests, please adhere to the package style (in package code use
=rather than<-; don't change indentation; tab stops of 4 spaces are preferred). - This project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.
How to cite
Package sf can be cited as:
Edzer Pebesma, 2018. Simple Features for R: Standardized Support for Spatial Vector Data. The R Journal 10:1, 439-446.
Pebesma, E.; Bivand, R. (2023). Spatial Data Science: With Applications in R (1st ed.). 314 pages. Chapman and Hall/CRC.
Acknowledgment
This project gratefully acknowledges financial support from the
Owner
- Name: r-spatial
- Login: r-spatial
- Kind: organization
- Website: https://github.com/r-spatial
- Repositories: 43
- Profile: https://github.com/r-spatial
For packages raster, terra, dismo & geosphere visit the rspatial github organisation (mind the missing '-')
GitHub Events
Total
- Issues event: 101
- Watch event: 64
- Issue comment event: 256
- Push event: 117
- Pull request review event: 2
- Pull request review comment event: 3
- Pull request event: 35
- Fork event: 14
Last Year
- Issues event: 101
- Watch event: 64
- Issue comment event: 256
- Push event: 117
- Pull request review event: 2
- Pull request review comment event: 3
- Pull request event: 35
- Fork event: 14
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Edzer Pebesma | e****a@u****e | 3,589 |
| Etienne B. Racine | e****r@g****m | 128 |
| Robin Lovelace | r****x@g****m | 80 |
| pat-s | p****z@g****m | 67 |
| Andy Teucher | a****r@g****m | 55 |
| Roger Bivand | R****d@g****m | 54 |
| olivroy | o****1@h****m | 43 |
| Dewey Dunnington | d****y@f****t | 35 |
| Lionel Henry | l****y@g****m | 30 |
| Krzysztof Dyba | 3****b | 30 |
| Dan Baston | d****n@i****m | 27 |
| Michael Sumner | m****r@g****m | 24 |
| Thomas Lin Pedersen | t****5@g****m | 21 |
| Michael Chirico | m****4@g****m | 21 |
| jn | t****i@g****m | 21 |
| Hiroaki Yutani | y****i@g****m | 19 |
| Jeroen Ooms | j****s@g****m | 18 |
| Andrea | a****i@u****t | 17 |
| mpadge | m****m@e****m | 15 |
| David Hugh-Jones | d****s@g****m | 11 |
| Shinya Uryu | s****7@g****m | 10 |
| Kirill Müller | k****r@m****g | 10 |
| karldw | k****w | 9 |
| rubak | r****k@m****k | 9 |
| Darius A. Görgen | i****o@d****m | 8 |
| SymbolixAU | d****y@s****u | 8 |
| Uchida Mizuki | u****i@v****t | 6 |
| Daniel Possenriede | p****e@g****m | 6 |
| florisvdh | f****e@i****e | 5 |
| Matthieu Stigler | M****r@g****m | 5 |
| and 95 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 400
- Total pull requests: 157
- Average time to close issues: 3 months
- Average time to close pull requests: 19 days
- Total issue authors: 279
- Total pull request authors: 35
- Average comments per issue: 5.45
- Average comments per pull request: 1.22
- Merged pull requests: 108
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 76
- Pull requests: 51
- Average time to close issues: 8 days
- Average time to close pull requests: 7 days
- Issue authors: 64
- Pull request authors: 9
- Average comments per issue: 2.83
- Average comments per pull request: 0.47
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- rsbivand (17)
- latot (15)
- edzer (12)
- kadyb (10)
- agila5 (8)
- JosiahParry (7)
- bart1 (6)
- dbaston (4)
- mem48 (4)
- lvalnegri (4)
- goergen95 (4)
- ramiromagno (3)
- arthurgailes (3)
- dominiqueweber (3)
- DOSull (3)
Pull Request Authors
- kadyb (24)
- rsbivand (19)
- olivroy (18)
- MichaelChirico (14)
- agila5 (12)
- faridcher (9)
- bart1 (7)
- rouault (4)
- andrewbaxter439 (4)
- UchidaMizuki (4)
- paleolimbot (3)
- goergen95 (3)
- edzer (3)
- kalibera (2)
- djhshih (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- cran 415,386 last-month
- Total docker downloads: 1,142,297
-
Total dependent packages: 866
(may contain duplicates) -
Total dependent repositories: 2,658
(may contain duplicates) - Total versions: 89
- Total maintainers: 1
cran.r-project.org: sf
Simple Features for R
- Homepage: https://r-spatial.github.io/sf/
- Documentation: http://cran.r-project.org/web/packages/sf/sf.pdf
- License: GPL-2 | MIT + file LICENSE
-
Latest release: 1.0-21
published 9 months ago
Rankings
Maintainers (1)
conda-forge.org: r-sf
- Homepage: https://r-spatial.github.io/sf/
- License: GPL-2.0-only OR MIT
-
Latest release: 1.0_7
published over 3 years ago
Rankings
anaconda.org: r-sf
- Homepage: https://r-spatial.github.io/sf/, https://github.com/r-spatial/sf/
- License: GPL-2 | MIT
- Status: removed
-
Latest release: 1.0_7
published almost 3 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- pat-s/always-upload-cache v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-tinytex v2 composite
- kartoza/postgis * docker
- R >= 3.3.0 depends
- methods * depends
- DBI >= 0.8 imports
- Rcpp >= 0.12.18 imports
- classInt >= 0.4 imports
- grDevices * imports
- graphics * imports
- grid * imports
- magrittr * imports
- s2 >= 1.1.0 imports
- stats * imports
- tools * imports
- units >= 0.7 imports
- utils * imports
- Matrix * suggests
- RPostgreSQL * suggests
- RPostgres >= 1.1.0 suggests
- RSQLite * suggests
- blob * suggests
- covr * suggests
- dplyr >= 0.8 suggests
- ggplot2 * suggests
- knitr * suggests
- lwgeom >= 0.2 suggests
- maps * suggests
- mapview * suggests
- microbenchmark * suggests
- odbc * suggests
- pbapply * suggests
- pillar * suggests
- pool * suggests
- raster * suggests
- rlang * suggests
- rmarkdown * suggests
- sp >= 1.2 suggests
- spatstat >= 2.0 suggests
- spatstat.geom * suggests
- spatstat.linnet * suggests
- spatstat.random * suggests
- spatstat.utils * suggests
- stars >= 0.2 suggests
- terra * suggests
- testthat >= 3.0.0 suggests
- tibble >= 1.4.1 suggests
- tidyr >= 1.2.0 suggests
- tidyselect >= 1.0.0 suggests
- tmap >= 2.0 suggests
- vctrs * suggests
- wk * suggests
- almalinux 8.5 build
- ubuntu 22.04 build
- ubuntu 16.04 build
- ubuntu 18.04 build
- debian testing build
- ubuntu 18.04 build
- ubuntu 22.04 build
- fedora latest build
- ubuntu 22.04 build
- ubuntu 18.04 build
- rcheckdeb latest build
- ubuntu 22.04 build
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action v4.5.0 composite
- actions/checkout v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite



-->