Learning Python from Scratch and Following the Money in Politics with LobbyingData.com

LobbyingData.com homepage with a callout to “Follow the Money”

With LobbyingData.com you’re able to follow the money in politics in real-time, learning who is lobbying the U.S. government, how much they spend on it, and potentially the exact legislation and specific issues they lobby on.”

LobbyingData.com is the result of increased downtime during the Pandemic + my obsession with U.S. lobbying.

There is continual debate as to where the term “lobbying” originates from. The word lobby, used as a noun, finds its roots in the Latin word lobium, which means “gallery”. Those who lobby are lobbyists, taking the name from the custom of doing business in a lobby. A lexicographer from the Oxford English Dictionary has indicated, in a report outlined by the BBC in 2008, that “lobbying” originates from the public being able to meet their representative Members of Parliament in the lobbies of the United Kingdom’s House of Parliament prior to and after parliamentary debates.

The more widely accepted origin story of the term lobbying is that it comes from the 18th President of the United States Ulysses S. Grant’s alleged private dealings with special interest groups in the lobby of the Willard Hotel in Washington D.C.

For my thesis at Johns Hopkins SAIS, I wrote a paper called “Pulling the Strings: American Lobbying”. In the paper, I aimed to quantify the most important value drivers of a lobbying contract. Specifically, the hypothesis of the research was to determine if who you know is more important than what you know in the context of Political lobbying.

Based on a sample of every lobbying contract in history between 2000–2018, I found with statistical significance that a lobbyist working on a lobbying contract who was a former member of congress increased the price of the lobbying contract by 20.4%, and a lobbyist who was a specialist in a given field/industry increased the price of the lobbying contract by 2.95%.

The most impactful part of the project came from the modeling of the data — the most time intensive portion of the project came from the actual sourcing and cleaning of the data. It took a LOT of time to get the hang of working with lobbying data.

Signed into law in 1995, the Lobbying Disclosure Act, which mandated that lobbying firms submit detailed reports on their activity, was intended to make the lobbying industry more transparent, but how transparent are lobbying filings when you need to be a data scientist to understand what’s going on? I knew there was tremendous value that could be extracted from the data, especially since hundreds of companies were teasing new technologies, asking for government loans, and bidding for contracts in their lobbying filings.

Although publicly available information, data on lobbying is complex, unstructured, and very difficult to extract useful information from.

Due to my training in Economics, I only knew how to code in a language called STATA. In order to create a valuable resource for people to extract insights from lobbying, I knew I had to learn how to automate data cleaning and distribution. This led me to Python!

In July 2020, I had little idea on how to do a “for loop” in Python. By October 2020, I had finished developing a program that would automatically download lobbying data each morning, clean the data, create a set of easy-to-understand tables summarizing the data, and send the tables out via email to anyone who chose to subscribe — I called this “Daily Lobbying Data”. From October to December, I relived the work schedule of my “Investment Banking Summer Analyst” internship position I used to have by easily spending 12+ hours a day working from morning to midnight. Somehow, for LobbyingData.com I felt I had infinite energy to continue working — it’s because I loved what I was doing. From learning data science and writing the code for “Daily Lobbying Data,” to designing the logos and branding and creating the website from scratch, I felt more and more energized as time went on.

The more I learned about programming and data science, the more I was able to improve “Daily Lobbying Data,” continually making a company’s lobbying activity easy for anyone to understand. Conversely, the more I learned, the more I realized how little I knew (the ultimate programmer’s dilemma!). I have grand ambitions for the future of the company, and I understand that the product could be much more valuable as a public good.

The state of the world during the COVID-19 pandemic makes the study of lobbying especially important as companies which have never lobbied or have rarely lobbied are beginning to seek council from the nation’s top lobbying firms. This is why it’s important to track who is lobbying and stay informed.

LobbyingData.com aims to help you follow the money in politics in real-time, offering data and daily reports on lobbying that almost anyone could understand. Now, we can see who is lobbying, how much they spend on it, the government agencies they contact, and even the exact legislation and specific issues they lobby on — in just a glance!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store