Skip to content

Commit

Permalink
Update figure datasets in PF-Data
Browse files Browse the repository at this point in the history
- update figure
- add comment about pipe usage
- format R code with 'styler'
  • Loading branch information
hdigital committed Dec 15, 2023
1 parent e150df3 commit 6e8fc67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions import/pf-data.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
library(tidyverse)

pl_dt <-
# use of magrittr pipe ('%>%') with placeholder ('.')
pl_dt <-
map_int(
fs::dir_ls(type = "directory"),
~ read_csv(glue::glue("{.}/{.}.csv")) %>% nrow()
) %>%
tibble(dataset = names(.), parties = .) %>%
) %>%
tibble(dataset = names(.), parties = .) %>%
mutate(dataset = fct_reorder(dataset, parties))

pl <-
Expand Down
Binary file modified import/pf-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6e8fc67

Please sign in to comment.