Nuclear bombs per continent
Since WWII, a number of nations have been detonating nuclear bombs for military research. A tally of bombs detonated per nation has been calculated from the Nuclear Explosion DataBase (NEDB) and provided as nuke_df
. You are interested in finding out how many bombs have been detonated by nations grouped per continent. To achieve this goal, nuke_df
will be joined to country_to_continent_df
which is a mapping of nation to continent. You will need to overwrite missing values with zeros so that you can create a nice plot.
The dplyr
and ggplot2
packages have been pre-loaded for you.
Side note 1: Bombs detonated by the Soviet Union were attributed to the Russian Federation.
Side note 2: The Russian Federation is solely mapped to Europe for simplicity.
Diese Übung ist Teil des Kurses
Reshaping Data with tidyr
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
country_to_continent_df %>%
left_join(nuke_df, by = "country_code") %>%
# Impute the missing values in the n_bombs column with 0L
___