Max mission duration every year

Batool Almarzouq

24/02/2021

What is TidyTuesday?

A weekly social data project in R

A weekly data project aimed at the R ecosystem. As this project was borne out of the R4DS Online Learning Community and the R for Data Science textbook, an emphasis was placed on understanding how to summarize and arrange data to make meaningful charts with ggplot2, tidyr, dplyr, and other tools in the tidyverse ecosystem.

Join the R4DS Online Learning Community in the weekly #TidyTuesday event! Every week we post a raw dataset, a chart or article related to that dataset, and ask you to explore the data. While the dataset will be “tamed”, it will not always be tidy! As such you might need to apply various R for Data Science techniques to wrangle the data into a true tidy format. The goal of TidyTuesday is to apply your R skills, get feedback, explore other’s work, and connect with the greater #RStats community! As such we encourage everyone of all skills to participate!

An example of a contribution in the TidyTuesday

Load Libraries

library(tidyverse)
library(ggthemes)
library(grid)

Import data

astronauts <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-14/astronauts.csv')
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   .default = col_double(),
##   name = col_character(),
##   original_name = col_character(),
##   sex = col_character(),
##   nationality = col_character(),
##   military_civilian = col_character(),
##   selection = col_character(),
##   occupation = col_character(),
##   mission_title = col_character(),
##   ascend_shuttle = col_character(),
##   in_orbit = col_character(),
##   descend_shuttle = col_character()
## )
## ℹ Use `spec()` for the full column specifications.
astronauts
## # A tibble: 1,277 x 24
##       id number nationwide_number name      original_name    sex   year_of_birth
##    <dbl>  <dbl>             <dbl> <chr>     <chr>            <chr>         <dbl>
##  1     1      1                 1 Gagarin,… ГАГАРИН Юрий Ал… male           1934
##  2     2      2                 2 Titov, G… ТИТОВ Герман Ст… male           1935
##  3     3      3                 1 Glenn, J… Glenn, John H.,… male           1921
##  4     4      3                 1 Glenn, J… Glenn, John H.,… male           1921
##  5     5      4                 2 Carpente… Carpenter, M. S… male           1925
##  6     6      5                 2 Nikolaye… НИКОЛАЕВ Андрия… male           1929
##  7     7      5                 2 Nikolaye… НИКОЛАЕВ Андрия… male           1929
##  8     8      6                 4 Popovich… ПОПОВИЧ Павел Р… male           1930
##  9     9      6                 4 Popovich… ПОПОВИЧ Павел Р… male           1930
## 10    10      7                 3 Schirra,… Schirra, Walter… male           1923
## # … with 1,267 more rows, and 17 more variables: nationality <chr>,
## #   military_civilian <chr>, selection <chr>, year_of_selection <dbl>,
## #   mission_number <dbl>, total_number_of_missions <dbl>, occupation <chr>,
## #   year_of_mission <dbl>, mission_title <chr>, ascend_shuttle <chr>,
## #   in_orbit <chr>, descend_shuttle <chr>, hours_mission <dbl>,
## #   total_hrs_sum <dbl>, field21 <dbl>, eva_hrs_mission <dbl>,
## #   total_eva_hrs <dbl>

Max mission duration every year

knitr::include_graphics("figure.png")

The code for the figure is produced by Eliseo Domínguez