Skip to content

Learning tool on location data privacy, that reflects to users, what conclusions can be drawn from their location histories. This is part of the SIMPORT project.

License

Notifications You must be signed in to change notification settings

sitcomlab/simport-learning-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SIMPORT Learning App Β·



Learning tool on location data privacy, that reflects to users, what conclusions can be drawn from their location histories. It is used to record location data over a timespan and analyzing that locally to create inferences - e.g. about where the user might work or live. The app works completely autonomously and doesn't need any internet connection whatsoever. This is part of the SIMPORT project.

Status: prototyping πŸ› οΈ

Contents

App Usage

It is intended that one records her/his location data of the course of multiple days/weeks/months using this app. By collecting and analyzing the recorded location history (locally), it is tried to infer information about the user - such as her/his home and work location. Users should be notified, if such inferences can be made in order to reflect to them, what conclusions can be drawn using their location histories. Furthermore recorded trajectories can be exported, external trajectories can be imported and examined using the app as well.

Development

This is an hybrid Ionic app, using Capacitator (a drop-in replacement for Cordova) to access native APIs and Angular for UI.

Setup

Quickstart (Tools)


For basic UI development you need node.js (version 16.14) installed - further information can be found here. As an IDE you can basically choose by your own taste. Our recommendation is to use Visual Studio Code with the code formatter Prettier using these settings. This guarantees consistent and uniform code.

Clone the repository
git clone [email protected]:sitcomlab/simport-learning-app
Within the repository, install the ionic CLI, which is used for most management tasks, as well as the frontend dependencies
cd simport-learning-app
npm install -g @ionic/cli # install the ionic CLI
npm install               # install the frontend dependencies

Android

  • Install the latest version of Android Studio
    • on Linux, install to /opt/android-studio/, as this path is configured in capacitor.config.json
  • Download an up-to-date Android SDK (e.g. SDK 29)
    • Within Android Studio: Tools β†’ SDK Manager)
  • Optional: Setup emulators as needed for testing the app on a computer
    • Within Android Studio: Tools β†’ AVD Manager)
  • Make sure to run Sync Project with Gradle Files before building when dependencies have changed
  • Built artifact will be ./android/app/build/outputs/apk/app-debug.apk

iOS

πŸ“ This only works on macOS.

  • Install the latest version of XCode
  • Optional: Setup emulators as needed for testing the app on a computer
    • Within XCode: Window β†’ Devices and Simulators β†’ Simulators)
  • For running on physical devices, XCode requires that you’ve connected a Team to the project β†’ more information here
  • Make sure to run pod install in your terminal before building when dependencies have changed

πŸ“ With Capacitor, the native build projects are supposed to be checked into version control. This avoids duplicate config and simplifies writing native code without creating plugins.

Build and Run

Hot Reloading Server (β†’ see here)
ionic serve
Build frontend to ./www/ (β†’ see here)
ionic build
Prepare app builds & open IDE (β†’ see here)
Android
ionic cap update
ionic cap build android
iOS
ionic cap update
ionic cap build ios
Sync app builds (β†’ see here)
Android
ionic cap sync android
iOS
ionic cap sync ios

Version Control

Using Github this project is obviously versioned using git. The branch develop is used as the main branch, while actual developing of new features is done on individual feature branches. These features branches are using the following naming scheme:

feature/<feature name>

When finished (including review) developing a feature, the feature branches are merged develop. For your commits, please use the following commit message if applicable:

#<issue number>: <commit message>

Releases are automatically triggered on push to release-beta using GitHub Actions and distributed to a closed group of beta-testers using Firebase.

Inferences

A core-component of this learning app is the inference-algorithm. By analyzing the recorded location history, it is tried to infer information about the user with this algorightm - information such as her/his home and work location. The corresponding procedure on how to process user-trajectories in order to generate those inferences is explained with a brief flow-diagram. Furthermore a light class-diagramm that focuses on the inference-components gives an overview how the parts are connected and come together.

Test

Apart from basic component testing (default Angular), the testing framework is used to validate the inference algorithms. By running the tests via npm run test a few simple trajectories are generated, that are designed to cover some border cases - e.g. variation in location frequency and accuracy. The creation of this test data is based on a few location files located here. The generated test data is based upon the following location pattern, which result from the assumptions of a typical work day (9 to 5).

Activity Start datetime End datetime
Dwell at home 2021-02-23T18:00:00Z 2021-02-24T08:45:00Z
Ride to work 2021-02-24T08:45:00Z 2021-02-24T09:00:00Z
Dwell at work 2021-02-24T09:00:00Z 2021-02-24T17:00:00Z
Ride home 2021-02-24T17:00:00Z 2021-02-24T17:15:00Z
Dwell at home 2021-02-24T17:15:00Z 2021-02-25T08:45:00Z

Currently the following test cases are created, analyzed and checked against the given expected inferences:

Trajectory Description Expected inferences
Empty Empty trajectory, contains no locations. None
Mobile only Trajectory, that only contains mobile data. Therefore it contains only the ride to and from work, but no stationary location for dwelling at home or work. None
Simple home and work Simple trajectory that simulates a usual day of work. The location data contains the assumed movement data stated above with typical point clouds at the dwelling locations. Without any special constraints. Home/Work
Spatially dense home and work Similar to simple home/work, but stationary data (point clouds for dwelling time) is way more spatially dense, which simulates a lot of movement/higher update frequency during recording. Home/Work
Temporally sparse home and work Similar to simple home/work, but stationary data (point clouds for dwelling time) is way more temporally sparse, which simulates a less movement/lower update frequency during recording. Home/Work

These tests are automatically executed when pushing to the development branch. The last test-result can be seen at the top of this page.

License

SIMPORT Learning App
Copyright (c) 2022 Sitcom Lab

Further information

About

Learning tool on location data privacy, that reflects to users, what conclusions can be drawn from their location histories. This is part of the SIMPORT project.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published