This task is supposed to allow you to exercise your knowledge of the shape files you have just updated and ability to work with and plot SpatialPolygonsDataFrames. (Making pretty pictures will be fun, I hope.)
In the jon branch I have created a local_tina/ directory where I would like you to create state_and_county.Rmd. In this markdown document I would like you to exercise the the USCensusCounty and USCensusStates datasets by addressing the following in different sections of the document.
I'd like you to think of this document as the tutorial you wish you had and would like to leave to others learning to work with MazamaSpatialUtils.
- Create attractive plots using sp plotting for CONUS and for an individual state. (Use something like
subset(USCensusStates, stateCode %in% CONUS) or stateCode %in% "WA" for subsetting.)
- Find some data table on the web with state or county data and use
dplyr::left_join()to merge that data onto SPDF@data. Then create a chloropleth plot where the fill color is determined by the variable of interest. (You can look for data on wikipedia or here: https://catalog.data.gov/dataset?q=state+population or elsewhere.)
- Learn the basics of working with the tmap package and then create a chloropleth map using tmap.
You will want to read up on tmap and probably google for some good examples. I recommend starting here:
This task is supposed to allow you to exercise your knowledge of the shape files you have just updated and ability to work with and plot SpatialPolygonsDataFrames. (Making pretty pictures will be fun, I hope.)
In the
jonbranch I have created alocal_tina/directory where I would like you to createstate_and_county.Rmd. In this markdown document I would like you to exercise the the USCensusCounty and USCensusStates datasets by addressing the following in different sections of the document.I'd like you to think of this document as the tutorial you wish you had and would like to leave to others learning to work with MazamaSpatialUtils.
subset(USCensusStates, stateCode %in% CONUS)orstateCode %in% "WA"for subsetting.)dplyr::left_join()to merge that data ontoSPDF@data. Then create a chloropleth plot where the fill color is determined by the variable of interest. (You can look for data on wikipedia or here: https://catalog.data.gov/dataset?q=state+population or elsewhere.)You will want to read up on tmap and probably google for some good examples. I recommend starting here: