smoking icon

Smoking Python Library

From the CORGIS Dataset Project

By Sam Donald
Version 1.0.0, created 9/27/2022
Tags: global health, smoking

Overview

Smoking trends broken down by gender and country since 1980

https://github.com/owid/owid-datasets/tree/master/datasets/Smoking%20prevalence%20and%20cigarette%20consumption%20(IHME%2C%20GHDx%20(2012))

Explore Structure

Each row represents Yearly report of smoking metrics.

Index Type Example Value
0 dict { }
1 dict (same structure)
2 dict (same structure)
... ... ...
Key Type Example Value Description
"Country" str "Afghanistan" Country
"Year" int 1980 Year
"Data" dict { }
Key Type Example Value Description
"Daily cigarettes" float 5.6999998 Average amount of cigarettes smoked per day by smokers
"Percentage" dict { }
"Smokers" dict { }
Key Type Example Value Description
"Male" float 10.4 Percentage of the male population who are smokers
"Female" float 18.4 Percentage of the female population who are smokers
"Total" float 2.4000001 Percentage of the total population who are smokers
Key Type Example Value Description
"Total" int 733520 Total number smokers
"Female" int 81707 Total number of female smokers
"Male" int 651813 Total number of male smokers

Downloads

Download all of the following files.

  1. smoking.py
  2. smoking.data

Usage

import smoking
report = smoking.get_report()

Documentation

get_report()
Returns a list of dictionaries representing Report.