Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
langbart committed Oct 23, 2024
1 parent aaed3a0 commit 84f022b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export_summaries <- function(log_threshold = logger::DEBUG) {

bmu_size <-
get_metadata()$BMUs |>
dplyr::mutate(size_km = as.numeric(.data$size_km))
dplyr::mutate(size_km = as.numeric(.data$size_km),
BMU = tolower(.data$BMU))

monthly_summaries <-
valid_data |>
Expand All @@ -77,7 +78,8 @@ export_summaries <- function(log_threshold = logger::DEBUG) {
cpue = .data$total_catch_kg / .data$effort
) |>
dplyr::ungroup() %>%
dplyr::mutate(date = lubridate::floor_date(.data$landing_date, unit = "month")) |>
dplyr::mutate(date = lubridate::floor_date(.data$landing_date, unit = "month"),
BMU = stringr::str_to_title(.data$BMU)) |>
dplyr::select(.data$BMU, .data$date, .data$effort, .data$cpue, .data$total_catch_kg) %>%
dplyr::group_by(.data$BMU, .data$date) |>
dplyr::summarise(
Expand All @@ -102,7 +104,10 @@ export_summaries <- function(log_threshold = logger::DEBUG) {
.groups = "drop"
) %>%
dplyr::ungroup() %>%
tidyr::complete(.data$landing_site, .data$gear, fill = list(gear_n = 0, gear_perc = 0))
tidyr::complete(.data$landing_site, .data$gear, fill = list(gear_n = 0, gear_perc = 0)) %>%
dplyr::mutate(landing_site = stringr::str_to_title(.data$landing_site))




fish_distribution <-
Expand All @@ -116,7 +121,9 @@ export_summaries <- function(log_threshold = logger::DEBUG) {
.groups = "drop"
) %>%
dplyr::ungroup() %>%
tidyr::complete(.data$landing_site, .data$fish_category, fill = list(catch_kg = 0, catch_percent = 0))
tidyr::complete(.data$landing_site, .data$fish_category, fill = list(catch_kg = 0, catch_percent = 0)) %>%
dplyr::mutate(landing_site = stringr::str_to_title(.data$landing_site))


# Dataframes to upload
dataframes_to_upload <- list(
Expand Down

0 comments on commit 84f022b

Please sign in to comment.