Open tsp2123 opened 6 years ago
Finally I got some graphs after doing some fancy tfidf / pca stuff (not really that fancy, just trying to relearn Stray's algorithms hw)
The first graph shows the term frequency - inverse document frequency of senators' statements on Kavanaugh while coloring in for party
If anything this graph is a visual representation of the polarization of the courts, which pundits have been bangin on about. Okay, but now let's split and see how these senators are likely to vote.
blacks are unknown, shades of red are Yes / Likely Yes. Shades of blue are No / Likely No.
Now let's try by gender (I'm sorry for the color choice, this was some quick work and I promise to change to less cliche colours for the final...so dont hang me.
Interesting kind of? Well it's interesting to see who those unkowns are/ there are two dots up in parallel which I think are female republicans. I'm trying to figure out a way to label the scatter by name but I cant really wrap my head around the code to do it
Delete this line and explain any changes you've made
Delete this line and complain about any problems you've run into (solved or unsolved)
labels? frequency of what? is this when these senator's are making statements about him? you've managed to get this far in the intensely cerebral approach of j. stray....but i do not know what i am seeing. i wish i did!!
congrats on getting this far.
Please complete all of the following sections, or the ghost of Joseph Pulitzer will spookily dance around your issue! A completed version of this template can be found at https://github.com/jsoma/data-studio-projects/issues/1
Pitch
Brett Vanaugh's confirmation hearings start early next month. Perhaps one of the most controversial and polarising Supreme Court candidates in recent years, I think it would be interesting to visualize, what US senators actually think of Senator Kavanaugh. Will Republicans refer to him as a "family man" while Democrats bring up "Roe v. Wade" ? How does the gender of candidates affect what they say about him? Let's find out using Stray's TF-IDF analysis stuff!
Summary
I'm going to be using data compiled by the good people at Scotus Watch. The json api isn't the most up to date. But hey, this is classwork, and thank god somebody is scouring the web for what Senators have to say about Kavanaugh
Details
Possible headline(s): What Do Senators Think of Bret Kavanaugh? (creative heds are clearly not my thing, let's wait till some analysis is done) Data set(s): http://www.scotuswat.ch/index.json What Do Senators Think of Bret Kavanaugh? Code repository: there's literally nothing in this file greater than 100mb but github still doesn't want to upload it. Possible problems/fears/questions:
I'm still trying to make my dataframe work. I'm having a slight issue using the json to compile every statement on Kavanaugh into one row per senator. For whatever reason when I print the statements in my for loop, I can get all the statements, but when I then try and convert that same for loop into spitting the information out into a column / row, I'm stuck with only the first statement for each senator, which isn't the breadth of data that I want.
Work so far
Still in data cleaning mode, unfortunately. So cant show anything fancy here.
Checklist
This checklist must be completed before you submit your draft.