Skip to content

Commit

Permalink
adding no lint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rnayebi21 committed Dec 15, 2024
1 parent 48ee517 commit f67e325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions vignettes/na-notebook.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Now let's take a look at some real data, and see how the same issue arises when

```{r data_collection, warning=FALSE}
# Gathering the Data
print(getwd())
states <- "ca,fl,ny,tx"
today <- 20240725
Expand Down Expand Up @@ -130,10 +129,10 @@ plot_signals <- function(x, version = NULL, verbose = TRUE) {
mutate(is_na = is.na(!!sym(col)))
na_regions <- na_regions %>%
group_by(group = cumsum(!is_na))
group_by(group = cumsum(!is_na)) # nolint: object_usage_linter
na_regions <- na_regions %>%
filter(is_na == TRUE)
filter(is_na == TRUE) # nolint: object_usage_linter
na_regions <- na_regions %>%
summarize(start = min(time_value), end = max(time_value), signal = col)
Expand All @@ -150,7 +149,7 @@ plot_signals <- function(x, version = NULL, verbose = TRUE) {
gather(key = "signal", value = "value", -time_value)
if (verbose) {
plot <- ggplot(x, aes(x = time_value, y = value, color = signal)) +
plot <- ggplot(x, aes(x = time_value, y = value, color = signal)) + # nolint: object_usage_linter
geom_line() +
labs(title = title, x = "Time", y = "Normalized Value") +
theme_minimal()
Expand All @@ -171,7 +170,7 @@ plot_signals <- function(x, version = NULL, verbose = TRUE) {
plot <- plot +
geom_rect(
data = na_regions_list[[col]],
aes(xmin = start, xmax = end, ymin = -Inf, ymax = Inf, fill = signal),
aes(xmin = start, xmax = end, ymin = -Inf, ymax = Inf, fill = signal), # nolint: object_usage_linter
color = NA, alpha = 0.2, inherit.aes = FALSE
)
Expand Down Expand Up @@ -216,7 +215,7 @@ generate_signal <- function() {
geo_values = states,
issues = epirange(20210920, today)
) %>%
select(geo_value, time_value, version = issue, confirmed_cov = value) %>%
select(geo_value, time_value, version = issue, confirmed_cov = value) %>% # nolint: object_usage_linter
as_epi_archive()
versions <- unique(cov_adm[["DT"]][["version"]])
Expand Down
Binary file added vignettes/na-notebook.pdf
Binary file not shown.

0 comments on commit f67e325

Please sign in to comment.