Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
2
  • Loading branch information
aleksanderbl29 committed Oct 28, 2024
1 parent bc857c3 commit 0aa22fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Depends:
R (>= 3.5.0)
Imports:
dawaR (>= 0.2.3),
dplyr,
ggplot2 (>= 3.4.0),
rlang
Roxygen: list(markdown = TRUE)
Expand Down
5 changes: 3 additions & 2 deletions R/plot_municipalities.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#' @description
#' Plot a vector of municipalities in Denmark. Just provide the name.
#'
#' @param region Municipality to plot. Mutiple is supported.
#' @param municipality Municipality to plot. Mutiple is supported.
#'
#' @export
#' @importFrom ggplot2 ggplot theme_bw labs geom_sf aes guides
#' @importFrom rlang .data
#'
#' @returns Returns a `{ggplot2}` object and prints the plot as well.
#' @examples
Expand Down Expand Up @@ -124,7 +125,7 @@ plot_municipalities <- function(
}

dawaR::get_map_data("kommuner") |>
dplyr::filter(navn %in% municipality) |>
dplyr::filter(.data$navn %in% municipality) |>
ggplot() +
geom_sf() +
theme_bw() +
Expand Down
3 changes: 2 additions & 1 deletion R/plot_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#'
#' @export
#' @importFrom ggplot2 ggplot theme_bw labs geom_sf aes guides
#' @importFrom rlang .data
#'
#' @returns Returns a `{ggplot2}` object and prints the plot as well.
#' @examples
Expand All @@ -30,7 +31,7 @@ plot_regions <- function(
}

dawaR::get_map_data("regioner") |>
dplyr::filter(navn %in% region) |>
dplyr::filter(.data$navn %in% region) |>
ggplot() +
geom_sf() +
theme_bw() +
Expand Down
2 changes: 1 addition & 1 deletion man/plot_municipalities.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0aa22fd

Please sign in to comment.