<commit_before># Shimmer [![Build Status](https://travis-ci.org/openmhealth/shimmer.svg?branch=master)](https://travis-ci.org/openmhealth/shimmer)

Shimmer is an application that makes it easy to pull health data from popular third-party APIs like Runkeeper and Fitbit.
It converts that data into an [Open mHealth](http://www.openmhealth.org) compliant format, letting your application work with clean and clinically meaningful data.   

We currently support the following APIs

* [Fitbit](https://www.fitbit.com/)
* [Google Fit](https://developers.google.com/fit/?hl=en)
* [Jawbone UP](https://jawbone.com/up)
* [Misfit](http://misfit.com/)
* [RunKeeper](https://runkeeper.com/index)
* [Withings](http://www.withings.com/)
* [iHealth](http://www.ihealthlabs.com/)

And the following APIs are in the works

* [Moves](https://www.moves-app.com/)
* [Strava](https://www.strava.com/)
* [FatSecret](https://www.fatsecret.com/)
* [Ginsberg](https://www.ginsberg.io/)

This README should have everything you need to get started. If you have any questions, feel free to [open an issue](https://github.com/openmhealth/shimmer/issues), [email us](mailto://<EMAIL>), [post on our form](https://groups.google.com/forum/#!forum/omh-developers), or [visit our website](http://www.openmhealth.org/documentation/#/data-providers/get-started).

## Contents
- [Overview](#overview)
	- [Shims](#shims)
	- [Resource server](#resource-server)
	- [Console](#console)
- [Installation](#installation)
	- [Option 1. Download and run Docker images](#option-1-download-and-run-docker-images)
	- [Option 2. Build the code and run it natively or in Docker](#option-2-build-the-code-and-run-it-natively-or-in-docker)
- [Setting up your credentials](#setting-up-your-credentials)
- [Authorizing access to a third-party user account](#authorizing-access-to-a-third-party-user-account)
	- [Authorize access from the console](#authorize-access-from-the-console)
	- [Authorize access programmatically](#authorize-access-programmatically)
- [Reading data](#reading-data)
	- [Read data using the console](#read-data-using-the-console)
	- [Read data programmatically](#read-data-programmatically)
- [Supported APIs and endpoints](#supported-apis-and-endpoints)
- [Contributing](#contributing)

## Overview 
Shimmer is made up of different components - individual shims, a resource server, and a console - which are each described below.

### Shims
A *shim* is a library that can communicate with a specific third-party API, e.g. Withings. It handles the process of authenticating with the API, requesting data from it, and mapping that data into an Open mHealth compliant data format. 

A shim generates *data points*, which are self-contained pieces of data that not only contain the health data of interest, but also include header information such as date of creation, acquisition provenance, and data source. This metadata helps describe the data and where it came from. The library is called a shim because such clean and clinically significant data in not provided natively by the third-party API.

### Resource server
The *resource server* exposes an API to retrieve data points. The server handles API requests by delegating them to the correct shim. As more and more shims are developed and added to the resource server, it becomes capable of providing data points from more and more third-party APIs. The resource server also manages third-party access tokens on behalf of shims.

### Console
The *console* provides a simple web interface that helps users interact with the resource server. It can set configuration parameters, trigger authentication flows, and request data using date pickers and drop downs.

## Installation

There are two ways to install Shimmer. 

1. You can download and run pre-built Docker images. 
1. You can build all the code from source and run it natively or in Docker.

### Option 1. Download and run Docker images
<commit_msg>Fixed typo<commit_after># Shimmer [![Build Status](https://travis-ci.org/openmhealth/shimmer.svg?branch=master)](https://travis-ci.org/openmhealth/shimmer)

Shimmer is an application that makes it easy to pull health data from popular third-party APIs like Runkeeper and Fitbit.
It converts that data into an [Open mHealth](http://www.openmhealth.org) compliant format, letting your application work with clean and clinically meaningful data.   

We currently support the following APIs

* [Fitbit](https://www.fitbit.com/)
* [Google Fit](https://developers.google.com/fit/?hl=en)
* [Jawbone UP](https://jawbone.com/up)
* [Misfit](http://misfit.com/)
* [RunKeeper](https://runkeeper.com/index)
* [Withings](http://www.withings.com/)
* [iHealth](http://www.ihealthlabs.com/)

And the following APIs are in the works

* [Moves](https://www.moves-app.com/)
* [Strava](https://www.strava.com/)
* [FatSecret](https://www.fatsecret.com/)
* [Ginsberg](https://www.ginsberg.io/)

This README should have everything you need to get started. If you have any questions, feel free to [open an issue](https://github.com/openmhealth/shimmer/issues), [email us](mailto://<EMAIL>), [post on our form](https://groups.google.com/forum/#!forum/omh-developers), or [visit our website](http://www.openmhealth.org/documentation/#/data-providers/get-started).

## Contents
- [Overview](#overview)
	- [Shims](#shims)
	- [Resource server](#resource-server)
	- [Console](#console)
- [Installation](#installation)
	- [Option 1. Download and run Docker images](#option-1-download-and-run-docker-images)
	- [Option 2. Build the code and run it natively or in Docker](#option-2-build-the-code-and-run-it-natively-or-in-docker)
- [Setting up your credentials](#setting-up-your-credentials)
- [Authorizing access to a third-party user account](#authorizing-access-to-a-third-party-user-account)
	- [Authorize access from the console](#authorize-access-from-the-console)
	- [Authorize access programmatically](#authorize-access-programmatically)
- [Reading data](#reading-data)
	- [Read data using the console](#read-data-using-the-console)
	- [Read data programmatically](#read-data-programmatically)
- [Supported APIs and endpoints](#supported-apis-and-endpoints)
- [Contributing](#contributing)

## Overview 
Shimmer is made up of different components - individual shims, a resource server, and a console - which are each described below.

### Shims
A *shim* is a library that can communicate with a specific third-party API, e.g. Withings. It handles the process of authenticating with the API, requesting data from it, and mapping that data into an Open mHealth compliant data format. 

A shim generates *data points*, which are self-contained pieces of data that not only contain the health data of interest, but also include header information such as date of creation, acquisition provenance, and data source. This metadata helps describe the data and where it came from. The library is called a shim because such clean and clinically significant data is not provided natively by the third-party API.

### Resource server
The *resource server* exposes an API to retrieve data points. The server handles API requests by delegating them to the correct shim. As more and more shims are developed and added to the resource server, it becomes capable of providing data points from more and more third-party APIs. The resource server also manages third-party access tokens on behalf of shims.

### Console
The *console* provides a simple web interface that helps users interact with the resource server. It can set configuration parameters, trigger authentication flows, and request data using date pickers and drop downs.

## Installation

There are two ways to install Shimmer. 

1. You can download and run pre-built Docker images. 
1. You can build all the code from source and run it natively or in Docker.

### Option 1. Download and run Docker images

{'fraction_non_alphanumeric': 0.10971108565610284, 'fraction_numerical': 0.0017818505791014382, 'mean_word_length': 4.7190684133915575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 24, 'lorem ipsum': 0, 'www.': 18, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '153692', 'n_tokens_mistral': 2289, 'n_tokens_neox': 2164, 'n_words': 851}