Outline

  1. Performers Info
  2. Overall Zoom Concert Data Review
  3. Senior Home Info

0.1 Backgroup Story

Whitney and Linda started this Zoom online concert program for senior homes in China. Many non-professional volunteers joined the program wish to build a connection between the young generation and seniors.

https://happycapriccio.com/

0.2 Moon Festival Special Event

0.3 Concert Video

Special Thanks to Meichen

Color Datatable

color<- function(data,var,color,l){
  datatable(data, options = list(
  pageLength = l), escape=FALSE) %>% formatStyle(names(data),
                                fontSize="80%",
  background = styleColorBar(var, color),
  backgroundSize = '88% 78%',
  backgroundRepeat = 'no-repeat',
  backgroundPosition = 'left')
}

0.4 Instrument Distribution

ins <- group_by(name1, ins )
ins1 <- dplyr::summarise(ins, count=n())

atry3<- readPNG("C:/Users/ftan/OneDrive - Nektar Therapeutics/desktop/All/r/happy/logo.png", native=TRUE)
p41 <- ggplot(ins1, aes(x=reorder(ins,count),y=count))+annotation_raster(atry3, xmin=0.5,xmax=3, ymin=8, ymax=Inf) +
geom_bar(aes(y=count,fill=ins), stat="identity")+       scale_fill_brewer(palette="Set3")+
labs(x="Instrument", y="count",title="Instrument Distribution")+ theme(legend.position="none", axis.text.x = element_text(angle = 90, hjust = 1) ,panel.background = element_rect(fill="white"))+ylim(0,22)
  p41

0.5 Player Distribution

icountry <- group_by(name1, country )

ic2 <- dplyr::summarise(icountry,  count=n(),  na.rm=TRUE)
n <- joinCountryData2Map(ic2, joinCode="NAME", nameJoinColumn="country")
## 3 codes from your data successfully matched countries in the map
## 0 codes from your data failed to match with a country code in the map
## 240 codes from the map weren't represented in your data
mapCountryData(n, nameColumnToPlot="count", mapTitle="Player Country Map" , colourPalette = "negpos8")

0.6 Volunteer Timeline

time <- name1 %>%select(date1, year, month)%>% group_by(date1)%>% dplyr::summarise(n=n())%>% 
  mutate(Date=lubridate::mdy(date1))%>% arrange(mdy(date1))
  ggplot(time, aes(x=Date, y=n)) +
    geom_segment( aes(xend=Date, yend=0),color="skyblue",size=2) +
    geom_point( size=4, color="orange") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1) ,panel.background = element_rect(fill="white")) +  scale_x_date(date_labels="%b %Y", breaks = unique(time$Date))+
    xlab("Timeline") +ylab("New Volunteer") 

0.7 Senior Home Introduction

color(info, info$ï..no, "orange", 10)

Instrument Distribution

pins <- info%>% group_by(ins ) %>% summarise( count=n())


atry4<- readPNG("C:/Users/ftan/OneDrive - Nektar Therapeutics/desktop/All/r/happy/piano.png", native=TRUE)


pins1 <- ggplot(pins, aes(x=reorder(ins,count),y=count))+annotation_raster(atry4, xmin=0.4,xmax=6, ymin=15, ymax=Inf) +
geom_bar(aes(y=count,fill=ins), stat="identity")+       scale_fill_brewer(palette="Set3")+
labs(x="Instrument", y="count",title="Instrument Distribution for Concerts")+ theme(legend.position="none", axis.text.x = element_text(angle = 90, hjust = 1) ,panel.background = element_rect(fill="white"))+ylim(0,50)
pins1

Top Contributor

ptop <- info%>% group_by(player,ins) %>% summarise( concert=n()) %>% arrange(-concert)
color(ptop, ptop$concert, "#a1d4bd", 4)
pp <- name1%>% group_by(year)  %>% summarise( concert=n())

Participate Ratio

rt <- info%>% group_by(year,player)%>% dplyr:: summarise(player=n_distinct(player)) 
rt1 <- rt %>% group_by(year)%>%dplyr:: summarise(player=n()) %>% mutate(ratio=ifelse(year==2021,round(player/29,2),round(player/37,2)))
color(rt1, rt1$ratio, "#FB8072", 2)

1 Senior Home

phome <- info%>% group_by(seniorhome,ins) %>% summarise( count=round(n()/3,0)) 

