Skip to content

Commit

Permalink
Correct spelling erro in example dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
arcresu committed Jan 16, 2024
1 parent 3551df3 commit fd6ddb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions data-raw/mozzies_nsw2301.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ raw_counts <- list(
c("Kiama", ".ll.", ".ll.", ".ll."),
c("Lake Cathie", "llll", "llll", "mlhm"),
c("Lismore", "....", "....", "...."),
c("Milbank", ".lll", ".lll", ".lll"),
c("Millbank", ".lll", ".lll", ".lll"),
c("Mullumbimby", ".ll.", ".ll.", ".ll."),
c("Murwillumbah", ".lll", ".lll", ".lll"),
c("Numbucca", "....", "....", "...."),
Expand Down Expand Up @@ -111,7 +111,7 @@ sites <- tribble(
"Macquarie Marshes", "inland", "-30 55 55", "147 37 44",
"Mathoura", "inland", "-35 49 0", "144 54 0",
"Menindee", "inland", "-32 23 33", "142 25 05",
"Milbank", "coastal", "-30 45 0", "152 53 0",
"Millbank", "coastal", "-30 45 0", "152 53 0",
"Moama", "inland", "-36 5 0", "144 45 0",
"Moree", "inland", "-29 27 57", "149 50 02",
"Mullumbimby", "coastal", "-28 33 0", "153 30 0",
Expand All @@ -138,11 +138,7 @@ sites <- tribble(
"Wyong", "coastal", "-33 16 55", "151 25 5",
"Yass", "inland", "-34 49 0", "148 54 0",
"Young", "inland", "-34 18 0", "148 18 0"
) |>
mutate(
across(c(lat, long), coords_to_decimal),
type = factor(type),
)
)

coords_to_decimal <- function(coords) {
parts <- coords |>
Expand Down Expand Up @@ -173,6 +169,12 @@ counts_dfr <- function(location, cx_annul, ae_vigilax, total) {
)
}

sites <- sites |>
mutate(
across(c(lat, long), coords_to_decimal),
type = factor(type),
)

mozzies_nsw2301 <- raw_counts |>
map_dfr(function(x) counts_dfr(x[[1]], x[[2]], x[[3]], x[[4]])) |>
pivot_longer(
Expand Down
Binary file modified data/mozzies_nsw2301.rda
Binary file not shown.

0 comments on commit fd6ddb8

Please sign in to comment.