Skip to content

Latest commit

 

History

History
276 lines (204 loc) · 9.32 KB

README.md

File metadata and controls

276 lines (204 loc) · 9.32 KB

Gallery

The gallery contains a list of plots using the provided sample files. Try to execute the listed calls from the example directory.


This route plot uses sorting to get a rainbow like result. Since the coordinates are not nested but a list of points, the --jpath_x and --jpath_y flags are reset to "".

nextplot route \
        --input_route ../data/dortmund-route.json \
        --jpath_route "state.drivers[*].geometry.coordinates" \
        --jpath_x "" \
        --jpath_y "" \
        --output_map dortmund-route.map.html \
        --output_plot dortmund-route.plot.html \
        --output_image dortmund-route.plot.png \
        --sort_color

Image result:

dortmund-route.png

Map result (link):

dortmund-route.html.png


This cluster plot has a separate file containing the coordinates while the main file contains sets of indices referring to them as clusters. Furthermore, it uses sorting to get a rainbow like result. Since the coordinates are not nested but a list of points, the --jpath_x and --jpath_y flags are reset to "".

nextplot cluster \
        --input_cluster ../data/dortmund-cluster.json \
        --jpath_cluster "state.clusters[*].points" \
        --input_pos ../data/dortmund-point.json \
        --jpath_pos "points" \
        --jpath_x "" \
        --jpath_y "" \
        --output_map dortmund-cluster.map.html \
        --output_plot dortmund-cluster.plot.html \
        --output_image dortmund-cluster.plot.png \
        --sort_color

Image result:

dortmund-cluster.png

Map result (link):

dortmund-cluster.html.png


This point plot uses sorting to get a rainbow like result.

nextplot point \
        --input_point ../data/dortmund-route.json \
        --jpath_point "state.drivers[*].geometry.coordinates" \
        --jpath_x "" \
        --jpath_y "" \
        --output_map dortmund-point.map.html \
        --output_plot dortmund-point.plot.html \
        --output_image dortmund-point.plot.png \
        --no_points \
        --sort_color

Image result:

dortmund-point.png

Map result (link):

dortmund-point.html.png


This route plot uses custom x, y paths, omits the depot location at start & end, quadruples the width of the route lines and adds a custom tile layer.

nextplot route \
        --input_route ../data/paris-route.json \
        --jpath_route "state.tours[*].route" \
        --jpath_x "location[1]" \
        --jpath_y "location[0]" \
        --output_map paris-route.map.html \
        --output_plot paris-route.plot.html \
        --output_image paris-route.plot.png \
        --omit_start \
        --omit_end \
        --custom_map_tile 'https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png,DarkMatter no labels,<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' \
        --weight_route 2.5 \
        --weight_points 4

Image result:

paris-route.png

Map result (link):

paris-route.html.png


This plot uses routingkit and therefore needs OSM information. Download a suitable region file via:

wget -N http://download.geofabrik.de/north-america/us/texas-latest.osm.pbf

This route plot uses routingkit for plotting road paths. Alternatively, spin up a local OSRM server and use the --osrm_host flag to use it (see osrm-steps). Furthermore, unassigned points are plotted in addition to the route stops.

nextplot route \
        --input_route ../data/fleet-cloud.json \
        --jpath_route "state.vehicles[*].route" \
        --jpath_unassigned "state.unassigned" \
        --output_map fleet-cloud.map.html \
        --output_plot fleet-cloud.plot.html \
        --output_image fleet-cloud.plot.png \
        --rk_osm "texas-latest.osm.pbf"

Image result:

fleet-cloud.png

Map result (link):

fleet-cloud.html.png


This plot uses routingkit like the one above. Download a suitable region file via:

wget -N https://download.geofabrik.de/europe/france/ile-de-france-latest.osm.pbf

In addition to what the plots above introduced, this one adds start and end markers for the routes. Since the routes in the paris-route.json file start at a mutual "depot", we are omitting the start and end to get individual markers.

nextplot route \
        --input_route ../data/paris-route.json \
        --jpath_route "state.tours[*].route" \
        --jpath_x "location[1]" \
        --jpath_y "location[0]" \
        --omit_start \
        --omit_end \
        --output_map paris-markers.map.html \
        --output_plot paris-markers.plot.html \
        --output_image paris-markers.plot.png \
        --start_end_markers \
        --rk_osm "ile-de-france-latest.osm.pbf"

Image result:

Map result (link):

fleet-cloud.html.png


This plot adds animations as an indication for route direction to previous plot. Hence, don't forget to download a suitable region file (see above).

nextplot route \
        --input_route ../data/fleet-cloud.json \
        --jpath_route "state.vehicles[*].route" \
        --jpath_unassigned "state.unassigned" \
        --output_map fleet-cloud.map.html \
        --output_plot fleet-cloud.plot.html \
        --output_image fleet-cloud.plot.png \
        --rk_osm "texas-latest.osm.pbf" \
        --route_direction animation

Map result (link):

fleet-cloud-animation.html.gif


Following command plots the points of the Paris file while maintaining their grouping (as indicated by the jpath - grouped by route).

nextplot point \
        --input_point ../data/paris-route.json \
        --jpath_point state[*].tours[*].route \
        --jpath_x location[1] \
        --jpath_y location[0] \
        --output_map paris-point-grouped.map.html \
        --output_plot paris-point-grouped.plot.html \
        --output_image paris-point-grouped.plot.png \
        --no_points \
        --weight_points 4

Image result:

paris-point-grouped.png

Map result (link):

paris-point-grouped.html.png


Following command plots the same points ignoring their grouping.

nextplot point \
        --input_point ../data/paris-route.json \
        --jpath_point state[*].tours[*].route[*].location \
        --output_map paris-point-ungrouped.map.html \
        --output_plot paris-point-ungrouped.plot.html \
        --output_image paris-point-ungrouped.plot.png \
        --weight_points 4 \
        --swap \
        --no_points \
        --sort_color

Image result:

paris-point-ungrouped.png

Map result (link):

paris-point-ungrouped.html.png


Following command plots the solution value progression of two hop runs with all solutions returned. The default jpaths adhere to hop's all solutions structure. However, if necessary jpath_solution, jpath_value & jpath_elapsed can be used to customize the path to the relevant information. For additional information please refer to nextplot progression --help.

nextplot progression \
        --input_progression 0.7.3,../data/fleet-cloud-all-0.7.3.json 0.8,../data/fleet-cloud-all-0.8.json \
        --output_png fleet-cloud-comparison.png \
        --output_html fleet-cloud-comparison.html \
        --title "Fleet cloud comparison"

Interactive result: link

Image result:

fleet-cloud-comparison.png