Skip to main content

A set of tools for data extraction from the GDP database and estimating travel times

Project description

DriftMLP

This package contains tools for implementing the methodology associated with the paper Estimating the travel time and the most likely path from Lagrangian drifters Code to reproduce figures from paper, hence a sample use of this package can be found at Github link to paper figure reproduction code.

Documentation

The Documentation can be found @ https://driftmlp.readthedocs.io/

Interactive Web Application

Binder

Minimal Example

The below example produces an estimate of the pathway and travel time of going between from_loc and to_loc.

import driftmlp

T_mat = driftmlp.load_default_network()
from_loc = [-90.90, 23.88]
to_loc = [-9.88, 35.80] 
SP = driftmlp.shortest_path.SingleSP(T_mat, from_loc, to_loc)
display(SP)
SP.plot_folium()

General usage

The package has 2 main usage components

  • DriftMLP.driftfile_to_network will form the network from the hdf5 file above which is the most computationally intensive part
  • DriftMLP.shortest_path module contains functions which require a network to run.
    • SingleSP is sufficient for most usage. It will take the network and a pair of locations and results in a class containing both the path there and back. The travel time of this path may be accessed via the .sp.travel_time attribute. Has methods .plot_cartopy and .plot_folium for convince.
    • network_path is a more customizable class which can be used for manual adaptations. It takes in two h3 indices and stores the path going from the first to the second. Stores travel path in network indices (.nid), spatial discretization indices (.h3id) and travel time in days (.travel_time).
  • DriftMLP.rotations contains functionality to generate random rotations. See paper for further details. This has two options one method by ARVO and one by shoemake. The Shoemake quaternion approach is advised.
  • DriftMLP.plotting Various functions for h3 index sequence plotting. Two backends are there on using folium, one using cartopy. Folium is easier to view and scroll around with. Cartopy/Matplotlib are far more customizable and can produce publication ready graphics.

TODO

  • Publish to pip/ conda-forge.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driftmlp-1.2.linux-x86_64.tar.gz (10.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

driftmlp-1.2-py3-none-any.whl (11.4 MB view details)

Uploaded Python 3

File details

Details for the file driftmlp-1.2.linux-x86_64.tar.gz.

File metadata

  • Download URL: driftmlp-1.2.linux-x86_64.tar.gz
  • Upload date:
  • Size: 10.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for driftmlp-1.2.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 1e26ba0ade1a65ba81e99e53ac766011d3c761f0c772404a4a9f6c9ec226d7f3
MD5 a347a22e915467a99b3d78acf85d770a
BLAKE2b-256 87eff917708997c108c2ad1c3965b512700f78d41f873cf888e518a8886dc2a6

See more details on using hashes here.

File details

Details for the file driftmlp-1.2-py3-none-any.whl.

File metadata

  • Download URL: driftmlp-1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for driftmlp-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d55788885b73dbe66fd50e64e882135ab7a43b7dc8ccc8c02dcf9f0b1b3f6e25
MD5 00193915f99551269d5d307c503a01b2
BLAKE2b-256 dd2b30d90c3f8e716214355f8af4f6d470059b096df585f0a7d69f59505db95b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page