Sitemap
Python in Plain English

New Python content every day. Follow to join our 3.5M+ monthly readers.

Member-only story

Quick Success Data Science

Exposing Bias in IRS Audits Using Python and Plotly Express

Why they target the poor and how to fix it

7 min readJul 18, 2024

--

Press enter or click to view image in full size
An imagined Nineteenth-century editorial cartoon of government agents collecting taxes on a poor farm.
Collecting taxes on a poor farm by DALL-E3

According to IRS chief Charles Rettig, the US Treasury loses $1 trillion in unpaid taxes every year. Most of these unpaid taxes are the result of evasion by the wealthy and large corporations. To address this, the Inflation Reduction Act of 2022 included almost $80 billion for Internal Revenue Service modernization and increased tax enforcement.

Despite the stated goals, news agencies began reporting that as many as 87,000 new auditors and agents would be hired and that they would go after the poor and middle class, rather than rich individuals and corporations. As the debate raged on cable news, opposing sides quickly grouped into partisan camps, with each accusing the other of spouting misinformation and “fake news.”

If you’re a data scientist, you’re not at the mercy of the pundits. You have the power to answer these types of questions for yourself, using facts, Python, and a few third-party libraries. In this Quick Success Data Science project, we’ll use IRS data to map some of the agency’s historical audit behaviors. You may be surprised at the results.

Key Programming Subjects Covered

--

--

Lee Vaughan
Lee Vaughan

Written by Lee Vaughan⁠

Author of “Python Tools for Scientists,” “Impractical Python Projects,” and “Real World Python.” Former Senior Principal Scientist at ExxonMobil.

Python in Plain English
Python in Plain English

Published in Python in Plain English

New Python content every day. Follow to join our 3.5M+ monthly readers.