driftmlp-1.2
توضیحات
A set of tools for data extraction from the GDP database and estimating travel times
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | driftmlp-1.2 |
| نام | driftmlp |
| نسخه کتابخانه | 1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Mike O'Malley |
| ایمیل نویسنده | m.omalley2@lancaster.ac.uk |
| آدرس صفحه اصلی | https://github.com/MikeOMa/DriftMLP |
| آدرس اینترنتی | https://pypi.org/project/driftmlp/ |
| مجوز | - |
# 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](https://arxiv.org/abs/2002.07774)
Code to reproduce figures from paper, hence a sample use of this package can be found at [Github link to paper figure reproduction code.](https://github.com/MikeOMa/MLTravelTimesFigures)
### Documentation
The Documentation can be found @ https://driftmlp.readthedocs.io/
### Interactive Web Application
[](https://mybinder.org/v2/gh/MikeOMa/DriftMLP_Interactive_Notebook/main?urlpath=apps%2Finteractive.ipynb)
### Minimal Example
The below example produces an estimate of the pathway and travel time of going between `from_loc` and `to_loc`.
```angular2html
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.
نیازمندی
| مقدار | نام |
|---|---|
| <=1.20,>=1.17.2 | numpy |
| >=0.17 | cartopy |
| >=3.6.4 | h3 |
| >=1.3.1 | scipy |
| >0.8 | python-igraph |
| - | h5py |
| - | folium |
| - | geopandas |
| >=2.2.0 | pyproj |
| - | matplotlib |
| - | numba |
نحوه نصب
نصب پکیج whl driftmlp-1.2:
pip install driftmlp-1.2.whl
نصب پکیج tar.gz driftmlp-1.2:
pip install driftmlp-1.2.tar.gz