I use public data of donations to political campaings to paint a map. Red (republicans), Blue(Democrats), and Grey(none of those two) represent the party that received more money in each state.
add jar csv-serde-1.0.jar;
CREATE TABLE contributions
(cycle INT,
transaction_namespace STRING,
transaction_id STRING,
transaction_type STRING,
filing_id BIGINT,
is_amendment BOOLEAN,
amount FLOAT,
contribution_date STRING,
contributor_name STRING,
contributor_ext_id STRING,
contributor_type STRING,
contributor_occupation STRING,
contributor_employer STRING,
contributor_gender STRING,
contributor_address STRING,
contributor_city STRING,
contributor_state STRING,
contributor_zipcode STRING,
contributor_category STRING,
organization_name STRING,
organization_ext_id STRING,
parent_organization_name STRING,
parent_organization_ext_id STRING,
recipient_name STRING,
recipient_ext_id STRING,
recipient_party STRING,
recipient_type STRING,
recipient_state STRING,
recipient_state_held STRING,
recipient_category STRING,
committee_name STRING,
committee_ext_id STRING,
committee_party STRING,
candidacy_status BOOLEAN,
district STRING,
district_held STRING,
seat STRING,
seat_held STRING,
seat_status STRING,
seat_result STRING)
row format serde 'com.bizo.hive.serde.csv.CSVSerde'
stored as textfile;
I will try to write that step by step next time.