diff --git a/DESCRIPTION b/DESCRIPTION index f0f9bec..5c7b5e5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: windsoraiR Title: Access the 'Windsor.ai' API -Version: 0.1.1 +Version: 0.1.2 Authors@R: c(person(given = "Novica", family = "Nakov", @@ -31,3 +31,4 @@ Suggests: ggplot2, tidyr, curl +LazyData: true diff --git a/NEWS.md b/NEWS.md index a73b334..87b5351 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# windsoraiR 0.1.2 + +* Added sample data for the vignette. + # windsoraiR 0.1.1 * Added a more meaningful description. diff --git a/R/data.R b/R/data.R new file mode 100644 index 0000000..bacf6a2 --- /dev/null +++ b/R/data.R @@ -0,0 +1,16 @@ +#' Sample data from the Windsor API. +#' +#' A dataset containing sample gooole and facebook ads data +#' fetched from windsor.ai API. See more at: https://www.windsor.ai/api-fields/ +#' +#' @format A data frame with 1677 rows and 6 variables: +#' \describe{ +#' \item{data.campaign}{name of the campaign} +#' \item{data.clicks}{number of clicks} +#' \item{data.spend}{spend data} +#' \item{data.medium}{the type of referals} +#' \item{data.source}{source of the data (google, facebook, etc.)} +#' \item{googlesheets}{googlesheets id} +#' } +#' @source \url{http://www.windsor.ai/} +"my_data" diff --git a/data/my_data.rda b/data/my_data.rda new file mode 100644 index 0000000..e2eb708 Binary files /dev/null and b/data/my_data.rda differ diff --git a/man/my_data.Rd b/man/my_data.Rd new file mode 100644 index 0000000..faab1b9 --- /dev/null +++ b/man/my_data.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{my_data} +\alias{my_data} +\title{Sample data from the Windsor API.} +\format{ +A data frame with 1677 rows and 6 variables: +\describe{ +\item{data.campaign}{name of the campaign} +\item{data.clicks}{number of clicks} +\item{data.spend}{spend data} +\item{data.medium}{the type of referals} +\item{data.source}{source of the data (google, facebook, etc.)} +\item{googlesheets}{googlesheets id} +} +} +\source{ +\url{http://www.windsor.ai/} +} +\usage{ +my_data +} +\description{ +A dataset containing sample gooole and facebook ads data +fetched from windsor.ai API. See more at: https://www.windsor.ai/api-fields/ +} +\keyword{datasets} diff --git a/vignettes/basics.Rmd b/vignettes/basics.Rmd index fca1c22..282c111 100644 --- a/vignettes/basics.Rmd +++ b/vignettes/basics.Rmd @@ -22,17 +22,6 @@ The goal here is to outline in a couple of paragraphs and few lines of code some After we create an account at Windsor.ai and obtain an API key, collecting our data from Windsor to R is as easy as: -```{r, echo = FALSE} -library(windsoraiR) -my_data <- - windsor_fetch( - api_key = "c0eae325c8fb85a0c256da2cd08a27e81972", - date_preset = "last_7d", - fields = c("source", "campaign", "clicks", - "medium", "sessions", "spend") -) -``` - ```{r, eval = FALSE} library(windsoraiR) @@ -47,6 +36,10 @@ my_data <- Lets take a peek at the data we just downloaded to get a better idea about the structure and type of information included. +```{r, echo = FALSE} +library(windsoraiR) +``` + ```{r} str(my_data) ```