Jitender Kumar
The application developed as submission to Developing Data Products course.
This application performs the following
Data for year 2015, 2010, 2000, 1990 and 1950 are used for the application. All figures are in millions
Conclusion: California, Florida, Texas and New York are the states which have shown maximum population growth for the years.
After the Data is loaded, we are doing the following
Using ggplot again to build histogram of data
Ggplot2, maps and RColorbrewer packages are used for plotting the data
Following is code for plotting the Population distribution
ggplot(popdata, aes(map_id = State)) + geom_map(aes_string(fill = popdata$Year_2015), map = states_map) + ggtitle("Population distribution across states (in millions)") + scale_fill_gradientn("",colours=brewer.pal(5,"GnBu"))+ expand_limits(x = states_map$long, y = states_map$lat)
ggplot(popdata1,aes(State,value/1000000,fill= variable))+ geom_bar(stat = "identity", position = "stack") +
xlab("State") + ylab("Population Growth (in millions)") +
ggtitle("Top 10 states with highest growth in population") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
The data used for the application can be found at http://www.factmonster.com/ipka/A0004986.html
Shiny application is hosted at https://kjitender.shinyapps.io/DPP_App_Assignment/
Github link is https://github.com/kjitender/DDP_Data_Science