potential

An R package to compute the potential model as defined by Stewart (1941).

https://github.com/riatelab/potential

Science Score: 75.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found 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
    2 of 2 committers (100.0%) from academic institutions
  • Institutional organization owner
    Organization riatelab has institutional domain (riate.cnrs.fr)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

rspatial stewart

Keywords from Contributors

cartography
Last synced: 6 months ago · JSON representation ·

Repository

An R package to compute the potential model as defined by Stewart (1941).

Basic Info
Statistics
  • Stars: 28
  • Watchers: 6
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Topics
rspatial stewart
Created over 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme Changelog Citation Codemeta

README.md

potential

R-CMD-check codecov Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.

This package provides functions to compute the potential model as defined by Stewart (1941). Several options are available to customize the model, for example it is possible to fine-tune the distance friction functions or to use custom distance matrices. Some computations are parallelized to improve their efficiency.

Installation

You can install the released version of potential from CRAN with:

r install.packages("potential")

You can install the development version of potential from GitHub with:

``` r

install.packages("remotes")

remotes::install_github("riatelab/potential") ```

Demo

``` r library(mapsf) library(potential)

Display the spatial interaction function

plot_inter(fun = "e", span = 75000, beta = 2, limit = 250000) ```

<!-- -->

``` r

create a regular grid

y <- creategrid(x = n3poly, res = 20000)

compute potentials

pot <- mcpotential( x = n3_pt, y = y, var = "POP19", fun = "e", span = 75000, beta = 2, limit = 250000, ncl = 2 )

Define potential according to the maximum value

y$pot <- pot / max(pot) * 100

create equipotential areas

bks <- seq(0, 100, length.out = 11) equipot <- equipotential(y, var = "pot", breaks = bks, mask = n3_poly)

map potentials

mftheme("default") mfmap(x = equipot, var = "min", type = "choro", breaks = bks, pal = hcl.colors(10, 'Teal'), border = "#121725", legvalrnd = 0, lwd = .2, legpos = "topright", legtitle = "Potential Intensity") mftitle(txt = "Potentials of Population") mfcredits(txt = "© EuroGeographics for the administrative boundaries and © Eurostat for data") ```

<!-- -->

Note

This package provides access to the revamped potential-related functions initially offered by SpatialPosition.

References

Stewart, John Q. 1941. “An Inverse Distance Variation for Certain Social Influences.” *Science* 93 (2404): 89–90. .

Owner

  • Name: riatelab
  • Login: riatelab
  • Kind: organization
  • Location: Paris

Spatial analysis and mapping software packages created by the Center for Spatial Analysis and Geovisualization - RIATE

Citation (CITATION.cff)

# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.2.2
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "potential" in publications use:'
type: software
license: GPL-3.0-only
title: 'potential: Implementation of the Potential Model'
version: 0.2.0
abstract: Provides functions to compute the potential model as defined by Stewart
  (1941) <doi:10.1126/science.93.2404.89>. Several options are available to customize
  the model, such as the possibility to fine-tune the distance friction functions
  or to use custom distance matrices. Some computations are parallelized to improve
  their efficiency.
authors:
- family-names: Giraud
  given-names: Timothée
  email: timothee.giraud@cnrs.fr
  orcid: https://orcid.org/0000-0002-1932-3323
- family-names: Commenges
  given-names: Hadrien
  email: hadrien.commenges@univ-paris1.fr
preferred-citation:
  type: manual
  title: 'potential: Implementation of the Potential Model'
  authors:
  - family-names: Giraud
    given-names: Timothée
    email: timothee.giraud@cnrs.fr
    orcid: https://orcid.org/0000-0002-1932-3323
  - family-names: Commenges
    given-names: Hadrien
    email: hadrien.commenges@univ-paris1.fr
  version: 0.2.0
  abstract: Provides functions to compute the potential model as defined by Stewart
    (1941) <doi:10.1126/science.93.2404.89>. Several options are available to customize
    the model, such as the possibility to fine-tune the distance friction functions
    or to use custom distance matrices. Some computations are parallelized to improve
    their efficiency.
  repository: https://CRAN.R-project.org/package=potential
  repository-code: https://github.com/riatelab/potential
  url: https://github.com/riatelab/potential
  contact:
  - family-names: Giraud
    given-names: Timothée
    email: timothee.giraud@cnrs.fr
    orcid: https://orcid.org/0000-0002-1932-3323
  keywords:
  - rspatial
  - stewart
  license: GPL-3.0-only
  year: '2022'
repository: https://CRAN.R-project.org/package=potential
repository-code: https://github.com/riatelab/potential
url: https://github.com/riatelab/potential
contact:
- family-names: Giraud
  given-names: Timothée
  email: timothee.giraud@cnrs.fr
  orcid: https://orcid.org/0000-0002-1932-3323
