asiripanich / emdash

An e-mission deployer's dashboard. See https://github.com/e-mission/e-mission-docs.
https://emdash.amarin.dev
Other
6 stars 3 forks source link

Add an option to anonymize the location information #11

Closed shankari closed 4 years ago

shankari commented 4 years ago

Our current users have a request to remove the linkage between the trajectory information in the map view and the uuid.

They don't collect home information in their pre or post surveys, so removing the link between the UUID and the trajectories will ensure that they cannot reidentify participants through their the home and work locations. They can potentially determine the home and work locations of people who have installed the app, but they cannot link this information with the survey data.

This may or may not be a frequent use case, so I have exposed this via a startup option.

Use :run_app(mongo_url = 'mongodb://host.docker.internal:27017', anon_locations=TRUE) if you wish to anonymize the locations.

Testing done:

shankari commented 4 years ago

Results on test data:

Without anon With anon
Screen Shot 2020-11-02 at 12 46 47 PM Screen Shot 2020-11-02 at 12 47 11 PM
shankari commented 4 years ago

The CI seems to be failing with "Error: Error: R CMD check found WARNINGs" But the warnings are different on the different platforms and don't seem to be related to my changes.

asiripanich commented 4 years ago

The CI seems to be failing with "Error: Error: R CMD check found WARNINGs" But the warnings are different on the different platforms and don't seem to be related to my changes.

checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object 'run_app': run_app Code: function(mongo_url, anon_locations, ...) Docs: function(mongo_url, ...) Argument names in code not in docs: anon_locations Mismatches in argument names: Position: 2 Code: anon_locations Docs: ...

You forgot to add doc for anon_locations that is the warning was about.

asiripanich commented 4 years ago

If you are happy with the changes I have made I'm happy to merge this PR.

shankari commented 4 years ago

Looks great. I wasn't sure how R deals with memory management, so did the simplest solution that I could think of. But this is clearly better!