Data

str(housing)
## 'data.frame':    72 obs. of  5 variables:
##  $ Sat : Ord.factor w/ 3 levels "Low"<"Medium"<..: 1 2 3 1 2 3 1 2 3 1 ...
##  $ Infl: Factor w/ 3 levels "Low","Medium",..: 1 1 1 2 2 2 3 3 3 1 ...
##  $ Type: Factor w/ 4 levels "Tower","Apartment",..: 1 1 1 1 1 1 1 1 1 2 ...
##  $ Cont: Factor w/ 2 levels "Low","High": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Freq: int  21 21 28 34 22 36 10 11 36 61 ...

1. First plot

plot = housing %>%
  group_by(Infl,Type) %>%
  summarise(Freq = sum(Freq))


ggplot(plot, aes(x = Infl, y = Freq))+
  geom_bar(
    aes(fill = Type), stat = "identity", 
    position = position_dodge(0.8)
    )+ 
    facet_wrap(~Type) +
  labs(y = "Residents",
       x = "Influence",
       title = "Influence vs Rental")

The plot visualize a diverse selection of apartment types for rental and categorize them as low, medium and high. We can easily interpret from the above visualization is group of low and medium opts for apartments and terrace. The plot also clarifies that people with high income actually not opt for rental.

2. Second plot

plot2 <- housing %>%
  group_by(Type, Sat) %>% 
  summarise(Freq = sum(Freq))

ggplot(plot2, aes(Sat, Freq)) +
  geom_point(aes(color = Type)) +
  facet_grid(Type ~ ., scales = "free", space = "free") +
  theme_light() +
  theme(strip.text.y = element_text(angle = 0),
        legend.position = "none") +
  labs(y = "Residents",
       x = "Satisfaction",
       title = "Resident Satisfaction")

The plot visualize the satisfication of lease owners of different paying groups and it can be easily interpret that people with high wages doesn’t adjust with terracce but are happy with other form of resident leasing i.e., atrium, apartment and tower. But the not case with people in medium group as they are only happy in atriums and low group with the terrace.

3. Third plot

plot3 =  housing %>%
  mutate(
    satis = ifelse(Sat == 'Low', 1, ifelse(Sat == 'High', 5, 3)) * Freq
  ) %>%
  group_by(Type, Cont) %>%
  summarise(
    satis = sum(satis),
    Freq = sum(Freq)
  ) %>%
  mutate(avg = round(satis/ Freq, 2))

ggplot(plot3, aes(avg, Cont)) +
  geom_point(aes(size = Freq)) +
  facet_grid(Type ~ .) +
 labs(x="Avg Satisfaction Scores",
              y="Contacts",
              title="Average Satisfaction Scores over Contact and rental types")

The plot visualizes the average satisfaction score and satisfaction score with a different concept. In this is visualzation it is more precise and accurate to calculate the averages and how the groups will decide based on rental types

4. Fourth plot

plot4 = housing %>%
  group_by(Type, Cont,Infl) %>%
  summarise(Freq = sum(Freq))


ggplot(plot4, aes(Freq, Cont)) +
  geom_point(aes(color=Type))+
  facet_grid(Type ~ Infl, space="fixed", scales="fixed") +
  theme(strip.text.y = element_text(angle = 0),
        legend.position = 'none') +
  labs(y = 'Contacts',
       x = 'Residents',
       title = 'Contacts, Accomodation and Influence')

The above plot visualizes the of the management influence the different groups by contacts and the residents willing to opt for the different type of rentals.

5. Fifth plot

ggballoonplot(housing, x = 'Sat', y = 'Infl', size = 'Freq', facet.by = 'Type',
              fill = 'Freq', ggtheme = theme_minimal()) +
 labs(x="Satisfaction",
              y="Influence",
              title="Contacts, Rental, Satisfaction and there relationships")

This visualization gives you a better understanding of the relationship between pay groups and there contacts and rental satisifaction.