datopian / zen-of-data

Zen of Data (Engineering)
https://datopian.com
9 stars 1 forks source link

Five Finger Exercises - Practice in Doing Data Wrangling / Engineering #21

Open rufuspollock opened 4 years ago

rufuspollock commented 4 years ago

This is an issue for collecting initial data wrangling exercises for people to practice on.

Spending on Pharmaceuticals

NB: this exercise done see https://datahub.io/blog/pharmaceutical-drug-spending and https://github.com/datasets/awesome-data/issues/208

How much do we spend on pharmaceuticals - per country, over time? Also per capita and relative to other healthcare spending?

What are really expensive drugs?

https://data.oecd.org/healthres/pharmaceutical-spending.htm

Part I

But ... this does not have total.

To get that we'd need to multiple up e.g. spending per capita x population.

Part II

Part III

SELECT year, pop.population * pharma.spending_per_capita FROM ... JOIN ...

year, country, spendpercap

---

year, country, population

Document this process. Take screenshots. Imagine you were writing this up ...

Part III:

Building a "Data Package-ified" API for World Bank and OECD

For a world bank dataset:

For an OECD dataset: