Wednesday, May 22, 2019

Awk, Awk!

No, not the sound of a large bird.  I am trying to separate the columns of a csv file.  It does okay until I hit a line with comas inside the quotes.  Here is the command:
awk -F"\"*,\"*" '{print $1,$4,$5,$9}' USATodayList.csv
 Here is a line that it does not behave on:
58,Apr  3 2009 12:00AM,13,Binghamton,NY,N.Y.,42.0986867,-75.9179738,"Wearing a bulletproof vest, Jiverly Wong, 41, entered a citizenship class and fired 98 shots from two handguns. Wong killed 13 people and injured several more before shooting himself.",Shooting,Public Killing,Y,Y,,,,
Field 9 stops after 
Wearing a bulletproof vest
Would it make sense to replace all the "," strings with | and use that as the field separator?

Tuesday, May 21, 2019

Things I Was Not Expecting

Watching original Outer Limits and there is a black female physician. In a 1963 TV show.

Yes, Racism is Alive and Well During the Trump Administration

5/20/19 Tennessean:
Emanuel K. Samson, the black man suspected in a 2017 mass shooting at an Antioch church, went there “with the intent to murder a minimum of 10 white churchgoers,” a prosecutor said Monday.
During opening statements in the trial against Samson, Deputy District Attorney Amy Hunter said he left a note on the dashboard of his vehicle explaining his plans to retaliate for a 2015 church shooting in Charleston, South Carolina, when white supremacist Dylann Roof killed nine black worshipers.
But another explanation.  4/16/19 Tennessean:
Emanuel K. Samson, the suspect in the Antioch church shooting that killed a woman in 2017, has mental diseases stemming from a traumatic childhood that included abuse and intense bursts of violence, a psychiatrist said in court.
Dr. Stephen Montgomery, a psychiatrist and professor at Vanderbilt University Medical Center, diagnosed Samson, 27, with "schizoaffective disorder bipolar type" and post-traumatic stress disorder. Samson heard voices, hallucinated, had intense mood swings and held “delusional beliefs” about predicting the future and controlling people with his mind, Montgomery said.
He failed to commit mass murder, but it sounds more like stupidity than lack of attempt.

Monday, May 20, 2019

Would You Like to Help With My Mass Murder Project?

I have one research assistant doing a spectacular job digging through old newspapers, but I would like to finish this project before the propagandists win.  USA Today published an amazing collection of mass murders for 2006-2017.  Not just firearms mass murders, but even the 1/4 not involving guns.  What I need is someone to mouse over each bubble on that chart and find independent coverage of those events and give me a list of perhaps the first 10 URLs associated with that mass murder.  I can afford to pay $10/hour for your contribution to a piece of scholarship that will likely play a significant role in subverting the CNN paradigm that mass murder is a gun issue.

It might be possible for some clever person to write a program to mine the data from each bubble and search the web for capitalized words (typically city names and victim/perpetrator names) and automatically produce the search string to find URLs.  (I say might, because examining the HTML shows a lof of Javascript calls that may be resistant to interrogation.  Before the stroke I would have tried this myself.)  Necessarily, this would be a less than perfect way to find matches, but it would be faster to check each URL than to read each bubble and search by hand.  If you are sufficiently skilled to write a program to automate this process, I would gladly pay for your hard work on this mildly interesting piece of coding.

UPDATE: One of my readers managed to extract the data as a spreadsheet.  Still some work to chase down newspaper reports, but I now have a chance of automating the search!  I now have 362 records, many of which have a name, and all have a city, state, and date.  Now I need to figure out how to automate the search.

If anyone would like to suggest a strategy, the Excel spreadsheet is here.

UPDATE 2:  I am thinking awk to separate the description column and the city; egrep to extract all proper nouns (names of murderers, victims, and school or business) and then some magic to feed each set of keywords to a search engine.

Sunday, May 19, 2019

Next Semester

I am teaching American History at CWI online.  No commute, no worrying about mass murder, no battles with my voice.  A big win.

Every Rape Report Needs to Be Investigated

But the same standard of proof applies as it does for any other crime.  5/19/19 The Smoking Gun reports on a case where the victim later admitted that she made it up, but not before someone was killed in self-defense, after she claimed someone banging on her door sounded like her (non-existent) rapist.

The New Democratic Party Electorate?

5/18/19 Red State reports that DC Comics sent a cease-and-desist letter to a publisher of a comic book starring a very Wonder Woman like member of Congress.  The title? Alexandria Ocasio-Cortez And The Freshman Force. Issue #1, ‘New Party: Who Dis?

So are they really counting on 10 year old voters?  And aren't the native speakers of Ebonics already trustworthy Democrats (assuming that they vote at all)?  Occasional-Cortex must be (at least behind closed doors) the most embarrassing Member of Congress to adult Democrats.