Created
November 24, 2017 21:18
-
-
Save jsta/b319800a18bdd691a0fe3d5e13bb0659 to your computer and use it in GitHub Desktop.
How many times over can Loch Ness hold the volume of the world population?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(wikilake) | |
| library(wbstats) | |
| library(dplyr) | |
| dt <- lake_wiki("Loch Ness") | |
| loch_volume <- as.numeric(substring(dt$`Water volume`, 0, 3)) | |
| pop_data <- wb(indicator = "SP.POP.TOTL", startdate = 2016, enddate = 2017) | |
| pop_data <- filter(pop_data, country == "World") | |
| # https://www.cdc.gov/nchs/fastats/body-measurements.htm | |
| men_volume <- 175.768 * (101.5 / (2 * pi))^2 * pi | |
| women_volume <- 161.798 * (96.9 / (2 * pi))^2 * pi | |
| person_volume <- ((pop_data$value / 2) * men_volume) + ((pop_data$value / 2) * women_volume) | |
| person_volume <- person_volume * 1e-15 # cm3 to km3 | |
| loch_volume / person_volume |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
7.6 times