data-100

An assignment index for Professor Frazier's DATA 100 class

View the Project on GitHub

Assignment 4: Acquiring, Modifying, and Describing Data

This assignment required me to download land coverage information concerning Brunei from WorldPop and combine it with my previously-existing raster and shapefile data to create a formal object of class RasterStack. I then used the stacked raster layers to create overlapping histograms that provided data on population and night-time lights in the country with corresponding density curves. (Note: Brunei’s population is so small that I chose not to graph it as a logarithmic function.)

Histogram with Overlapping Density Curve (Population)

density_pop_graph

Histogram with Overlapping Density Curve (Night-Time Lights)

density_ntl_graph

Secondly, I used ggplot to create two linear regression models that respectively illustrate the correlations between Brunei’s population and the layout of night-time lights and bodies of water within the country. These two independent variables both correlate with Brunei’s population density, but in different ways, and with varying strength, as evidenced by the graphs and the summaries of their lines of best fit.

pop_ntl_regression_fitted summary_fit_ntl

pop_water_regression_fitted summary_fit_water