Code Monkey home page Code Monkey logo

dpd's Introduction

dpd

Build Status Coverage Status Documentation Status MIT License Code style: black

dpd is a growing library of transportation-related tools sorted into submodules. Please let me know if you find these tools useful or interesting.

Documentation

Documentation is available at https://dpd.readthedocs.io/en/latest/.

Getting Started

Prerequisities

apt install python3-dev libproj-dev proj-data proj-bin libgeos-dev gdal-bin libgdal-dev

Installation

pip install git+https://github.com/davidbailey/dpd.git

Testing

black --check .
isort --check --profile black .
bandit -r .
flake8
python -m pytest tests/

Usage

  • Analysis - The starting point is a decision - made up of one or more alternatives (e.g. Should we build a train, bus, bike path, or nothing?). Each alternative is made up of one or mote activities (e.g. design, build, operations, maintenance) which each have a start time, end time, cost, and benefit. The alternative class has the ability to compute a benefit-cost ratio, plot cash flow diagrams and create timelines. The decision class compares alternatives via multiple-criteria analysis. These tools show the relative merits (pros and cons) for each alternative. E.g. Analysis

The two primary sources for cost/benefit information are Driving and Modeling.

  • Driving - Driving includes a route class to describe the physical geometry a transportation route (air, sea, road, or rail). A route has stops which can be used to calculate accessibility. A route can be driven to generate a trip (a time-indexed geometric series). A trip can be expanded to create a schedule. All of these classes relate closely to GTFS data structures. As mentioned, routes, trips, schedules, etc. all have design/build/operations/maintenance costs/benefits/timelines. The general idea is the user should be able to click on a few points, select a vehicle, and the class should output a cost estimate and timetable. E.g. Driving

  • Modeling - Modeling contains an Agent-based Transportation Model and a Four-step Transportation Model. These models should be able to answer questions about transportation supply and demand. They should also be able to answer second level questions about safety, equity, pollution, etc. E.g. Agent-based Transportation Model, Four-step Transportation Model, and Gravity Model

There are also several supporting submodules that can be used by the above modules and can be used on their own.

  • Folium - an example Folium Flask App
  • Geometry - functions for computing geometric operations
  • Mechanics - a class for modeling a kinematic body - this is used by both Driving and Modeling
  • Geopandas - functions for working with geopandas GeoDataFrames
  • Mapping - classes for creating a map. E.g. Agent-based Transportation Model
  • Open Source Routing Machine (OSRM) - functions to interact with an OSRM server
  • OpenStreetMap (OSM) - a class for downloading relations, ways, and nodes from OpenStreetMap and a class for creating a map object.
  • Shapely - functions for working with shapely geometries
  • US Census - functions for gathering data from the US Census. E.g. Density and public transportation and Four-step Transportation Model
  • Utils - utility functions used by other submodules
  • Werkzeug - a class to run a Werkzeug server in a thread.
  • Wikipedia - functions for gathering data from Wikipedia. E.g. Wikipedia

License

This project is licensed under the MIT License.

dpd's People

Contributors

davidbailey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zodiacwind

dpd's Issues

Tracking issue for rtree/issues/147

Tracking issue for Toblerity/rtree#147

rtree is a dependency for geopandas. The above issue breaks autodoc for any module that requires geopandas and breaks the build unless there is an apt install line in .travis.yml. Once the above issue is fixed, we can fix these two issues in this project.

Zones in 4 step model

Hi

I just move from R to python and it has been very frustrating with the topic of the libraries.
I download DPD correctly using first pip install DPD and with conda too.

In my beginning understanding of python when you want to use just some of the functions of a library you use from x import y.

In this case from dpd.modeling import Zones, OriginDestinationDataFrame

However, this gives me an error. when I use DPD. (and use tab) I donnt see the function modelling neither.

Can you help to understnd this?

Thank you.

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.