Skip to main content

This project analyzes data from a few input sources.

Project description

Public data food analysis

Install

pip install public_data_food_analysis_3

For data analysis on the Columbia study

import public_data_food_analysis_3.columbia as pdfac
import pandas as pd
df = pdfac.make_table(pdfac.read_logging_data('data/col_test_data')\
                      , pd.read_excel('data/col_test_data/toy_data_17May2021.xlsx'))
Participant yrt1999 didn't log any food items in the following day(s):
2021-05-18
Participant yrt2000 didn't log any food items in the following day(s):
2021-05-12
2021-05-13
2021-05-14
df
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
mCC_ID Participant_Study_ID Study Phase Intervention group (TRE or HABIT) Start_Day End_day Eating_Window_Start Eating_Window_End phase_duration caloric_entries ... logging_day_counts %_logging_day_counts good_logging_days %_good_logging_days good_window_days %_good_window_days outside_window_days %_outside_window_days adherent_days %_adherent_days
0 yrt1999 2 S-REM TRE 2021-05-12 2021-05-14 00:00:00 23:59:00 3 days 7 ... 3 1.00 2.0 0.666667 3 1.00 0 0.0 2 0.666667
1 yrt1999 2 T3-INT TRE 2021-05-15 2021-05-18 08:00:00 18:00:00 4 days 8 ... 3 0.75 2.0 0.500000 1 0.25 2 0.5 1 0.250000
2 yrt2000 3 T3-INT TRE 2021-05-12 2021-05-14 08:00:00 16:00:00 3 days 0 ... 0 0.00 0.0 0.000000 0 0.00 0 0.0 0 0.000000

3 rows × 26 columns

df.iloc[0]
mCC_ID                                           yrt1999
Participant_Study_ID                                   2
Study Phase                                        S-REM
Intervention group (TRE or HABIT)                    TRE
Start_Day                            2021-05-12 00:00:00
End_day                              2021-05-14 00:00:00
Eating_Window_Start                             00:00:00
Eating_Window_End                               23:59:00
phase_duration                           3 days 00:00:00
caloric_entries                                        7
mean_daily_eating_window                           13.75
std_daily_eating_window                        11.986972
earliest_entry                                       4.5
2.5%                                              4.5375
97.5%                                            27.5625
duration mid 95%                                  23.025
logging_day_counts                                     3
%_logging_day_counts                                 1.0
good_logging_days                                    2.0
%_good_logging_days                             0.666667
good_window_days                                       3
%_good_window_days                                   1.0
outside_window_days                                    0
%_outside_window_days                                0.0
adherent_days                                          2
%_adherent_days                                 0.666667
Name: 0, dtype: object
df.iloc[1]
mCC_ID                                           yrt1999
Participant_Study_ID                                   2
Study Phase                                       T3-INT
Intervention group (TRE or HABIT)                    TRE
Start_Day                            2021-05-15 00:00:00
End_day                              2021-05-18 00:00:00
Eating_Window_Start                             08:00:00
Eating_Window_End                               18:00:00
phase_duration                           4 days 00:00:00
caloric_entries                                        8
mean_daily_eating_window                        8.666667
std_daily_eating_window                         8.504901
earliest_entry                                       7.5
2.5%                                                 7.7
97.5%                                               23.9
duration mid 95%                                    16.2
logging_day_counts                                     3
%_logging_day_counts                                0.75
good_logging_days                                    2.0
%_good_logging_days                                  0.5
good_window_days                                       1
%_good_window_days                                  0.25
outside_window_days                                    2
%_outside_window_days                                0.5
adherent_days                                          1
%_adherent_days                                     0.25
Name: 1, dtype: object

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

public_data_food_analysis_3-0.2.2.4.tar.gz (106.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

public_data_food_analysis_3-0.2.2.4-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file public_data_food_analysis_3-0.2.2.4.tar.gz.

File metadata

  • Download URL: public_data_food_analysis_3-0.2.2.4.tar.gz
  • Upload date:
  • Size: 106.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for public_data_food_analysis_3-0.2.2.4.tar.gz
Algorithm Hash digest
SHA256 a41519f384f329fafc8367ca816f0452ff3d7f0aef084520a4d3963de4ad7290
MD5 9a69963f21b7b19093b1d58f1c7bb04b
BLAKE2b-256 c044065a8010a98e0dcbcba94931f37243a97fe144c5d5657023ed1df9c4c91c

See more details on using hashes here.

File details

Details for the file public_data_food_analysis_3-0.2.2.4-py3-none-any.whl.

File metadata

  • Download URL: public_data_food_analysis_3-0.2.2.4-py3-none-any.whl
  • Upload date:
  • Size: 106.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for public_data_food_analysis_3-0.2.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6d9af4b233ce183d62948df60305b24cf3b476181e1fb7c248aabe5075408d
MD5 e0203a9e2574fb348765d8536369750f
BLAKE2b-256 4efa8fea019f0e3fde6a0341e6e9b9b9409abfd38e2343bcf14144227b5261b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page