Summary

Introduction

In this project, I will explore and create a dashboard that I can possibly use for work. The motivation is from my daily work, part of which is to report monthly and quarterly campaign performaces to various clients. Creating a dashboard template would be so much easier for me to udpate report moving forward.

I extract the data source directly from Google Ads for one client I’m working on. The data set covers the information from September 2019 to December 2019. The variables are Month, Creative, Region, Ad size, Clicks, Impressions, Conversions, Cost, Conversions, Cost per Conversion.

The following are questions I intend to answer:

  • Which region is performing the best?

  • Which business unit is perfomring the best?

  • Which ad size is performing the best?

  • Is there any trend worth reporting in the past four months?

  • What should be optimized as a next step?

by Region

## Column

Cost by Region

Click-through Rate by Region

## Column

In this visualization, it shows that APAC did the best with the highest CTR with the most amount of spend compared to other regions.

by Business Unit

## Column

Cost&Click by Business Unit

CTR&CPC by Business Unit

## Column

In this visualization, it shows that CSS business unit did the best with the highest CTR with the most amount of spend compared to other business units.

by Ad Size

## Column

Clicks & Cost by Ad Size

CTR&CPC by Ad Size

## Column

In this visualization, it shows that 160x600 business unit did the best with the highest CTR with the most amount of spend compared to other ad sizes.

Any trend

## Column

CTR Trend

## Column

As shown, there is an increasing trend for CTR from September through December in 2019. By business unit, CSS saw the biggest increase in CTR, followed by SOT and OSD.

Recommendations to optimize

Conclusion

Overall, we are seeing a better performance by month break down by business unit, region and ad sizes. However, there are still a few opportunities to improve the performance moving forward.

What should be done next

  1. It’s recommended to expand or pivot more budgets toward outperforming regions such as APAC.
  2. It’s recommended to expand more spend to ad size of 160x600 as it drives the cheapest clicks. Meanwhile, A/B testing should be conducted continuously to explore new ad sizes with a better performance 3.It’s recommended to
---
title: "The Quantified Self"
subtitle: "Final project for ANLY 512: Data Visualization"
author: "Qin Zhu"
date: "`r Sys.Date()`"
output: 
 flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    source: embed
---

```{r setup, include=FALSE, message=FALSE}
knitr::opts_chunk$set(echo = FALSE)
#load library
#library(readxl)
#library(tidyverse)
#library(ggplot2)
library(plotly)
#library(dygraphs)
#library(xts)
#library(latticeExtra)
#library(flexdashboard)
#library(quantmod)
library(plyr)
#library(lubridate)
#library(RColorBrewer)
#library(DT)
#library(scales)
library(forcats)

#import the dataset
self1 <- read.csv("~/Desktop/HU/ANLY 512/self1.csv")
self2 <- read.csv("~/Desktop/HU/ANLY 512/self2.csv")
self3 <- read.csv("~/Desktop/HU/ANLY 512/self3.csv")
self4 <- read.csv("~/Desktop/HU/ANLY 512/self4.csv")
#look at dataset


```

# Summary

### Introduction

In this project, I will explore and create a dashboard that I can possibly use for work. The motivation is from my daily work, part of which is to report monthly and quarterly campaign performaces to various clients. Creating a dashboard template would be so much easier for me to udpate report moving forward. 

I extract the data source directly from Google Ads for one client I'm working on. The data set covers the information from September 2019 to December 2019. The variables are Month, Creative, Region, Ad size, Clicks, Impressions, Conversions, Cost, Conversions, Cost per Conversion. 

The following are questions I intend to answer:

- Which region is performing the best?

- Which business unit is perfomring the best?

- Which ad size is performing the best?

- Is there any trend worth reporting in the past four months?

- What should be optimized as a next step? 

# by Region

## Column {data-width=800}
-------------------------------------
### Cost by Region
```{r}
p1 <- plot_ly(self1, x = ~Region, y = ~Cost, type = 'bar', name = 'Spend($)') %>%
  add_trace(y = ~Clicks, name = 'clicks') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group')
p1
```

### Click-through Rate by Region
```{r}

p2 <- plot_ly(self1, x = ~Region, y = ~CPC, type = 'bar', name = 'CPC($)') %>%
  add_trace(y = ~CTR, name = 'CTR(%)') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group')
p2
```

## Column {data-width=200}
-------------------------------------
In this visualization, it shows that APAC did the best with the highest CTR with the most amount of spend compared to other regions. 



# by Business Unit

## Column {data-width=800}
-----------------------------------------------------------------------
### Cost&Click by Business Unit
```{r}
p3 <- plot_ly(self2, x = ~self2$Business.Unit, y = ~Cost, type = 'bar', name = 'Spend($)') %>%
  add_trace(y = ~Clicks, name = 'Clicks') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group')
p3
```

### CTR&CPC by Business Unit
```{r}
p4 <- plot_ly(self2, x = ~self2$Business.Unit, y = ~CPC, type = 'bar', name = 'CPC($)') %>%
  add_trace(y = ~CTR, name = 'CTR(%)') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group')
p4
```

## Column {data-width=200}
-----------------------------------------------------------------------
In this visualization, it shows that CSS business unit did the best with the highest CTR with the most amount of spend compared to other business units. 

# by Ad Size

## Column {data-width=800}
-----------------------------------------------------------------------
### Clicks & Cost by Ad Size
```{r}
p5 <-plot_ly(self3, x = ~self3$Ad_Size, y = ~Cost, type = 'bar', name = 'Spend($)') %>%
  add_trace(y = ~Clicks, name = 'Clicks') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group') 
p5
```

### CTR&CPC by Ad Size
```{r}
p6 <- plot_ly(self3, x = ~self3$Ad_Size, y = ~CPC, type = 'bar', name = 'CPC($)') %>%
  add_trace(y = ~CTR, name = 'CTR(%)') %>%
  layout(xaxis = list(title = "", tickangle = -45),
         yaxis = list(title = ""),
         margin = list(b = 100),
         barmode = 'group')
p6
```

## Column {data-width=200}
-----------------------------------------------------------------------
In this visualization, it shows that 160x600 business unit did the best with the highest CTR with the most amount of spend compared to other ad sizes. 

# Any trend

## Column {data-width=800}
----------------------------------------------------------------------
### CTR Trend

```{r}
p7 <- 
  self4%>%
  mutate(Month = fct_reorder(Month, CTR)) %>%
  ggplot(aes(Month, CTR)) +
  geom_bar(aes(fill = Business.Unit), stat = "identity", color = "black",
    position = position_dodge(0.9)) +
  facet_wrap(Business.Unit ~ .) +
  theme_light() +
  theme(strip.text.y = element_text(angle = 0),
        legend.position = "none") +
  labs(y = "Click-through Rate",
       x = "Month",
       title = "Click through Rate by business unit by month")


p7
```

## Column {data-width=200}
-----------------------------------------------------------------------
As shown, there is an increasing trend for CTR from September through December in 2019. By business unit, CSS saw the biggest increase in CTR, followed by SOT and OSD.


# Recommendations to optimize
### Conclusion
Overall, we are seeing a better performance by month break down by business unit, region and ad sizes. However, there are still a few opportunities to improve the performance moving forward.

### What should be done next
1. It's recommended to expand or pivot more budgets toward outperforming regions such as APAC. 
2. It's recommended to expand more spend to ad size of 160x600 as it drives the cheapest clicks. Meanwhile, A/B testing should be conducted continuously to explore new ad sizes with a better performance
3.It's recommended to