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!
Rows: 90 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (2): percent, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 90 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (2): percent, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 90 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 457 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 238 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
First trick: instead of copy-pasting the URL everywhere, we used the {glue} package to combine the strings. This is reminiscent of f-strings in Python.
We used the |> pipe operator. This is the native pipe, available since R>=4.1. You can also use {magrittr}’s %>% too! Then we used the select() function to extract one column only.
The timestamp is recorded as milliseconds from the epoch (January first, 1970).
Rows: 90 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 457 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 238 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (6): p10, p25, p50, p75, p90, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 90 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (2): percent, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 90 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): measure, client, date
dbl (2): percent, timestamp
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.