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

Change the geojson export code to use confirmed trips instead of clea… #837

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

shankari
Copy link
Contributor

@shankari shankari commented Oct 6, 2021

…ned trips

The changes were actually fairly minor

  • add new get_confirmed_timeline and get_confirmed_timeline_from_dt which
    reads cleaned places but confirmed trips
  • fortunately, the timeline linkage code focuses on trips, so it works with
    confirmed trips instead of cleaned trips
  • change the code which looks up the sections and stops to use the cleaned_trip
    id instead of the trip id if it is a confirmed trip

TODO: change this if/when we have confirmed sections.

We now get back a geojson with the inferred label fields.

This completes the server changes outlined in
e-mission/e-mission-docs#674 (comment)

…ned trips

The changes were actually fairly minor
- add new `get_confirmed_timeline` and `get_confirmed_timeline_from_dt` which
  reads cleaned places but confirmed trips
- fortunately, the timeline linkage code focuses on trips, so it works with
  confirmed trips instead of cleaned trips
- change the code which looks up the sections and stops to use the cleaned_trip
  id instead of the trip id if it is a confirmed trip

TODO: change this if/when we have confirmed sections.

We now get back a geojson with the inferred label fields.

This completes the server changes outlined in
e-mission/e-mission-docs#674 (comment)
shankari added a commit to shankari/e-mission-phone that referenced this pull request Oct 7, 2021
Simplify the retrieval code by:
- pulling out duplicated code from the original call and the local fallback
    into a separate function (`readTripsAndUnprocessedInputs`)
- pulling out the processing of the trips and the manual input handling for
  future unification with the labeling code
- in the common case, only read inputs *after* the pipeline is complete.
    Due to e-mission/e-mission-server#837, the geojson
    trips should also now have any prior user inputs included in the trip.
    This plugs a huge performance issue for longitudinal data collection, because
    otherwise, we were reading the entire list of user inputs from the
    beginning of the install, which grows unboundedly.

    with this change, we will only read inputs from the timeline run point to
    now, which is bounded, and should be short depending on how frequently the
    timeline runs.

This addresses:
e-mission/e-mission-docs#674 (comment)
@shankari shankari merged commit ec710cb into e-mission:master Oct 14, 2021
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

Successfully merging this pull request may close these issues.

1 participant