<commit_before>[![Join the chat at https://gitter.im/kbase/data_api](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kbase/data_api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# data_api

Towards a unified data api for KBase

This repository is configured to use TravisCI

Source code is under lib/ (Python)
[![Build Status](https://travis-ci.org/kbase/data_api.svg?branch=master)](https://travis-ci.org/kbase/data_api)
[![Coverage Status](https://coveralls.io/repos/kbase/data_api/badge.svg?branch=master)](https://coveralls.io/r/kbase/data_api?branch=master)

#quickstart instructions

1. install virtualenv using your local installer
e.g., apt-get install virtualenv

2. create a virtualenv environment to install the source to 
e.g., virtualenv venv

3. activate the virtualenv
e.g., source venv/bin/activate

4. pip install this package to your virtualenv
e.g., pip install data_api/

5. set your KB_AUTH_TOKEN to your token string
e.g., in a KBase environment use kbase-login to retrieve a token, check your .kbase_config

6. run nosetests doekbase.data_api to verify your install is working

You can run pip install data_api/ --upgrade if you have edited files
locally and want to test them out without having to reset the virtualenv.

You can get out of the virtualenv environment with "deactivate".

# Examples

Example IPython (Jupyter) notebooks are in examples/notebooks. To run, follow installation instructions above, then

    ipython notebook examples/notebooks/data_api-display.ipynb 
    <commit_msg>switched coveralls badge to codecov.io badge<commit_after>[![Join the chat at https://gitter.im/kbase/data_api](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kbase/data_api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# data_api

Towards a unified data api for KBase

This repository is configured to use TravisCI

Source code is under lib/ (Python)
[![Build Status](https://travis-ci.org/kbase/data_api.svg?branch=master)](https://travis-ci.org/kbase/data_api)
[![Coverage Status](http://codecov.io/github/kbase/data_api/coverage.svg?branch=master)](http://codecov.io/github/kbase/data_api?branch=master)

#quickstart instructions

1. install virtualenv using your local installer
e.g., apt-get install virtualenv

2. create a virtualenv environment to install the source to 
e.g., virtualenv venv

3. activate the virtualenv
e.g., source venv/bin/activate

4. pip install this package to your virtualenv
e.g., pip install data_api/

5. set your KB_AUTH_TOKEN to your token string
e.g., in a KBase environment use kbase-login to retrieve a token, check your .kbase_config

6. run nosetests doekbase.data_api to verify your install is working

You can run pip install data_api/ --upgrade if you have edited files
locally and want to test them out without having to reset the virtualenv.

You can get out of the virtualenv environment with "deactivate".

# Examples

Example IPython (Jupyter) notebooks are in examples/notebooks. To run, follow installation instructions above, then

    ipython notebook examples/notebooks/data_api-display.ipynb 
    
{'fraction_non_alphanumeric': 0.0939873417721519, 'fraction_numerical': 0.005063291139240506, 'mean_word_length': 4.842883548983364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1128574', 'n_tokens_mistral': 1032, 'n_tokens_neox': 1004, 'n_words': 325}