Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
KittJonathan committed Nov 15, 2024
1 parent 9be72ce commit d4be438
Show file tree
Hide file tree
Showing 27 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions 02-SCRIPTS/clean_data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
library(tidyverse)
library(readxl)
library(maps)
library(parzer)

df <- readxl::read_xlsx("01-DATA_RAW/vendeeglobe_leaderboard_20241115_060000.xlsx",
range = "B6:U45", col_names = FALSE)

names(df) <- c("Rank", "Nat", "Skipper", "Hour_FR", "Latitude", "Longitude",
"Last30min_heading", "Last30min_speed", "Last30min_VMG", "Last30min_distance",
"SinceLastStandings_heading", "SinceLastStandings_speed", "SinceLastStandings_VMG",
"SinceLastStandings_distance", "Last24hrs_heading", "Last24hrs_speed",
"Last24hrs_VMG", "Last24hrs_distance", "Distance_to_finish", "Distance_to_leader")

df <- df |>
select(Latitude, Longitude) |>
mutate(lon = parzer::parse_lon(Longitude),
lat = parzer::parse_lat(Latitude))

world <- map_data("world")



ggplot() +
geom_polygon(data = world, aes(x = long, y = lat, group = group),
fill = "#afcfdf") +
geom_point(data = df, aes(x = lon, y = lat),
col = "#f4f0f0") +
coord_fixed(ratio = 1.3, xlim = c(-26, -12), ylim = c(25, 36)) +
theme_void() +
theme(panel.background = element_rect(colour = "#485fb0",
fill = "#485fb0"))
13 changes: 13 additions & 0 deletions VENDEE_GLOBE.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

0 comments on commit d4be438

Please sign in to comment.