One of the best things about Cascalog queries is that they can be composed together. Similar to composing functions, this can be a good way to build a complex process from smaller, easy-to-understand parts.
In this recipe, we'll parse the Virginia census data we first used in the Managing program complexity with STM recipe in Chapter 3, Managing Complexity with Concurrent Programming. You can download this data from http://www.ericrochester.com/clj-data-analysis/data/all_160_in_51.P35.csv. We'll also use a new census datafile that contains the race data. You can download it from http://www.ericrochester.com/clj-data-analysis/data/all_160_in_51.P3.csv.
Since we're reading CSV, we'll need to use the dependencies and imports from the Parsing CSV files with Cascalog recipe.
We'll also use the hfs-text-delim
function from that recipe and ->long
from the Aggregating data with Cascalog recipe.
Also, we'll need the data files from http://www.ericrochester.com...