e-mission / op-admin-dashboard

An admin/deployer dashboard for the NREL OpenPATH platform
0 stars 9 forks source link

Support O-D and trajectory downloads #55

Open shankari opened 1 year ago

shankari commented 1 year ago

We currently have trip tables available for download. The trip tables contain user, distance, duration, time and labels in the common (anonymized) case. They can contain O-D locations as well, but most current deployers have chosen not to include them. Instead the O-D information is displayed in maps.

But we now have a request to support download of O-D and trajectory information for planning, without the connection to the user. So this would involve supporting downloads of tables with the O-D, time, trajectory, and labels but without the user id. We need to create those tables so that they can be downloaded for better planning and analysis.

Gkreindler commented 1 year ago

Thank you for all the wonderful work on this platform!

I would like to chime in with some thoughts on our application. In our use case, we are using the platform for a research study to collect individual mobility data from study participants. What would be very convenient for us is a table (eg that we can download as a csv) that also has a representation of the trajectory for that trip, together with user id and trip id. (I can imagine that including these identifiers may be optional for other deployments.) We are flexible to work with a variety of formats for the trajectory:

Generally, I think "wide" format (where the entire trajectory is encoded or contained in one or two columns) would work better than "long" format, where each row is a point along the trajectory, although the latter would also be ok. (I.e. a trajectories table that has userid, tripid, idx, time, lat, lon where idx is the index of the point within the trajectory).

shankari commented 1 year ago

Based on the target audience for this feature, I am going to assume that a table will be preferable - using excel with the data is the lowest common denonimator.

@achasmita you should be able to read the analysis/recreated_location and display it as a table in the same way that the trip table (analysis/confirmed_trip) or the demographic table (manual/demographic_survey) are displayed. It can go on the same page, in a new tab.

Once you are done with that basic export, we might want to support other options:

  1. like in the trip table, determine whether or not to exclude the user_id and the section_id based on a config option
  2. Toggle between the cleaned locations (analysis/recreated_location) and the raw locations (background/location)
  3. Provide an option to download timestamped geojson instead https://python-visualization.github.io/folium/latest/user_guide/plugins/timestamped_geojson.html