ESRI Shape files are very important in Atmospheric Chemistry Modelling, as a lot of variables are reported/saved on county, state or country level. Very often we need to convert a shape file into rasters to achieve the "emission inventory". GIS software, like ArcGIS which I used a lot previously, can solve this kind of problem very easily and quickly. Those software, however, are not free. Instead, R provides an alternative solution without much cost except several lines of scripts.
Here shows a simple R function I wrote using RGDAL and RASTER packages. It gets area wighted value in user-defined grids over a specific region. It handles county-level values and saves the output as NetCDF file.
Here is the output raster plot.
For county and state shape files, see the attached zip. Original R script is also attached.