keywords:
- rspatial
- stewart
references:
- type: software
  title: 'R: A Language and Environment for Statistical Computing'
  notes: Depends
  authors:
  - name: R Core Team
  location:
    name: Vienna, Austria
  year: '2022'
  url: https://www.R-project.org/
  institution:
    name: R Foundation for Statistical Computing
  version: '>= 3.5.0'
- type: software
  title: sf
  abstract: 'sf: Simple Features for R'
  notes: Imports
  authors:
  - family-names: Pebesma
    given-names: Edzer
    email: edzer.pebesma@uni-muenster.de
    orcid: https://orcid.org/0000-0001-8049-7069
  year: '2022'
  url: https://CRAN.R-project.org/package=sf
- type: software
  title: graphics
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  location:
    name: Vienna, Austria
  year: '2022'
  url: https://www.R-project.org/
  institution:
    name: R Foundation for Statistical Computing
- type: software
  title: mapiso
  abstract: 'mapiso: Create Contour Polygons from Regular Grids'
  notes: Imports
  authors:
  - family-names: Giraud
    given-names: Timothée
    email: timothee.giraud@cnrs.fr
    orcid: https://orcid.org/0000-0002-1932-3323
  year: '2022'
  url: https://CRAN.R-project.org/package=mapiso
- type: software
  title: parallel
  abstract: 'R: A Language and Environment for Statistical Computing'
  notes: Imports
  authors:
  - name: R Core Team
  location:
    name: Vienna, Austria
  year: '2022'
  url: https://www.R-project.org/
  institution:
    name: R Foundation for Statistical Computing
- type: software
  title: doParallel
  abstract: 'doParallel: Foreach Parallel Adaptor for the ''parallel'' Package'
  notes: Imports
  authors:
  - family-names: Corporation
    given-names: Microsoft
  - family-names: Weston
    given-names: Steve
  year: '2022'
  url: https://CRAN.R-project.org/package=doParallel
- type: software
  title: foreach
  abstract: 'foreach: Provides Foreach Looping Construct'
  notes: Imports
  authors:
  - name: Microsoft
  - family-names: Weston
    given-names: Steve
  year: '2022'
  url: https://CRAN.R-project.org/package=foreach
- type: software
  title: covr
  abstract: 'covr: Test Coverage for Packages'
  notes: Suggests
  authors:
  - family-names: Hester
    given-names: Jim
    email: james.f.hester@gmail.com
  year: '2022'
  url: https://CRAN.R-project.org/package=covr
- type: software
  title: lwgeom
  abstract: 'lwgeom: Bindings to Selected ''liblwgeom'' Functions for Simple Features'
  notes: Suggests
  authors:
  - family-names: Pebesma
    given-names: Edzer
    email: edzer.pebesma@uni-muenster.de
    orcid: https://orcid.org/0000-0001-8049-7069
  year: '2022'
  url: https://CRAN.R-project.org/package=lwgeom
- type: software
  title: eurostat
  abstract: 'eurostat: Tools for Eurostat Open Data'
  notes: Suggests
  authors:
  - family-names: Lahti
    given-names: Leo
    email: leo.lahti@iki.fi
    orcid: https://orcid.org/0000-0001-5537-637X
  - family-names: Huovari
    given-names: Janne
  - family-names: Kainu
    given-names: Markus
  - family-names: Biecek
    given-names: Przemyslaw
  year: '2022'
  url: https://CRAN.R-project.org/package=eurostat
- type: software
  title: giscoR
  abstract: 'giscoR: Download Map Data from GISCO API - Eurostat'
  notes: Suggests
  authors:
  - family-names: Hernangómez
    given-names: Diego
    email: diego.hernangomezherrero@gmail.com
    orcid: https://orcid.org/0000-0001-8457-4658
    affiliation: rOpenGov
  year: '2022'
  url: https://CRAN.R-project.org/package=giscoR
- type: software
  title: mapsf
  abstract: 'mapsf: Thematic Cartography'
  notes: Suggests
  authors:
  - family-names: Giraud
    given-names: Timothée
    email: timothee.giraud@cnrs.fr
    orcid: https://orcid.org/0000-0002-1932-3323
  year: '2022'
  url: https://CRAN.R-project.org/package=mapsf
- type: software
  title: knitr
  abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
  notes: Suggests
  authors:
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  year: '2022'
  url: https://CRAN.R-project.org/package=knitr
- type: software
  title: tinytest
  abstract: 'tinytest: Lightweight and Feature Complete Unit Testing Framework'
  notes: Suggests
  authors:
  - family-names: van der Loo
    given-names: Mark
    email: mark.vanderloo@gmail.com
    orcid: https://orcid.org/0000-0002-9807-4686
  year: '2022'
  url: https://CRAN.R-project.org/package=tinytest