ph1 <- ggplot(phome, aes(x=reorder(seniorhome,count),y=count))+
geom_bar(aes(y=count,fill=ins), stat="identity")+       scale_fill_brewer(palette="Set3")+
labs(x="Senior Home", y="count",title="Concerts by Senior Home")+ theme(legend.position="right", axis.text.x = element_text(angle = 90, hjust = 1) ,panel.background = element_rect(fill="white"))+ylim(0,16)
ph1

1.1 Concert by year

cyear<- info%>% group_by(year,location) %>% summarise( count=round(n()/3,0))
py1 <- ggplot(cyear, aes(x=reorder(year,count),y=count))+
geom_bar(aes(y=count,fill=location), stat="identity")+       scale_fill_brewer(palette="Set3")+
labs(x="Timeline", y="count",title="Concerts by year")+ theme(legend.position="right", axis.text.x = element_text(angle = 90, hjust = 1) ,panel.background = element_rect(fill="white"))+ylim(0,40)
py1

1.2 Senior Home

1.2.1 Oubaoting

In Nanjing,…

o<- filter(info, seniorhome=="Oubaoting")%>% group_by(date)%>% dplyr::summarise(n=n())%>% 
  mutate(Date=lubridate::mdy(date))%>% arrange(mdy(date))
 
 ggplot(o, aes(x=Date, y=n)) +
    geom_segment( aes(xend=Date, yend=0),color="#B3DE69",size=2) +
    geom_point( size=4, color="#eebc59") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),panel.background = element_rect(fill="white", linetype="solid") ) +  scale_x_date(date_labels="%b %Y", breaks = unique(o$Date))+
    xlab("Timeline") +ylab("Players") +ggtitle("Oubaoting Concert Overview")

1.2.2 Xingbao

Located in Baoshan and Xipu, grandpas and grandmas give feedbacks

o<- filter(info, seniorhome=="Xingbao")%>% group_by(date)%>% dplyr::summarise(n=n())%>% 
  mutate(Date=lubridate::mdy(date))%>% arrange(mdy(date))
 
 ggplot(o, aes(x=Date, y=n)) +
    geom_segment( aes(xend=Date, yend=0),color="#80B1D3",size=2) +
    geom_point( size=4, color="#f58726") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),panel.background = element_rect(fill="white", linetype="solid") ) +  scale_x_date(date_labels="%b %Y", breaks = unique(o$Date))+
    xlab("Timeline") +ylab("Players") +ggtitle("Xingbao Concert Overview")

1.2.3 Jingmei

In Shanghai, grandpas and grandmas are engaged to play instrument and participate as well

o<- filter(info, seniorhome=="Jingmei")%>% group_by(date)%>% dplyr::summarise(n=n())%>% 
  mutate(Date=lubridate::mdy(date))%>% arrange(mdy(date))
 
 ggplot(o, aes(x=Date, y=n)) +
    geom_segment( aes(xend=Date, yend=0),color="#BEBADA",size=2) +
    geom_point( size=4, color="#FB8072") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),panel.background = element_rect(fill="white", linetype="solid") ) +  scale_x_date(date_labels="%b %Y", breaks = unique(o$Date))+
    xlab("Timeline") +ylab("Players") +ggtitle("Jingmei Concert Overview")

### Meili Garden

Located in Guiyang, Guilin, and Suzhou, grandpas and grandmas prepared performances

o<- filter(info, seniorhome=="MeiliGarden")%>% group_by(date)%>% dplyr::summarise(n=n())%>% 
  mutate(Date=lubridate::mdy(date))%>% arrange(mdy(date))
 
 ggplot(o, aes(x=Date, y=n)) +
    geom_segment( aes(xend=Date, yend=0),color="#8DD3C7",size=2) +
    geom_point( size=4, color="coral") +
    theme(axis.text.x = element_text(angle = 90, hjust = 1),panel.background = element_rect(fill="white", linetype="solid") ) +  scale_x_date(date_labels="%b %Y", breaks = unique(o$Date))+
    xlab("Timeline") +ylab("Players") +ggtitle("MeiliGarden Concert Overview")

1.3 WordCloud

Word Cloud

#company count
names <- filter(info,  !is.na(song)) %>%
  group_by(song) %>%
  dplyr::summarize(count = n()) 
set.seed(88)
wordcloud(names$song, freq=names$count, min.freq=1,max.words=200,random.order=FALSE,rot.per=0.5,colors=brewer.pal(8, "Dark2"), main="Song")