Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

NotificationsYou must be signed in to change notification settings

riatelab/potential

Repository files navigation

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

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

Installation

You can install the released version ofpotential fromCRAN with:

install.packages("potential")

You can install the development version ofpotential from GitHub with:

# install.packages("remotes")remotes::install_github("riatelab/potential")

Demo

library(mapsf)library(potential)# Display the spatial interaction functionplot_inter(fun="e",span=75000,beta=2,limit=250000)

# create a regular gridy<- create_grid(x=n3_poly,res=20000)# compute potentialspot<- mcpotential(x=n3_pt,y=y,var="POP19",fun="e",span=75000,beta=2,limit=250000,ncl=2)# Define potential according to the maximum valuey$pot<-pot/ max(pot)*100# create equipotential areasbks<- seq(0,100,length.out=11)equipot<- equipotential(y,var="pot",breaks=bks,mask=n3_poly)# map potentialsmf_theme("default")mf_map(x=equipot,var="min",type="choro",breaks=bks,pal= hcl.colors(10,'Teal'),border="#121725",leg_val_rnd=0,lwd=.2,leg_pos="topright",leg_title="Potential Intensity")mf_title(txt="Potentials of Population")mf_credits(txt="© EuroGeographics for the administrative boundaries and © Eurostat for data")

Note

This package provides access to the revamped potential-related functionsinitially offered bySpatialPosition.

References

Stewart, John Q. 1941. “An Inverse Distance Variation for Certain SocialInfluences.”Science 93 (2404): 89–90.https://doi.org/10.1126/science.93.2404.89.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp