From 35c3014deebb7edd4437f5e6d958780fd265f034 Mon Sep 17 00:00:00 2001 From: jan Date: Wed, 1 Feb 2023 12:47:05 +0100 Subject: [PATCH] fixing && error --- vignettes/osem-history.Rmd | 4 ++-- vignettes/osem-history_revised.Rmd | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/vignettes/osem-history.Rmd b/vignettes/osem-history.Rmd index a04e391..224f2b5 100644 --- a/vignettes/osem-history.Rmd +++ b/vignettes/osem-history.Rmd @@ -95,7 +95,7 @@ inconsistent (`Luftdaten`, `luftdaten.info`, ...) grouptag_counts = boxes %>% group_by(grouptag) %>% # only include grouptags with 8 or more members - filter(length(grouptag) >= 8 && !is.na(grouptag)) %>% + filter(length(grouptag) >= 8 & !is.na(grouptag)) %>% mutate(count = row_number(createdAt)) # helper for sorting the grouptags by boxcount @@ -194,7 +194,7 @@ spanning a large chunk of openSenseMap's existence. duration = boxes %>% group_by(grouptag) %>% # only include grouptags with 8 or more members - filter(length(grouptag) >= 8 && !is.na(grouptag) && !is.na(updatedAt)) %>% + filter(length(grouptag) >= 8 & !is.na(grouptag) & !is.na(updatedAt)) %>% mutate(duration = difftime(updatedAt, createdAt, units='days')) ggplot(duration, aes(x = grouptag, y = duration)) + diff --git a/vignettes/osem-history_revised.Rmd b/vignettes/osem-history_revised.Rmd index 1820d6c..af67f10 100644 --- a/vignettes/osem-history_revised.Rmd +++ b/vignettes/osem-history_revised.Rmd @@ -15,7 +15,7 @@ output: fig_width: 7 toc: yes vignette: > - %\VignetteIndexEntry{Visualising the History of openSenseMap.org} + %\VignetteIndexEntry{Visualising the Develpment of openSenseMap.org in 2022} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdown} --- @@ -25,9 +25,7 @@ vignette: > ```{r setup, results='hide', message=FALSE, warning=FALSE} # required packages: -# library(opensensmapr) # data download -library(devtools) -load_all(".") +library(opensensmapr) # data download library(dplyr) # data wrangling library(ggplot2) # plotting library(lubridate) # date arithmetic @@ -140,7 +138,7 @@ inconsistent (`Luftdaten`, `luftdaten.info`, ...) grouptag_counts = boxes %>% group_by(grouptag) %>% # only include grouptags with 15 or more members - filter(length(grouptag) >= 15 && !is.na(grouptag) && grouptag != '') %>% + filter(length(grouptag) >= 15 & !is.na(grouptag) & grouptag != '') %>% mutate(count = row_number(locationtimestamp)) # helper for sorting the grouptags by boxcount