Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 7.7 KB

readme.md

File metadata and controls

102 lines (81 loc) · 7.7 KB

arc-data-server

An http interface for exported json-files from BigPaua's Arc App.

The json-exports are accessed and staged through multiple layers:

  1. iCloud Directory (if available) with compressed export files
  2. Extracted json files for direct read (accepts only yyyy-mm-dd.json and yyyy-mm.json)

The intention is to provide a base for further analysis of the data.

Configuration

  • config/directories.json The paths to the directories are specified here.
    • layer1: iCloud directory where Arc stores its daily json.gz outputs
    • layer2: Local directory (defaults to arc-data/jsonexport), containing uncompressed json files
  • config/classifications.json Place classifications can be used to classify multiple places, for example determining workplaces and home locations (in order to analyse commutes). It references Arc places by the place.name attribute.

To separate standard config file and your own values, you can copy the files from <configfile>.json to <configfile>.mine.json. The .mine-file will be read preferrably. Their changes will not be tracked to github.

It is advised to set the setting layer2.autoLoadOnStart = true so the timeline files from Layer 2 are read from disk on server startup. If the setting is set to false, the files will be read on first data query and will delay response time.

Endpoints

File handling

  • /files/source/list Lists the compressed source files (Layer 1)
  • /files/extract Copies/extracts the files from Layer 1 (iCloud) to Layer 2 (local directory). Checks for duplicates in the iCloud directory on the way. /files/jsonexport/reload needs to be called afterwards to load the new files into memory.
  • /files/jsonexport/list Lists all the Arc export files (Layer 2)
  • /files/jsonexport/reload Reloads the json exports from disk into memory (e.g. after /files/extract has run)
  • /files/status Returns a status of Layer 1, Layer 2, and the classifications (last loading times, file count)

Place classifications

Data Display / Analysis

Filtering

You can optionally filter the queried timelineItems with the following URL-Parameters:

Commands

Installation

  • Install Node.js
  • cd to this directory
  • Install arc-data-server via npm install

Run in Devmode

  • npm run dev