This is the first version of the **vivainsights** package to be released open-source on GitHub and CRAN. This is based on the original [wpa](https://microsoft.github.io/wpa/) library, with functions and documentation updated to reflect the latest features in Viva Insights.
roxygen2::roxygenise()
roxygen2::roxygenise()
roxygen2::roxygenise()
roxygen2::roxygenise()
roxygen2::roxygenise()
roxygen2::roxygenise()
devtools::check()
devtools::check()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
devtools::check()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
library(tidyverse)
?where
roxygen2::roxygenise()
devtools::check()
devtools::check()
roxygen2::roxygenise()
devtools::check()
library(tidyverse)
pq_data <- read_csv("_data/Person_GK_Sep21_2022 (1).Csv")
pq_data
pq_data %>% glimpse()
clean query names
clean_q <- function(x){
x <-
gsub(pattern = " ",
replacement = "_",
x = x)
x <-
gsub(pattern = "-",
replacement = "_",
x = x)
}
clean_q(names(pq_data))
clean query names
clean_q <- function(x){
x %>%
gsub(pattern = " ", replacement = "_", x = .) %>% replace spaces
gsub(pattern = "-", replacement = "_", x = .) replace hyphens
}
clean_q(names(pq_data))
clean query names
clean_q <- function(x){
x %>%
gsub(pattern = " ", replacement = "_", x = .) %>% replace spaces
gsub(pattern = "-", replacement = "_", x = .) %>% replace hyphens
gsub(pattern = ":", replacement = "_", x = .) replace :
}
clean_q(names(pq_data))
pq_data_clean <- clean_q(names(pq_data))
pq_data_clean
?usethis::use_data
include dataset in package
usethis::use_data(pq_data_clean, "pq_data")
pq_data_clean
pq_data <- clean_q(names(pq_data))
include dataset in package
usethis::use_data(pq_data, "pq_data")
pq_data <- read_csv("_data/Person_GK_Sep21_2022 (1).Csv")
pq_data %>% glimpse()
clean query names
clean_q <- function(x){
x %>%
gsub(pattern = " ", replacement = "_", x = .) %>% replace spaces
gsub(pattern = "-", replacement = "_", x = .) %>% replace hyphens
gsub(pattern = ":", replacement = "_", x = .) replace :
}
pq_data_clean <- clean_q(names(pq_data))
include dataset in package
usethis::use_data(pq_data_clean, name = "pq_data")
pq_data <- clean_q(names(pq_data))
include dataset in package
usethis::use_data("pq_data")
usethis::use_data(pq_data)
names(pq_data)
pq_data
pq_data <- read_csv("_data/Person_GK_Sep21_2022 (1).Csv")
clean query names
clean_q <- function(x){
x %>%
gsub(pattern = " ", replacement = "_", x = .) %>% replace spaces
gsub(pattern = "-", replacement = "_", x = .) %>% replace hyphens
gsub(pattern = ":", replacement = "_", x = .) replace :
}
names(pq_data) <- clean_q(names(pq_data))
pq_data %>% glimpse()
clean query names
clean_q <- function(x){
x %>%
gsub(pattern = " ", replacement = "_", x = .) %>% replace spaces
gsub(pattern = "-", replacement = "_", x = .) %>% replace hyphens
gsub(pattern = "[:|,]", replacement = "_", x = .) replace :
}
names(pq_data) <- clean_q(names(pq_data))
pq_data %>% glimpse()
include dataset in package
usethis::use_data(pq_data)
include dataset in package
usethis::use_data(pq_data, overwrite = TRUE)
copy headers to Excel
head(pq_data, 1)
copy headers to Excel
head(pq_data, 0)
copy headers to Excel
head(pq_data, 0) %>% export()
copy headers to Excel
head(pq_data, 0) %>% vivainsights::export()
devtools::install()
copy headers to Excel
head(pq_data, 0) %>% vivainsights::export()
roxygen2::roxygenise()
roxygen2::roxygenise()
roxygen2::roxygenise()
test using fread
data.table::fread("_data/Person_GK_Sep21_2022 (1).Csv",
stringsAsFactors = FALSE,
encoding = encoding)
test using fread
pq_data_dt <- data.table::fread("_data/Person_GK_Sep21_2022 (1).Csv",
stringsAsFactors = FALSE,
encoding = "UTF-8")
pq_data_dt
clean_q(names(pq_data_dt))
roxygen2::roxygenise()
roxygen2::roxygenise()
devtools::load_all()
pq_data$MetricDate %>% max()
pq_data$MetricDate %>% min()
roxygen2::roxygenise()
names(pq_data)
roxygen2::roxygenise()
min(as.Date(pq_data$MetricDate, "%m/%d/%Y"))
max(as.Date(pq_data$MetricDate, "%m/%d/%Y"))
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
devtools::check()
roxygen2::roxygenise()
roxygen2::roxygenise()