Yinshu Zhang
Feb. 3rd, 2019
this slides demostrate publishing presentation with “R presentation”, following slides visualize the data of household income and travel distance to work, and foreign language speaking family and hoursehold income.
Home work assignment “deveoping data products” https://www.coursera.org/learn/data-products/peer/tMYrn/course-project-shiny-application-and-reproducible-pitch.
The data is from US 2010 census, in previous assignment data was processed and saved, for detail check github repo at https://github.com/yszhangit/onemorehomework, the shinyApp can be found at https://yszhangit.shinyapps.io/onemorehomework/.
g1 <- ggplot(dat, aes(x=median_household_income/1000, y=mean_work_travel_distance)) +
geom_point(alpha = 0.25) +
geom_smooth(method = "loess", se =F) +
xlim(c(0, max(dat$median_household_income/1000))) +
labs(x="Median Household Income(K)",
y="Mean Work Tracel Distance")
g2 <- ggplot(dat, aes(x=foreign_language_spoken_at_home_pct, y=median_household_income/1000)) +
geom_point(alpha = 0.25) +
geom_smooth(method = "auto", se =F) +
labs(y="Median Household Income(K)",
x="Foreign Language Spoken At Home %")
The trend shows higher the income, shorter the travel distance between home and office.
The x axis show the precentage of family speak foreign language at home in a county, y axis show median income. the plot doesnt clearly related between those two.