Predictive modeling and machine learning in R with the caret package

Table of contents Powerful and simplified modeling with caret Streamlined and consistent syntax for more than 200 different models Run all models with the train() function Easy data splitting Realistic model estimates through built-in resampling An R-squared from a model based on the full dataset is unrealistic An R-squared based on resampling is more realistic […]

Continue reading →

Manipulating and mapping US Census data in R using the acs, tigris and leaflet packages

Census data the hard way Plotting census data with ggplot2 Interactive plotting with the leaflet package Options 1: Convert the data.frame back to a SpatialPolygonsDataFrame Options 2: Make use of the existing SpatialPolygonsDataFrame Census data the easy(er) way 1) Set up the packages 2) Get the spatial data (tigris) 3) Get the tabular data (acs) […]

Continue reading →