Skip to main content

No project description provided

Project description

Network Wrangler is a Python library for managing travel model network scenarios.

System Requirements

Network Wrangler should be operating system agonistic and has been tested on Ubuntu and Mac OS.

Network Wrangler does require Python 3.10+. If you have a different version of Python installed (e.g. from ArcGIS), conda or a similar virtual environment manager can care of installing it for you in the installation instructions below.

Installation

Requirements for basic network_wranglerare functionality as well as enhanced development/testing, visualization and documentation functionalities are stored in requirements*.txt and pyproject.toml but are automatically installed when using pip.

Ready to install network wrangler?

Latest Official Version

pip install network-wrangler

From GitHub

pip install git+https://github.com/network-wrangler/network_wrangler.git@main#egg=network_wrangler

If you wanted to install from a specific tag/version number or branch, replace @main with @<branchname> or @tag

From Clone

If you are going to be working on Network Wrangler locally, you might want to clone it to your local machine and install it from the clone. The -e will install it in editable mode.

If you have GitHub desktop installed, you can either do this by using the GitHub user interface by clicking on the green button "clone or download" in the main network wrangler repository page.

Otherwise, you can use the command prompt to navigate to the directory that you would like to store your network wrangler clone and then using a git command to clone it.

cd path to where you want to put wrangler
git clone https://github.com/network-wrangler/network_wrangler

Then you should be able to install Network Wrangler in "develop" mode.

cd network_wrangler
pip install -e .

Quickstart

To get a feel for the API and using project cards, please refer to the "Wrangler Quickstart" jupyter notebook.

To start the notebook, open a command line in the network_wrangler top-level directory and type:

jupyter notebook

Documentation

Documentation can be built from the /docs folder using the command: make html

Usage

import network_wrangler

##todo this is just an example for now

network_wrangler.setup_logging()

## Network Manipulation
my_network = network_wrangler.read_roadway_network(...) # returns
my_network.apply_project_card(...) # returns
my_network.write_roadway_network(...) # returns

## Scenario Building
my_scenario = network_wrangler.create_scenario(
        base_scenario=my_base_scenario,
        card_search_dir=project_card_directory,
        tags = ["baseline-2050"]
        )
my_scenario.apply_all_projects()
my_scenario.write("my_project/baseline", "baseline-2050")
my_scenario.summarize(outfile="scenario_summary_baseline.txt")

my_scenario.add_projects_from_files(list_of_build_project_card_files)
my_scenario.queued_projects
my_scenario.apply_all_projects()
my_scenario.write("my_project/build", "baseline")

Attribution

This project is built upon the ideas and concepts implemented in the network wrangler project by the San Francisco County Transportation Authority and expanded upon by the Metropolitan Transportation Commission.

While Network Wrangler as written here is based on these concepts, the code is distinct and builds upon other packages such as geopandas and pydantic which hadn't been implemented when networkwrangler 1.0 was developed.

Contributing

Pull requests are welcome. Please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

Apache-2.0

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

network_wrangler-1.0b4.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

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

network_wrangler-1.0b4-py3-none-any.whl (244.9 kB view details)

Uploaded Python 3

File details

Details for the file network_wrangler-1.0b4.tar.gz.

File metadata

  • Download URL: network_wrangler-1.0b4.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for network_wrangler-1.0b4.tar.gz
Algorithm Hash digest
SHA256 bc7ee37c838d29ebf572d758c21d6e40b7ae5fe4d1fd1ac08ad6dd3e3c7eed60
MD5 d7c0824976741ae190cda5a32be6d4d9
BLAKE2b-256 cfe8e34fd54a9020d20aaf86f5ee5770e5d819e3776b0d29e384cde93b6b8ee5

See more details on using hashes here.

Provenance

The following attestation bundles were made for network_wrangler-1.0b4.tar.gz:

Publisher: publish.yml on network-wrangler/network_wrangler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file network_wrangler-1.0b4-py3-none-any.whl.

File metadata

File hashes

Hashes for network_wrangler-1.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 873979f1353df945da80fe238e9adb4843623da78ab262eaa2ca1a1889d8a6ad
MD5 5eccafeab5ba54ddfceb03eecb59cf3d
BLAKE2b-256 5c61261254326c574ba99b7361934a22eeb5b2704665a58ddd1ac9713bb0edee

See more details on using hashes here.

Provenance

The following attestation bundles were made for network_wrangler-1.0b4-py3-none-any.whl:

Publisher: publish.yml on network-wrangler/network_wrangler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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