Skip to content
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

Support O-D and trajectory downloads #55

Open
shankari opened this issue Jun 13, 2023 · 2 comments
Open

Support O-D and trajectory downloads #55

shankari opened this issue Jun 13, 2023 · 2 comments

Comments

@shankari
Copy link
Contributor

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
Copy link

Gkreindler commented Aug 29, 2023

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:

  • One option is for the column to be a list of tuples (lat, lon, time) using some format for time.
  • Alternatively, it could be two columns polyline and polyline_times. The former could have a list of (lat, lon) OR an encoding of the list of coordinates, e.g. this, while the latter would be a list of timestamps or offset timestamps relative to the trips start time.

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
Copy link
Contributor Author

shankari commented Sep 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants