Artificial intelligence continues to be the dominant topic in so much of our lives – particularly in the computer industry, where developers are rapidly moving away from writing code directly, and toward having AI write code on their behalf. I was recently told about a paper by Fiona Chen and James Stratton, two Harvard economists, "Artificial Intelligence in the Firm: Bottlenecks in Software Production," that analyzed the use of AI among software developers. The paper (https://fion.ac/jellyfish.pdf) depended on data from Jellyfish, a firm that analyzes the productivity of software-engineering teams.
Sadly, the data used in this paper isn't publicly available. But I was curious to know if, and how, software engineering has changed in the age of AI. Fortunately, researcher Hao Li from Queen's University in Kingston, Ontario, Canada (https://leo-lihao.github.io) has put together a data set based on GitHub. It's publicly available, and will allow us to look at the use of AI on popular GitHub projects -- and thus get some insights into the rise of AI, which AI systems are being used, what kinds of projects are getting AI-written PRs, how often those PRs are merged, and how quickly that happens.
Data and five questions
The data comes from Hao Li's data archive, which is stored on Hugging Face (https://huggingface.co/hao-li). We'll look at the 7.6M version of the data (https://huggingface.co/datasets/hao-li/AIDev-7.6M). Specifically, you'll only need a handful of files, all in Parquet format:
- pull_request.parquet (362 MB). PRs in repositories with more than 100 stars, with created_at, merged_at, closed_at and the agent.
- pr_reviews.parquet (212 MB). Each review's state and submitted_at, for time to first review and time to approval.
- repository.parquet (1.5 MB). Language and stars for each repository.
- pr_timeline.parquet (1.1 GB). Event sequences such as review requested, approved and merged.
These files are too big for me to send with this message, so I'm afraid that even paid BW subscribers will need to download them from Hugging Face.
Paid subscribers, both to Bamboo Weekly and to my LernerPython+data membership program (https://LernerPython.com) get all of the questions and answers, as well as downloadable data files, downloadable versions of my notebooks, one-click access to my notebooks, and invitations to monthly office hours.
Learning goals for this week include: Parquet files, joins, plotting with Plotly, grouping, dates and times, and cleaning.
Here are my five questions and tasks for this week. I'll be back tomorrow with my solutions and explanations.
- Read all four Parquet files into a Pandas data frames. Which project had the earliest pull request in the data set? Who made that pull request?
- What proportion of pull requests were closed? On average, how long did it take for a PR to be created, merged, and then closed?