-
Notifications
You must be signed in to change notification settings - Fork 3
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
Serialize JSON in the trips table #69
Comments
Sure, I can test this once the feature is on the main branch. |
The feature is in main now There is a new release a new basic docker image I still haven't updated the crontab |
This fixes asiripanich#69 It basically changes the rendering for the inferred trips table to JSON stringify the array, similar to asiripanich@eb7921f1 This change works (see screenshots). However, it has some hacks that should be cleaned up by somebody with more R knowledge than me. - Multiple copies of `datatable_options` The current codebase has two identical copies of `datatable_options` https://github.com/asiripanich/emdash/blob/5334c9229febaddaa234a3d1adc62f8f90547a90/R/app_server.R#L167 and https://github.com/asiripanich/emdash/blob/5334c9229febaddaa234a3d1adc62f8f90547a90/R/app_server.R#L195 To be consistent with the existing codebase, I have created a third copy for the trips object. In the long-term, we need to unify all of these to ensure DRY - Hardcoded column for `inferred_trips` The `inferred_trips` column number is currently hard-coded to 5. This is because, due to removed columns before display, ``` inferred_label_index <- which(names(data_geogr$trips) == "inferred_labels") ``` returns 17. We need to find the index in the list of _displayed_ columns, but I don't understand R well enough to understand where and how to make that change. @asiripanich, could you clean up the hacks, or do you want to merge first?
…data_sf` argument. This change is required to remove `inferred_label` (see #69) from the map data which is a spatial feature object.
As part of the auto-labeling functionality, we added the set of automatically inferred labels to each confirmed trip object. These labels are a JSON dict
[{labels: {mode_confirm: X, replace_confirm: Y}, p: <probability>}]
, similar toThese show up automatically in the data table, but because this is a JSON array, they show up as
[(object Object), (object Object)]
(see screenshot). Would it be possible toJSON.serialize
this field so the deployer can get a sense of what the trip might be even if the user hasn't labeled it? I think @allenmichael099 had an example of applying a javascript transform to a column (for the bike checkinout table).The text was updated successfully, but these errors were encountered: