Coder Social home page Coder Social logo

sitcomlab / simport-learning-app Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 6.0 8.13 MB

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.

Home Page: https://www.simport.net

License: MIT License

Java 0.31% JavaScript 0.47% TypeScript 86.35% HTML 8.68% Swift 0.88% Ruby 0.42% SCSS 2.75% R 0.14% Shell 0.01%
location-privacy ionic capacitor

simport-learning-app's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.