Coder Social home page Coder Social logo

scikit-mobility's Introduction

scikit-mobility

Human Mobility analysis in Python

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 and FlowDataFrame.

  • 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

Install

First, clone the repository - this creates a new directory ./scikit_mobility.

    git clone https://github.com/scikit-mobility/scikit-mobility scikit_mobility

with conda - miniconda

  1. Create an environment skmob and install pip

     conda create -n skmob pip
    
  2. Activate

     conda activate skmob
    
  3. Install skmob

     cd scikit_mobility
     python setup.py
    

    If the installation of a required library fails, reinstall it with conda install.

  4. 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"]"
      

without conda (python >= 3.6 required)

  1. Create an environment skmob

     python3 -m venv skmob
    
  2. Activate

     source skmob/bin/activate
    
  3. Install skmob

     cd scikit_mobility
     python setup.py install
    
  4. 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
      

Test the installation

> source activate skmob
(skmob)> python
>>> import skmob
>>>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.