-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1686 from rstudio/add-gibraltar-dataset
Add the `gibraltar` dataset
- Loading branch information
Showing
32 changed files
with
1,694 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
library(tidyverse) | ||
|
||
gibraltar <- | ||
readr::read_csv( | ||
file = "data-raw/gibraltar.csv", | ||
col_types = | ||
cols( | ||
date = col_date(format = ""), | ||
time = col_time(format = ""), | ||
temp = col_character(), | ||
dew_point = col_character(), | ||
humidity = col_character(), | ||
wind_dir = col_character(), | ||
wind_speed = col_character(), | ||
wind_gust = col_character(), | ||
pressure = col_character(), | ||
precip = col_character(), | ||
condition = col_character() | ||
) | ||
) %>% | ||
dplyr::select(-precip) %>% | ||
dplyr::mutate(time = sub(":00$", "", as.character(time))) %>% | ||
dplyr::mutate(temp = as.numeric(gsub("\\D", "", temp))) %>% | ||
dplyr::mutate(dew_point = as.numeric(gsub("\\D", "", dew_point))) %>% | ||
dplyr::mutate(humidity = as.numeric(gsub("\\D", "", humidity))) %>% | ||
dplyr::mutate(wind_speed = as.numeric(gsub("\\D", "", wind_speed))) %>% | ||
dplyr::mutate(wind_gust = as.numeric(gsub("\\D", "", wind_gust))) %>% | ||
dplyr::mutate(pressure = as.numeric(gsub("[^0-9\\.]", "", pressure))) %>% | ||
dplyr::mutate(temp = round((temp - 32) * 5/9, 1)) %>% | ||
dplyr::mutate(dew_point = round((dew_point - 32) * 5/9, 1)) %>% | ||
dplyr::mutate(humidity = humidity / 100) %>% | ||
dplyr::mutate(wind_speed = round(wind_speed * 0.44704, 1)) %>% | ||
dplyr::mutate(wind_gust = round(wind_gust * 0.44704, 1)) %>% | ||
dplyr::mutate(pressure = round(pressure * 33.863889532610884, 1)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
a86e11d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://quarto-gt-examples.netlify.app as production
🚀 Deployed on https://6652707dfaf751eaa31b3d44--quarto-gt-examples.netlify.app
a86e11d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://quarto-gt-examples.netlify.app as production
🚀 Deployed on https://6653c2039c181ff64f8e150a--quarto-gt-examples.netlify.app
a86e11d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://quarto-gt-examples.netlify.app as production
🚀 Deployed on https://66551373d828e953b6b440c3--quarto-gt-examples.netlify.app
a86e11d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://quarto-gt-examples.netlify.app as production
🚀 Deployed on https://665664debdcd1105124fd808--quarto-gt-examples.netlify.app