Skip to content

Instantly share code, notes, and snippets.

@imjakedaniels
Created July 13, 2018 19:48
Show Gist options
  • Save imjakedaniels/d860d6da08faf29787a8174295aeee95 to your computer and use it in GitHub Desktop.
Save imjakedaniels/d860d6da08faf29787a8174295aeee95 to your computer and use it in GitHub Desktop.
```{r}
# general look
tele %>%
filter(marital == "M" & lor <= 12 & kid0_2 == "Y" | kid3_5 == "Y") %>%
ggplot(aes(x=months, y=totrev, colour = income)) +
geom_point() +
theme_classic()
```
```{r}
# Married new home owners with a young child
tele %>%
filter(marital == "M" & lor <= 12 & kid0_2 == "Y" | kid3_5 == "Y") %>%
ggplot(aes(x=months, y=totrev, colour = income)) +
geom_point() +
facet_wrap(~area)+
theme_classic()
lor, eqpdays, months
```
```{r}
# low income (should normalize)
tele %>%
filter(income <=5 & !is.na(ownrent)) %>%
ggplot(aes(x=ownrent)) +
stat_count() +
facet_wrap(~area) +
theme_classic()
```
```{r}
#low income neighbourhoods and marital status
tele %>%
filter(income <=5) %>%
ggplot(aes(x=churn)) +
stat_count() +
facet_wrap(~area) +
theme_classic()
```
```{r}
#single with phone >2 years old
tele %>%
filter(eqpdays >=365*2 & marital == "S") %>%
ggplot(aes(x=churn)) +
stat_count() +
facet_wrap(~area) +
theme_classic()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment