The hmi
package is a python module that provides an interface to compute distances between locations based on Özak's (2018, 2010) Human Mobility Index. There are three main classes of computations based on the Human Mobility Index:
- HMI: Only land based mobility
- HMISea: Land based mobility and pre-1500CE seafaring technologies
- HMIOcean: Land based mobility and post-1500CE seafaring technologies
It includes tools to
- Compute distances between locations
- Compute isolation measures for locations (see e.g. Ashraf, Galor, and Özak (2010))
- Generate optimal routes as shape files
- Export optimal travel times, routes, etc. to shape files, CSV files, etc
Given the requirements of the package, the best way to install is to first create a mamba/conda
environment as follows (this creates an python-3.11
environment and adds some basic packages that are needed).
mamba create --name HMI --override-channels -c conda-forge python=3.11 pip geopandas georasters jupyterlab jupyter seaborn geoplot pysal
activate the environment
mamba activate HMI
then
pip install hmi
or
pip install git+git://github.com/ozak/hmi.git
import hmi
If you use the package please cite:
and the package itself.
Find a bug? Report it via github issues by providing
- a link to download the smallest possible raster and vector dataset necessary to reproduce the error
- python code or command to reproduce the error
- information on your environment: versions of python, gdal and numpy and system memory
© Ömer Özak (2014)
This code and data is provided under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License and GPLv3.