-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMeetupStats.Rmd
More file actions
69 lines (57 loc) · 3.03 KB
/
MeetupStats.Rmd
File metadata and controls
69 lines (57 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: "Calgary R User Group Meetup Stats"
author: "Marc Boulet"
date: "11/21/2017"
output:
html_document:
df_print: kable
theme: sandstone
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)
```
## Load Meetup Data
This meetup data was accessed on November 21, 2017, from the Calgary R User Group stats hosted on www.meetup.com.
```{r load data}
library(readr)
library(knitr)
# load total and active members
members <- read_csv("Data/CalgaryR_-_Calgary_R_Users_Group_Total_and_Active_Members-2.csv",
col_types = cols(Date = col_date(format = "%m/%d/%Y")))
# load member join rate
memberJoins <- read_csv("Data/CalgaryR_-_Calgary_R_Users_Group_Groups_Joins.csv",
col_types = cols(Date = col_date(format = "%m/%d/%Y")))
# load and display meetup dates and titles
meetups <- read_csv("Data/meetups.csv", col_types = cols(Date = col_date(format = "%m/%d/%Y")))
kable(head(meetups, n=7))
```
## Membership activity time series
This plot uses the package **plotly**, an interactive graphing library (https://plot.ly/r/).
FYI, an active member is one who has visited your Meetup group's page within the past 30 days (https://www.meetup.com/help/topics/45/article/868781/.)
```{r memberActivity, echo=TRUE, out.width = '100%'}
library(plotly)
plot_ly(members, x = ~Date, y = ~totalMembers, name = "Total members", type = 'scatter',
mode = 'lines', fill="tozeroy") %>%
add_trace(y = ~activeMembers, name = "Active members", mode= 'lines') %>%
add_trace(x = meetups$Date[1], name = meetups$meetupTitle[1], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[2], name = meetups$meetupTitle[2], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[3], name = meetups$meetupTitle[3], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[4], name = meetups$meetupTitle[4], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[5], name = meetups$meetupTitle[5], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[6], name = meetups$meetupTitle[6], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
add_trace(x = meetups$Date[7], name = meetups$meetupTitle[7], showlegend = FALSE, mode = 'lines',
line = list(color = 'rgb(0,0,0)')) %>%
layout(legend = list(orientation = 'h'),
title = "Calgary R User Group Membership Activity")
```
```{r memberGrowth, eval=FALSE, include=FALSE, out.width='100%'}
plot_ly(memberJoins, x = ~Date, y = ~memberJoins, type = 'scatter',
mode = "lines+markers", fill="tozeroy") %>%
layout(title = "Calgary R User Group Membership Growth")
```