Plot your routes on a map with open source visualization tool, Nextplot

How do the routes look? Are they clustered? Are there any stops outside the region? Answer these questions and more with an open source route plotting tool that allows for easy, customized styling.

What’s the saying? A picture is worth a thousand words, or data points? Well, the team here certainly agrees. Visualization tools are critical in the DecisionOps space – from plotting solution values over time to visually representing those solutions in context (like on a map). Visualizations give operations researchers, developers, and operators another angle to understand our data and then make better decisions with the info we have. With that in mind, we’re excited to share that Nextplot is now an open source CLI tool for visualizing routes, clusters, and more from arbitrary JSON formats. As open source tools become more integral to the OR community, we hope Nextplot is a valuable asset to anyone working on optimization projects – and we look forward to continuing to show our support for the community in new ways

If you’re using OR-Tools, VROOM, Nextroute, or any optimization tool that can produce a JSON output, you can plot your routes with Nextplot in just a few lines of code. Quickly create a visualization for your routing use case – and then customize it with the styling, animations, and metadata of your choice. (Cool images and gifs below…) And since it’s open source, it’s free to use. Give it a try and feel free to suggest changes by creating an issue!

Here's how to build a visualization using a JSON file:

The story of Nextplot – from an internal tool to open source project

We initially created Nextplot to help users visualize their routes – from understanding operators' and drivers’ perspectives to spotting oddities and identifying algorithm improvements. Working with diverse use cases and teams, we needed a way to quickly visualize route data that came in different schemas. We started by writing custom Python code each time and/or changing the output in order to use web-based visualizations. And then we had an idea: let’s create a plotting tool that can work with any JSON schema. Our team started developing Nextplot, which makes use of JSON paths (similar to`jq`) pointing to the relevant data so that plotting doesn’t mean re-architecting your data or writing a custom script. This was a game changer for us. In a matter of minutes, we could see almost any JSON input or output on a map. As soon as we started using it with our users, we realized how valuable it was to have a versatile mapping tool in the hands of operations researchers, developers, product managers, and really anyone working with geospatial data.

Nextplot has evolved over time to include features based on the feedback from our customers, internal requirements, and well, just things that we thought would be fun to include like animations :-). The OR community is also evolving and innovating from academia to industry applications, so open sourcing a tool that helps with both model and solver development felt like the natural next step.

Here are a few of the reasons to use Nextplot:

  • Visualize routes on a map (Do the routes look like what we expected?)
  • Plot clusters, points, and more (Do these look like what we expected?)
  • Identify input errors (Are there outliers/locations outside of the relevant regions?)
  • Include the context of a point (JSON values) next to the point on the map (What’s the arrival time at this location?)
  • Improve solver development (How are solution values improving over time?)

Whether you’re plotting locations, routes, or solution values, Nextplot helps you make better decisions with the time you have.

What can I customize with Nextplot?

Now that Nextplot is open source, you can really customize anything you’d like, but there are a few things built in that allow you to make it your own in a few lines of code. Check out the gallery in the repo for even more examples!

Use maps with RoutingKit to see your routes on a real road map

Customize colors, line styling, and more

Add animations to see the flow of the routes

Include metadata to see details like arrival time and travel distance

Visualize clustered routes

How do I get started with Nextplot? 

Head to the Nextplot repo to get started. Add your thoughts and suggestions in the form of issues and pull requests. We can’t wait to see what you think! 

Want to try it out with Nextmv? Create a free Nextmv account. If you have questions, hop into the forums or reach out to us directly.

Video by:
No items found.