Political ad TV party: Obama loves '2 Broke Girls.' Romney? 'Andy Griffith.'

Mitt Romney may or may not secure the presidency of the United States, but he appears to be in an optimal position to win Mayberry.

"The Andy Griffith Show" is the second-most Republican-leaning program in the country, as measured by the partisanship of the political ads that run during its episodes. Only the Olympics saw a higher percentage of Republican ads, according to a Yahoo News analysis of the filings reported to the Federal Communications Commission by the TV stations in the top 50 media markets.

Since August, the FCC has required stations in the top 50 markets to report all the political ads they air, giving us some sense of when and where campaigns and outside spending groups are spending their cash.

I analyzed the raw text of 14,000 of these filings and extracted about 50,000 individual records of a campaign, super PAC or party committee purchasing advertising time on a specific show. In the following interactive, you can browse through any of the 86 shows that came up at least 25 times in the sample. Click the buttons to go up or down through the shows, or use the bottom button to choose a show at random.

"2 Broke Girls" swung the most heavily to the Democrats—surprising, perhaps, given that the title evokes Mitt Romney’s message that the economy is floundering under President Barack Obama’s stewardship. (It is not surprising if you consider the subject: single women.) "Judge Joe Brown" came in second.

Unfortunately, the light of 10,000 suns could not completely disinfect the reams of raw democracy on where and when these ads are running. The FCC does not require stations to file the information in a way that’s useful to people armed with computers. We’re left with about 30,000 PDF files, totaling nearly 150,000 pages—many of which were scanned sideways or upside down. Nearly half the files could not be read by an optical scanner or could not reliably be connected to the group that ran the ads.

This makes it difficult to know the raw volume of money and airtime. But even a sample of the data gives us a tremendous amount of information about which audiences the campaigns and their surrogates most want to reach.

Thanks to the saintly work of ProPublica, which uploaded all of these files to a site called Document Cloud, we have the raw text of the documents. I used a computer script to extract the names of television shows from that raw text (at least the computer-readable parts). As usual, the numbing methodology is included below.

Because of the intrinsic chaos, we should not think of this data as a scientific sample of all political TV ad purchases. The volume of purchases in the sample does generally match figures from the Federal Election Commission, however: The two camps are advertising roughly in the same amounts, but the Democrats spend more through the campaign while the Republicans rely more on outside groups. Officials at the FCC warn that there is some risk of double counting in these documents, given that stations interpret what they have to disclose differently.

Maybe in 2016 they could use computers.

I used a Predictable Information Elimination algorithm to extract the names of TV shows from the documents, the (messy) source code for which is available on my GitHub page. Thanks again to ProPublica and the Sunlight Foundation, who have done a lot of work to reliably connect each document to the campaign or group paying for the airtime. When the same show turned up multiple times in one document, it was counted multiple times, since this almost always represents two discrete ad runs.

Chris Wilson can be reached at cewilson@yahoo-inc.com

  • Peshmerga fighters enter Syrian border
    Peshmerga fighters enter Syrian border

    SURUC, Turkey (AP) — Iraqi peshmerga fighters began entering the Syrian border town of Kobani Friday night where they were expected to join the battle against Islamist militants besieging the town, activists said.

  • Groom Leaves Bride After Her Wedding Joke
    Groom Leaves Bride After Her Wedding Joke

    This apparent wedding joke did not go over well with the groom.

  • Iraqi peshmerga fighters prepare for Syria battle
    Iraqi peshmerga fighters prepare for Syria battle

    MURSITPINAR, Turkey (AP) — Iraqi peshmerga fighters prepared Saturday to battle Islamic State group militants in the Syrian border town of Kobani, just hours after they arrived in a town that's become a focal point in the battle against the extremists.

  • Fauci says quarantines a ‘disincentive’ for health care workers battling Ebola
    Fauci says quarantines a ‘disincentive’ for health care workers battling Ebola

    Anthony Fauci, director of the National Institute of Allergy and Infectious Diseases at the National Institutes of Health, told Yahoo News Friday that “blanket restrictions” on health care workers returning from West Africa could worsen the Ebola epidemic in the region.

  • Judge issues order enforcing Ebola isolation of defiant Maine nurse

    WASHINGTON (Reuters) - The confrontation between the state of Maine and a nurse who treated Ebola patients in Sierra Leone heated up on Friday when a judge issued a temporary order enforcing a quarantine after she defied state officials and took a bike ride. The order from Charles LaVerdiere, chief judge of the Maine District Court, instructs nurse Kaci Hickox to submit to "direct active monitoring," and "not to be present in public places" like shopping centers, movie theaters or workplaces except to receive necessary healthcare. ...

  • Africa asks: 'If Burkina can do it, why can't we?'
    Africa asks: 'If Burkina can do it, why can't we?'

    News that Burkina Faso's long-serving leader Blaise Compaore had been pushed out of power prompted an explosion of comment from across Africa Friday, with many citizens asking, "If they can do it, why can't we?" As images of tens of thousands jubilant Burkinabe were seen from Harare to Banjul, Twitter and other social media sites saw citizens pointing the finger at their own long-serving leaders. Viva Burkinabe!" wrote Kwesi Asante in Accra, Ghana. Some, like @lennoxin in Johannesburg, offered messages of support: "Super proud of the people of Burkina Faso, dictators have no place in the future of Africa, aluta continua!" (the fight continues).

  • Why this year’s candidates aren’t talking about the economy
    Why this year’s candidates aren’t talking about the economy

    Voters care about jobs and pay, but candidates are giving them abortion and same-sex marriage.

  • 6 Savvy Moves to Stretch Your Retirement Savings
    6 Savvy Moves to Stretch Your Retirement Savings

    You set aside part of your paycheck in either an employer-sponsored retirement plan or a retirement account that you set up on your own, such as an IRA. In a recent Wells Fargo survey of middle-class Americans, who had a median household income of $63,000, 70% of respondents reported having a company retirement plan.

Follow Yahoo! News