Skip to main content

pymobility

Work done by South Asia Poverty Team, The World Bank

pymobility is the Python package built on top of PySpark API, which faciliates big data processing. This package has several sub-packages and modules for quantifying mobility and migration from raw GPS data. The package takes delta formatted geo-tagged raw dataset and generates various datasets like Origin Destination matrix and net migration figures, and various statistics like average records in a time-period, average devices registered in a time period, etc.

pymobility has three sub-packages: odm, stm, and eda. odm is used for generating origin-destination figures. stm helps to quantify short term migration depending on whatever definition we use for short term migrants. The stm sub-package is made modular, and there are a number of parameters which can be set according to the definition of short term migrant used. Another sub-package, eda, helps to do exploratory data analysis. We can get statistics like average devices in some time-period, or average records in some time-period, etc. More documentation about the individual sub-packages is done on the sub-package README file itself.

Dependencies

As the package is built on top of PySpark API, Python API for Spark (or PySpark API) should be installed. The code is well tested on Python 3.6, so users are encouraged to have Python 3.6+ version.

Other Python packages used herein are Pandas.

Installation

Both pyspark and pandas can be installed using pip. The commands for them are given below:

pip install pandas
pip install pyspark

More details about pyspark can be found here.

Usage

This package can be used for quantifying mobility and migration from geo-taggged raw delta files. It facilitates following features.

  1. Origin Destination Matrix (OD matrix): Details about use of this library for quantifying origin-destination movement can be found in the README.md file inside the odm sub-package itself.

  2. Short Term Migration: This type of migration is quantified using stm sub-package, which facilitates flexibility in short term migrants' definition with the help of different parameters like away time period required, definition of home, etc.

  3. Exploratory Data Analysis: The exploratory data analysis can be done using the eda sub-package. Under eda commuter aggregates and mobility summary can be quantified. Details about its use can be found in the README.md.

Metadata

Release files for pymobility 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymobility 0.0.8
File Size Uploaded Provenance Actions
pymobility-0.0.8.tar.gz 12.0 kB Without provenance Details for pymobility-0.0.8.tar.gz

Release files / pymobility-0.0.8.tar.gz

Download URL pymobility-0.0.8.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
06da4e7b2d6ba8f71489995ad7e05e22c19c9b2725d4081705b37ec88f0caebf
BLAKE2b-256 checksum
How to use checksums
6d385de315acbb8c01d88264ba13587eb08f12ec7d46cb2f3643dca394c2b49f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

Security for pymobility 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page