All proceeds from Medium will go to Justetc Social Services ( non-profit). Justetc Social Services provides services in the Training and Education Areas.

Applied to a Tracking and Estimation Project

#!/usr/bin/env python
# coding: utf-8

import os;
import glob;
import pandas as pd;
data_folder = './'
os.chdir(data_folder)

Find all csv file names with path in all current level sub-directories

all_filenames = list();

from pathlib import Path
for path in Path('./').rglob('truthsAndTracksByMonteByTimeGlobal.csv'):
# print(path.name);
# print(path.parent);
parent = path.parent;
name = path.name;
all_filenames.append(str(parent) + '/' + str(name) );

all_filenames = sorted(list(all_filenames));
all_filenames[:10]
['738020.4493/truthsandtracksbymontebytimeglobal.csv',
'738023.8086/truthsandtracksbymontebytimeglobal.csv'…

Reusing the code from Exploration Phase. The code and comments will be updated as proceeded. The code and comments might not be perfect until finalized

# PCA section, Correlation, Heatmaps, can be seen to be the most important parts
# Might have to adjust/improve my conclusions from the plots in future work
# Target variable ACR i.e. Albumin Creatinine Ratio
# Other Probable targets: Kidney failed, Systolic/Diastolic Pressure

# Tried the following Target variables previously that might…

Reusing the code from Exploration Phase. The code and comments will be updated as proceeded. The code and comments might not be perfect until finalized

# PCA section, Correlation, Heatmaps, can be seen to be the most important parts
# Might have to adjust/improve my conclusions from the plots in future work
# Target variable ACR i.e. Albumin Creatinine Ratio
# Other Probable targets: Kidney failed, Systolic/Diastolic Pressure

# Tried the following Target variables previously that might…
from __future__ import print_function
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets

import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np

import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

# code from xport library example or from ipwidget code examples - configuration code
# for geo maps
# !conda install basemap
import conda
import…
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')

pd.set_option('display.max_rows', 20)
pd.set_option('display.max_columns', 500)
# pd.set_option('display.width', 1000)
data_folder = './data-for-code/'

# import the CSV as a pandas dataframe
df = pd.read_csv( data_folder + 'food_subgroup_intake_and_average_survival.csv')


# show the first five rows
df.shape
df.head(5)

The code shows the relation between food groups and CKD mortality Food Group concept is used as are used by CDC/USDA/USRDS

Dietray Guidelines are reviewed every couple of years and published https://health.gov/our-work/food-nutrition/previous-dietary-guidelines/2015

A background database was there where some data pre-processing and adjustments were made

Food Groups Survey Data and…

The code shows the relation between food sub groups and CKD mortality Food Sub Group concept is used as are used by CDC/USDA/USRDS

Dietray Guidelines are reviewed every couple of years and published https://health.gov/our-work/food-nutrition/previous-dietary-guidelines/2015

A background database was there where some data pre-processing and adjustments were made

Food Groups/Subgroups Survey…

Explore the CKD Patient Survival Data such as 90 day survival

Related Datasets: Check some of the output from code to get an idea on how the dataset looks like

I will utilize multiple related datasets

All chapters of the 2018 USRDS ADR are accessible at this webpage:
https://www.usrds.org/2018/view/Default.aspx

Primary Dataset: Patient Characteristics i.e diagnostic results for Kidney/CKD/Renal patients https://www.usrds.org/2018/ref/ESRD_Ref_C_PatientChars_2018.xlsx From: https://www.usrds.org/reference.aspx

Other Closely Related Datasets: Chronic KIdney Disease…

xport module need to be installed.

from __future__ import print_function
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
import os

out_folder = './nhanes_output_data/'
data_folder = './nhanes_input_data/'
diet_files = os.listdir(data_folder)
diet_files[:4]
['2015-2016-food-codes-DRXFCD_I.XPT',
'2015-2016-support-food-codes-DRXFCD_I.XPT']
import xport
#import pandas as pd
f = open(data_folder + 'data_format_DR1IFF_I.txt', 'r')
columns = ''
for line…
from __future__ import print_function
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets

import os

data_folder = './csvdietfiles/'
diet_files = os.listdir(data_folder)
diet_files
['dairy_intakes.txt_Female.csv',
'dairy_intakes.txt_Male.csv',
'dark_green_vegetables_subgroup.txt_Female.csv',
'dark_green_vegetables_subgroup.txt_Male.csv',
'fruits_intake.txt_Female.csv',
'fruits_intake.txt_Male.csv',
'grains_intake.txt_Female.csv',
'grains_intake.txt_Male.csv',
'legumes_beans_and_peas_subgroup.txt_Female.csv',
'legumes_beans_and_peas_subgroup.txt_Male.csv',
'meat_poultry_and_eggs_subgroup.txt_Female.csv',
'meat_poultry_and_eggs_subgroup.txt_Male.csv',
'nuts_seeds_and_soy_products_subgroup.txt_Female.csv',
'nuts_seeds_and_soy_products_subgroup.txt_Male.csv',
'other_vegetables_subgroup.txt_Female.csv',
'other_vegetables_subgroup.txt_Male.csv',
'protein_intake.txt_Female.csv',
'protein_intake.txt_Male.csv',
'red_and_orange_vegetables_subgroup.txt_Female.csv',
'red_and_orange_vegetables_subgroup.txt_Male.csv',
'seafood_subgroup.txt_Female.csv',
'seafood_subgroup.txt_Male.csv',
'starchy_vegetables_subgroup.txt_Female.csv',
'starchy_vegetables_subgroup.txt_Male.csv',
'vegetable_intake.txt_Female.csv',
'vegetable_intake.txt_Male.csv']

Justetc Social Services (non-profit)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store