Age Range vs Violation

Childcare_center %>% 
  group_by(age_range) %>% 
  count(violation_category) %>% 
  ggplot(aes(fill =violation_category, x=age_range,y = n))+
  geom_bar(position = "dodge", stat = "identity")+ labs(title = "Age Range vs. Violation Categrory",y = "Total Violation Cases", x = "Age_Range") 

The graph showed the relationship between two different group of age range (0 YEARS-2YEARS) and the violation cases in three categories (“critical”, “general” and “public health hazard”) number. As we can see from the graph, 2-5YEARS has a higher violation case and no violation than the 0-2YEARS.

Program Type vs Violation

Childcare_center %>% 
  group_by(program_type) %>% 
  count(violation_category) %>% 
  ggplot(aes(fill =violation_category, x=program_type,y = n))+
  geom_bar(position = "dodge", stat = "identity")+ labs(title = "Program Type vs. Violation Categrory",y = "Total Violation Cases", x = "Program Type") 

After analyzing the data, we found that the age-range and program type relationship is the same. Infant school is for 0-2 years kids and preschool are for 0-5 years kids. The graph above showing the relationship between the program type (Preschool Infant Toddler) and the violation category cases (Critical, General, No Violation and Public Health Hazard). As we can see from the graph, preschool has a higher violation case in the category “public health hazard”, “general” and “critical” than the Infant toddler program type. And in three violation categories, the “general” cases are higher than the other two.