- type: software
  title: rmarkdown
  abstract: 'rmarkdown: Dynamic Documents for R'
  notes: Suggests
  authors:
  - family-names: Allaire
    given-names: JJ
    email: jj@rstudio.com
  - family-names: Xie
    given-names: Yihui
    email: xie@yihui.name
    orcid: https://orcid.org/0000-0003-0645-5666
  - family-names: McPherson
    given-names: Jonathan
    email: jonathan@rstudio.com
  - family-names: Luraschi
    given-names: Javier
    email: javier@rstudio.com
  - family-names: Ushey
    given-names: Kevin
    email: kevin@rstudio.com
  - family-names: Atkins
    given-names: Aron
    email: aron@rstudio.com
  - family-names: Wickham
    given-names: Hadley
    email: hadley@rstudio.com
  - family-names: Cheng
    given-names: Joe
    email: joe@rstudio.com
  - family-names: Chang
    given-names: Winston
    email: winston@rstudio.com
  - family-names: Iannone
    given-names: Richard
    email: rich@rstudio.com
    orcid: https://orcid.org/0000-0003-3925-190X
  year: '2022'
  url: https://CRAN.R-project.org/package=rmarkdown

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "potential",
  "description": "Provides functions to compute the potential model as defined by Stewart (1941) <doi:10.1126/science.93.2404.89>. Several options are available to customize the model, such as the possibility to fine-tune the distance friction functions or to use custom distance matrices. Some computations are parallelized to improve their efficiency.",
  "name": "potential: Implementation of the Potential Model",
  "codeRepository": "https://github.com/riatelab/potential",
  "issueTracker": "https://github.com/riatelab/potential/issues",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "0.2.0",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.1 (2022-06-23)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Timothe",
      "familyName": "Giraud",
      "email": "timothee.giraud@cnrs.fr",
      "@id": "https://orcid.org/0000-0002-1932-3323"
    },
    {
      "@type": "Person",
      "givenName": "Hadrien",
      "familyName": "Commenges",
      "email": "hadrien.commenges@univ-paris1.fr"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Timothe",
      "familyName": "Giraud",
      "email": "timothee.giraud@cnrs.fr",
      "@id": "https://orcid.org/0000-0002-1932-3323"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "covr",
      "name": "covr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=covr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "lwgeom",
      "name": "lwgeom",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lwgeom"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "eurostat",
      "name": "eurostat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=eurostat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "giscoR",
      "name": "giscoR",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=giscoR"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "mapsf",
      "name": "mapsf",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=mapsf"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "tinytest",
      "name": "tinytest",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tinytest"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 3.5.0"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "sf",
      "name": "sf",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=sf"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "graphics",
      "name": "graphics"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "mapiso",
      "name": "mapiso",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=mapiso"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "parallel",
      "name": "parallel"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "doParallel",
      "name": "doParallel",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=doParallel"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "foreach",
      "name": "foreach",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=foreach"
    },
    "SystemRequirements": null
  },
  "fileSize": "1732.97KB",
  "releaseNotes": "https://github.com/riatelab/potential/blob/master/NEWS.md",
  "readme": "https://github.com/riatelab/potential/blob/master/README.md",
  "contIntegration": [
    "https://github.com/riatelab/potential/actions",
    "https://app.codecov.io/gh/riatelab/potential"
  ],
  "developmentStatus": "https://www.repostatus.org/#active",
  "keywords": [
    "stewart",
    "rspatial"
  ]
}

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 68
  • Total Committers: 2
  • Avg Commits per committer: 34.0
  • Development Distribution Score (DDS): 0.441
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
rCarto t****d@c****r 38
rCarto t****d@c****r 30
Committer Domains (Top 20 + Academic)
cnrs.fr: 2

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: 14 minutes
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 14 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ydidees (1)
Pull Request Authors
  • rCarto (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 260 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: potential

Implementation of the Potential Model

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 260 Last month
Rankings
Stargazers count: 10.7%
Forks count: 17.8%
Dependent packages count: 29.8%
Average: 34.7%
Dependent repos count: 35.5%
Downloads: 79.7%
Maintainers (1)
Last synced: 7 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • doParallel * imports
  • foreach * imports
  • graphics * imports
  • mapiso * imports
  • parallel * imports
  • sf * imports
  • covr * suggests
  • eurostat * suggests
  • giscoR * suggests
  • knitr * suggests
  • lwgeom * suggests
  • mapsf * suggests
  • rmarkdown * suggests
  • tinytest * suggests
.github/workflows/check-standard.yaml actions
  • actions/checkout v2 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
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite