A workflow used to generate county level shape file with mean(z) in each county from an xyz data table in ArcGIS
note this is based on @MLowry's suggestion, adding almost step-by-step instructions.
Open ArcCatalog##
- create new personal geodatabase (e.g. foo.mdb)
- file -> new -> personal geodatabase
- add data
- right click on map.csv -> export to geodatabase (single) -> foo.mdb (note not clear if this needs to be exported to geodatabase, but this is how I made a table from the csv)
- right click on counties.lyr -> export to geodatabase (single) -> foo.mdb
- select map.csv file --> select output geodatabase --> ok
- create featureclass (.shp files) from xy table
- open foo.mdb
- right click table
- input fields x = lon, y = lat, z = yield
- coordinate system of input coordinates import -> from counties.lyr (or, equivalently, -> geographic .. -> world -> wgs_1984 -> open -> ok)
- import feature classes to geodatabase (multiple)
- select shp files created in prev. step -> add -> okay
Open ArcMap
- Add data
- select foo.mdb -> CTL + select tables -> open
- Spatial Join
- ArcToolbox -> Spatial Statistics -> Spatial Join -> Join counties.lyr to xyz table map
- Z value = yield; select 'mean' (or alternative statistic)