Skip to main content

Fast and lightweight file parsers for SUMO(traffic simulator) output

Project description

What's this?

Fast and lightweight file parsers for Eclipse SUMO(traffic simulator) output.

The SUMO outputs are huge in size and hard to handle.

SUMO team provides scripts to convert from xml into CSV, however, the procedure is troublesome (downloading XSD, executing python script...)

Also, machine learning users take care of matrix data format.

This package provides an easy-to-call python interface to obtain matrix form from SUMO xml files.

Contributions

  • easy-to-call python interfaces to obtain matrix form from SUMO xml files
  • easy-to-call python interfaces to visualize SUMO simulations

Gallery

You can generate a traffic animation by fcd output xml.

Example of animation

You can visualize where a detector locates in a network.

Visualization example of detector position

You can visualize a transition of vehicle by vehrout.xml.

Visualization example of traffic route

Install

pip install sumo-output-parsers

Some submodules are not ready to use by default for which we avoid errors relating Proproj or Cartopy.

If you'd like to depict car flows or detector positions, install with

pip install "sumo-output-parsers[full]"

Sample

See sample.py and visualization_example.ipynb

Test

pytest tests/

If your package-dependency is complete including packages for visualization, then pytest tests/ --visualization

For developers

Build with poetry.

Install Guide

When you encounter any dependency issues, I recommend to use conda. cartopy and proj cause the dependency issue frequently. Conda helps you to install the compiled binaries. See Proj documentation.

License

@misc{sumo-output-parsers,
  author = {Kensuke Mitsuzawa},
  title = {sumo_output_parsers},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{}},
}

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

sumo_output_parsers-0.61.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

sumo_output_parsers-0.61-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file sumo_output_parsers-0.61.tar.gz.

File metadata

  • Download URL: sumo_output_parsers-0.61.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.8 Linux/5.4.0-92-generic

File hashes

Hashes for sumo_output_parsers-0.61.tar.gz
Algorithm Hash digest
SHA256 a8eceb8c8258e2a9778360c605d9a7a872dba89e84937d7585204ba395a8b1ed
MD5 aeddf947b4d606abde654ed7ee47aa98
BLAKE2b-256 3c4df7a81562310b98f451465883b2b4c1f7b3df494724d61df285448b85fcd7

See more details on using hashes here.

File details

Details for the file sumo_output_parsers-0.61-py3-none-any.whl.

File metadata

File hashes

Hashes for sumo_output_parsers-0.61-py3-none-any.whl
Algorithm Hash digest
SHA256 bd908a96fcb14074516645968c2209b5d330bab43870583673598a3da83996fd
MD5 c112839df29c6daba7c96a4ba7484e79
BLAKE2b-256 b028c445de391796e5d107d480a9c9774819d5a9bfdd440a5b56fa6e31d52331

See more details on using hashes here.

Supported by

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