Skip to content
 
 

Repository files navigation

The Diversity and Consistency of What and When People Eat

This repository contains materials and Jupyter notebooks that demonstrate the analytical procedures used to generate figures and findings for the paper. The datasets used for analysis come from food text parsing of food logs from users of the myCircadianClock smartphone application. A small sample dataset is included to illustrate how the data is structured. An iPython notebook is provided to demonstrate how the food parser works.

🔧 Setting Up the Environment

To run the manuscript notebooks that generate figure drafts and analysis for the paper, you need Python 3.9 or later with the following required packages: pandas, numpy, seaborn, matplotlib, scipy, nltk, setuptools, tqdm, jupyter, wordsegment, tabulate, scikit_posthocs. All analysis was done using the package versions specified in the included .yml file. Code was tested on a laptop running Windows 11.

📥 Option 1: Install Python Manually

Download Python from the official website: python.org. Then install the necessary packages in your terminal by running the following command.

pip install pandas numpy seaborn matplotlib scipy nltk setuptools tqdm jupyter wordsegment tabulate scikit_posthocs

🐍 Option 2: Use Conda (Recommended)

Using Anaconda helps manage dependencies and creates an isolated environment for the project.

📌 Step 1: Install Anaconda

Anaconda can be installed from their website: https://www.anaconda.com/download

📌 Step 2: Open Anaconda Prompt and Create the Conda Environment

You can set up the environment in one step using the provided environment file. This environment file contains the exact versions of all Python packages used to generate analysis.:

conda env create -f mCC_paper.yml

Then, activate the environment:

conda activate mCC_paper

⚠️ Alternative Setup (If the .yml file does not work)

If you run into issues with mCC_paper.yml, you can manually create the environment with:

conda create -n mCC_paper python=3.11 pandas numpy seaborn matplotlib scipy nltk setuptools tqdm jupyter
conda activate mCC_paper
pip install wordsegment tabulate scikit_posthocs

🚀 Running the Jupyter Notebook

After setting up the environment, you can start Jupyter Notebook with:

jupyter notebook

Ensure you are working inside the Conda environment before running Jupyter Notebook.

The total installation and setup time for this Python environment should be a few minutes. The demo food parsing notebook should also produce output in under a few minutes.

Manuscript Notebooks and Data Availability

The provided data is a randomized subset of logs meant to demonstrate the data processing pipeline used to generate all data behind the findings in this paper. The included manuscript notebooks rely on the total dataset and do not produce equivalent output with just the sample data. They are provided in full, showing the output of the code run on the entire dataset.

About

Materials and data for analysis of myCircadianClock data.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages