Skip to content

Instantly share code, notes, and snippets.

@marionhalftermeyer
marionhalftermeyer / Data II Final Assignment
Created January 21, 2014 14:59
Data Visualization II: Final Assignment Marion Halftermeyer
Goal
For my final project with R I wanted to practice creating Decision Trees. I decided to try to recreate what Jeff Larson and ProPublica did with political microtargeting of campaign email messages to constituents during the most recent presidential elections. I am using this exercise as a way to make use of all the knowledge in R that I gained over the course of the class. This exercise in particular and the idea of recreating Larson’s work will enable me to use many functions and ways of pulling data to make sense of it
Code
#Making the Decision Tree
#Merging the separate data frames of data to create one large data frame with #demographics, mailing ids and cluster ids.
cu=merge(clusters_users, users, by.x="user_id", by.y="id")
@marionhalftermeyer
marionhalftermeyer / Data II Assignment 2
Created January 21, 2014 14:52
Data Visualization II Assignment 2: Julie Klein, Robert Hackett & Marion Halftermeyer
1) Focus:
Our group decided to focus on the extinction of words in Congressional records. Our project had three key steps. First, we defined the term extinction. Second, we developed a methodology for identifying words that have gone extinct. Finally, we investigated the extinction of one word in particular. We ultimately decided to investigate the extinction of cloning (along with variations of cloning such as clone, cloned and clones). While many words that have gone extinct are somewhat self-explanatory, such as proper nouns that refer to specific past events, we were surprised by the extinction of the word cloning given that it is an ongoing topic of debate in public discourse today. This seeming disconnect between the use of the word in Congressional records and the use of the word in everyday language is what led us to focus on cloning.
2) Code:
# To start, we looked at the most commonly used word in each state
# For example, here is how we found the most commonly used words for Alabama
topAL = sll