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

  • Italy awards world’s best pizza maker title to Australian chef
    Italy awards world’s best pizza maker title to Australian chef

    If you want to try the world's best margherita pizza, you'll have to head down under.

  • Professor: 'Game of Thrones' pic got me suspended

    PARAMUS, N.J. (AP) — A New Jersey professor claims he was suspended over an online photo containing a quote from "Game of Thrones" that he says a school official perceived as a threat.


    DEAR ABBY: I'm a 14-year-old girl with a problem. Because of my buzzed short hair, slim hips and flat chest, I frequently get mistaken for a boy. It really bothers me because, despite my haircut and body shape, I have a feminine face and I wear women's clothes and makeup. I'm not too much of a tomboy. Sometimes when someone addresses me with a male pronoun or in some other way mistakes me for a male, I'm too nervous to correct them. Is there a clever or witty way to correct the mistake? -- NOT A BOY IN BROOKLYN, N.Y. ...

  • Nigeria preacher: Healer or controversial leader?
    Nigeria preacher: Healer or controversial leader?

    LAGOS, Nigeria (AP) — It's Sunday, and 15,000 people are seated in the enormous arena-like church, fanning themselves against the dusty humid air in Nigeria.

  • Pot of Gold: Innovation Helps Cannabis Industry Flourish
    Pot of Gold: Innovation Helps Cannabis Industry Flourish

    DENVER — The legalization of recreational marijuana sales in Colorado is turning an underground industry into a big business — and ushering in innovations in everything from genetics to growing methods. "Every single day, someone is reinventing the wheel, so to speak," said Scott Reach, a cannabis breeder and owner of the Colorado-based seed company Rare Dankness. This 4/20 weekend, businessmen like Reach will be setting up shop in downtown Denver for the Official 420 Rally, a celebration of all things weed that's expected to be the largest in the city's history. Medicinal use of marijuana has been legal under Colorado state law since 2000, when voters approved an amendment to the state constitution allowing cannabis possession and use with a doctor's order.

  • Creeping landslide devouring part of Wyoming town
    Creeping landslide devouring part of Wyoming town

    JACKSON, Wyo. (AP) — What's happening in this Wyoming resort town might be better described as a land creep than a landslide, but the lack of speed has not hindered the sheer power of the moving earth.

  • Rand Paul and the Welfare Rancher
    Rand Paul and the Welfare Rancher

    The Nevada rancher’s escalating standoff with the feds raises a worrisome question: Can Americans’ relationship with their government—and each other—be saved?

  • Hamilton wins third straight F1 race at Chinese GP
    Hamilton wins third straight F1 race at Chinese GP

    SHANGHAI (AP) — Mercedes driver Lewis Hamilton captured his third straight Formula One race with ease on Sunday, leading from start to finish to win the Chinese Grand Prix.

Follow Yahoo! News