Package: tidepool-data-science-project
Tidepool API - Data Science Python Bindings-- Project Status: Active-- Project Disclaimer: This work is for DevelopmentProject ObjectiveThe purpose of this project is toExpose in an organized way the Tidepool API in PythonSupport data science tasks and projects that use Tidepool dataProject DescriptionThis project is a large refactor of Data Science code integrating with and using the
Tidepool API.Getting Started with this projectTidepool APISeetidepool_api.pyfor class representing the api. Code example of downloading health data for a user:from data_science_tidepool_api_python.makedata.tidepool_api import TidepoolAPI

tp_api = TidepoolAPI(username, password)
tp_api.login()
user_data = tp_api.get_user_event_data()
tp_api.logout()Projects using the API:The Tidepool Big Data Donation Project data science code lives inprojects/tbddp.
The Tidepool Period Project data science code lives inprojects/tbddpContributing GuideAll are welcome to contribute to this project.Naming convention for notebooks is[short_description]-[initials]-[date_created]-[version],
e.g.initial_data_exploration-jqp-2020-04-25-v-0-1-0.ipynb.
A short_delimited description, the creator's initials, date of creation, and a version number,Naming convention for data files, figures, and tables is[PHI (if applicable)]-[short_description]-[date created or downloaded]-[code_version],
e.g.raw_project_data_from_mnist-2020-04-25-v-0-1-0.csv,
orproject_data_figure-2020-04-25-v-0-1-0.png.NOTE: PHI data is never stored in github and the .gitignore file includes this requirement as well.Tidepool Data Science TeamName (with github link)Tidepool SlackCameron Summers@Cameron SummersTechnologies (Update this list)Python (99% of the time)Anacondafor our virtual environmentsPandas for working with data (99% of the time)Google Colab for sharing examplesPytest for testingTravis for continuous integration testingBlack for code styleFlake8 for lintingSphinxfor documentationNumpy docstring formatpre-commit for githooksGetting Started with the Conda Virtual EnvironmentInstallMiniconda. CAUTION for python virtual env users: Anaconda will automatically update your .bash_profile
so that conda is launched automatically when you open a terminal. You can deactivate with the commandconda deactivateor you can edit your bash_profile.If you are new toAnacondacheck out their getting started docs.If you want the pre-commit githooks to install automatically, then following thesedirections.Clone this repo (for help see thistutorial).In a terminal, navigate to the directory where you cloned this repo.Runconda update -n base -c defaults condato update to the latest version of condaRunconda env create -f conda-environment.yml --name [input-your-env-name-here]. This will download all of the package dependencies
and install them in a conda (python) virtual environment. (Insert your conda env name in the brackets. Do not include the brackets)Runconda env listto get a list of conda environments and select the environment
that was created from the environmental.yml file (hint: environment name is at the top of the file)Runconda activate <conda-env-name>orsource activate <conda-env-name>to start the environment.If you did not setup your global git-template to automatically install the pre-commit githooks, then
runpre-commit installto enable the githooks.Rundeactivateto stop the environment.Maintaining Compatability with venv and virtualenvThis may seem counterintuitive, but when you are loading new packages into your conda virtual environment,
load them in usingpip, and export your environment usingpip-chill > requirements.txt.
We take this approach to make our code compatible with people that prefer to use venv or virtualenv.
This may also make it easier to convert existing packages into pypi packages. We only install packages directly
in conda using the conda-environment.yml file when packages are not available via pip (e.g., R and plotly-orca).