What is this?

I wanted to challenge myself to make an aesthetically pleasing visualization.

I’m happy with the result. Overall, I’m most proud of the way I managed to make the bars dotted at the top when they go past the top of the plot. That let me cut off some of the taller bars to see the presidents better.

Rules for the challenge

  1. If I ever find myself thinking

    I could probably clean that up but ugh that would be annoying I’d have to rewrite the whole plot

    then I absolutely have to clean that up.

  2. There are no other rules that’s it that’s the whole thing.

Setting the stage

I’ve seen a few antitrust cases involving Big Tech companies in the news recently. Those articles make me curious how common antitrust cases are in general.

How many does the DOJ file each year? Are the numbers pretty consistent or are there large swings?

What does it look like?

The data

To get the data, I went to the website for the Antitrust Division of the U.S. Department of Justice, clicked “Filter by Case Open Date” in the left menu, and clicked “Show more.” That gave me a pretty clean list that I could highlight and copy/paste.

June 2023 (2)

April 2023 (1)

March 2023 (1)

February 2023 (2)

January 2023 (5)

2023 (11)

November 2022 (4)
[ . . . ]

I noticed some problems with this data.

For example, I found a Wikipedia article about U.S. antitrust law. That page refers to a case that happened in 1943, but my data doesn’t have any cases in 1943. I looked up the case (American Medical Association v. United States, 317 U.S. 519 (1943)) to see what the deal was. I think that case, like the current case against Meta, was filed by the FTC—not the DOJ. So this data is definitely not a complete record of U.S. antitrust cases.

There’s also at least one typo in this random menu on the DOJ’s website. For the annual count of all cases opened in 2022, they list the correct amount but they label it “2026” instead. I didn’t notice any other typos. I’m sure there are a few I missed.

That being said, this data is more than good enough for my goal. I just want to vaguely describe the trend of antitrust cases with a pretty plot.

Check out the code

I put this plot in a Streamlit app on Hugging Face. I also put my exploratory notebooks on GitHub.

Future Work

  • Scrape the DOJ’s website to make my own dataset since they don’t publish a copy of the database they clearly have.
  • Find data about antitrust cases filed by people other than the DOJ.
  • Group by Assistant Attorney General instead of President.
  • General exploratory time series analysis
    • autocorrelation & partial autocorrelation
    • decomposition (trend/cycle/season/noise)
    • moving averages