Assessing the impact of the WHO Framework Convention on Tobacco Control on Prevalence of Tobacco Use and Cardiovascular Disease Mortality.
Download raw data from open access database:
Download and install Git Download and install Python
conda create -n [ENV_NAME] python=3.10
conda activate [ENV_NAME]
cd [CLONED_DIRECTORY]
pip install -r requirements.txt
- Buildup the src path
conda install conda-build
conda develop src
cd src
- Cleans the mortality dataframe by removing specified columns and filtering rows with missing values
from utility import select_df
- Prepares and filters cardiovascular disease data
- Groups data into specific age categories
from utility import preprocess_cvd, create_age_grouping
- Formats the tobacco data for merging
from utility import tobacco_layout_modified
- Merges CVD and tobacco data by country
from utility import tobacco_layout_modified
WHOFCTC_parties_date.py
preprocess_analysis.py
plot.py
df = pd.read_excel('~/test_file/19_ratified_country.xlsx')
plot_line_chart(df,column1='Male_Total_Percentage_of_Cause_Specific_Deaths_Out_Of_Total_Deaths' ,
column2='Female_Total_Percentage_of_Cause_Specific_Deaths_Out_Of_Total_Deaths',
save_path=[CLONED_DIRECTORY])
Example 2 of line chart between CVD Mortality and Prevalence of Tobacco Use in both Males and Females in Netherland
df = pd.read_excel('~/test_file/19_ratified_country.xlsx')
select_country = ['Netherlands']
male_tobacco = 'Male_Estimate_of_Current_Tobacco_Use_Prevalence_age_standardized_rate'
male_cvd = 'Male_Total_Percentage_of_Cause_Specific_Deaths_Out_Of_Total_Deaths'
female_tobacco = 'Female_Estimate_of_Current_Tobacco_Use_Prevalence_age_standardized_rate'
female_cvd = 'Female_Total_Percentage_of_Cause_Specific_Deaths_Out_Of_Total_Deaths'
save_path = "[CLONED_DIRECTORY]/[FIGURE_NAME].png"
relationship_cvd_tobacco(df, select_country=select_country,
variable_1=male_tobacco,
variable_2=male_cvd,
variable_3=female_tobacco,
variable_4=female_cvd, save_path=[CLONED_DIRECTORY]
)
Please download the dashboard.pbix file and open it in Power BI.