Python module for calculating neighborhood density
-
Be sure you have Python installed. From a shell session, run
python --version. The output should look something like what is shown below. This package was developed against Python 3.6, though it may work with newer versions of python.$ python --version Python 3.6.6
-
Check that
pipis installed for the version of Python you intend on using. From a shell session, runpip --version. The output should look something like what is shown below. It's critical that the python version shown at the end of the line matches the one above.$ pip --version pip 18.1 from c:\...python\python36\lib\site-packages\pip (python 3.6)
-
Check that
pipenvis installed. From a shell session, runpipenv --version. The output should be something like:$ pipenv --version pipenv, version 2018.10.13
If pipenv is not installed, install it using pip by running
pip install pipenv, then check that the installation was successful by runningpipenv --version -
Clone this repository.
-
From the root directory of the repository, create a virtual environment with
pipenv$ cd PyND $ pipenv installNote: to support automated unit tests with
pytestrun insteadpipenv install --dev -
Install the R package reticulate, which allows you to run python from within an R session and pass objects back and forth between the two.
install.packages("reticulate") -
From R,
source()the filePyND\Test.R