-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rjf/csv output #168
Rjf/csv output #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k, will fix this. it looks like
|
i realized this morning our typical use case will actually be a [response_output_policy]
type = "combined"
[[response_output_policy.policies]]
type = "file"
filename = "output_complete.json"
format = { type = "json", newline_delimited = true }
[[response_output_policy.policies]]
type = "file"
filename = "output_summary.csv"
[response_output_policy.policies.format]
type = "csv"
sorted = true
[response_output_policy.policies.format.mapping]
od_id = "request.name"
dlon = "request.destination_x"
dlat = "request.destination_y"
olon = "request.origin_x"
olat = "request.origin_y"
model_name = "request.model_name"
distance = "traversal_summary.distance"
time = "traversal_summary.time"
energy_electric = { optional = "traversal_summary.energy_electric" }
energy_liquid = { optional = "traversal_summary.energy_electric" }
distance_cost = "cost.distance"
time_cost = "cost.time"
energy_electric_cost = { optional = "cost.energy_electric" }
energy_liquid_cost = { optional = "cost.energy_liquid" }
total_cost = "cost.total_cost"
distance_unit = "state_model.distance.distance_unit"
time_unit = "state_model.time.time_unit"
energy_electic_unit = { optional = "state_model.energy_electric.energy_unit" }
energy_liquid_unit = { optional = "state_model.energy_liquid.energy_unit" }
distance_weight = "request.weights.distance"
time_weight = "request.weights.time"
energy_electric_weight = { optional = "request.weights.energy_electric" }
energy_liquid_weight = { optional = "request.weights.energy_liquid" } |
@nreinicke this has been updated, does it work now for you? also, see note above about combined output policies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good call on the combined output policy, that makes a lot of sense. Just retested and everything looks good!
this PR introduces a new CSV output format for RouteE Compass. a user can specify a mapping from JSON dot-delimited paths into CSV column names. for example:
running this with the query in our example notebook produces the following CSV:
details
along the way,
Closes #147.
Closes #161.
Closes #164.