scikit-mobility
is a library for human mobility analysis in Python. The library allows to:
-
represent trajectories and mobility flows with proper data structures,
TrajDataFrame
andFlowDataFrame
. -
manage and manipulate mobility data of various formats (call detail records, GPS data, data from Location Based Social Networks, survey data, etc.);
-
extract human mobility metrics and patterns from data, both at individual and collective level (e.g., length of displacements, characteristic distance, origin-destination matrix, etc.)
-
generate synthetic individual trajectories using standard mathematical models (random walk models, exploration and preferential return model, etc.)
-
generate synthetic mobility flows using standard migration models (gravity model, radiation model, etc.)
-
assess the privacy risk associated with a mobility dataset
https://scikit-mobility.github.io/scikit-mobility/html/index.html
if you use scikit-mobility please cite the following paper: https://arxiv.org/abs/1907.07062
First, clone the repository - this creates a new directory ./scikit_mobility
.
git clone https://github.com/scikit-mobility/scikit-mobility scikit_mobility
-
Create an environment
skmob
and install pipconda create -n skmob pip
-
Activate
conda activate skmob
-
Install skmob
cd scikit_mobility python setup.py install
If the installation of a required library fails, reinstall it with
conda install
. -
OPTIONAL to use
scikit-mobility
on the jupyter notebook-
Install the kernel
conda install ipykernel
-
Open a notebook and check if the kernel
skmob
is on the kernel list. If not, run the following:env=$(basename `echo $CONDA_PREFIX`) python -m ipykernel install --user --name "$env" --display-name "Python [conda env:"$env"]"
-
-
Create an environment
skmob
python3 -m venv skmob
-
Activate
source skmob/bin/activate
-
Install skmob
cd scikit_mobility python setup.py install
-
OPTIONAL to use
scikit-mobility
on the jupyter notebook-
Activate the virutalenv:
source skmob/bin/activate
-
Install jupyter notebook:
pip install jupyter
-
Run jupyter notebook
jupyter notebook
-
(Optional) install the kernel with a specific name
ipython kernel install --user --name=skmob
-
> source activate skmob
(skmob)> python
>>> import skmob
>>>