iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📊

Beyond Competitions: Publishing My MLB Data Analysis Notebooks on Kaggle

に公開

Introduction

When people think of Kaggle, they often associate it with competitions (machine learning contests). However, I recently learned that you can also publish data analysis notebooks that are unrelated to any competitions.

In my case, I had been creating a notebook in Google Colab to analyze MLB (Major League Baseball) pitching data. I decided to try publishing it on Kaggle, and to my surprise, it received more reactions than I expected.

In this article, I will share the process of publishing an analysis notebook on Kaggle and some insights I gained along the way.


The Published Analysis Notebooks

Using MLB Statcast data (detailed data such as pitch speed, movement, and release point), I analyzed the pitching tendencies of four Japanese pitchers.

# Pitcher Analysis Content
1 Yu Darvish Pitching evolution from 2021-2025 (trends in pitch type percentage and movement)
2 Shota Imanaga Evolution from his rookie year in 2024 to his second year in 2025
3 Kodai Senga Analysis of the "Ghost Fork" (FF vs. FO comparison)
4 Yusei Kikuchi Changes in slider usage rate from 2019-2025 (7 seasons)

All of these were analyzed using pybaseball + DuckDB + matplotlib/seaborn, and the versions executed in Google Colab were published on Kaggle.

Results

Two out of the four notebooks earned a Notebook medal (Bronze). The remaining two did not receive any medals.

Unlike medals awarded for competition scores, Notebook medals are determined by the number of upvotes from other users. It is a simple metric based on whether other users found your content helpful or interesting.


Publishing Steps

1. Prepare Your Notebook

You can use your existing .ipynb files from Google Colab or Jupyter Notebooks as they are. No special modifications are required.

2. Upload to Kaggle

You can upload your notebook via "Code" -> "New Notebook" on Kaggle.

If you prefer using the CLI, you can also publish it by creating a kernel-metadata.json file and running kaggle kernels push.

{
  "id": "your-username/your-notebook-slug",
  "title": "Your Notebook Title",
  "code_file": "your-notebook.ipynb",
  "language": "python",
  "kernel_type": "notebook",
  "is_private": "false",
  "enable_gpu": "false",
  "enable_internet": "true",
  "competition_sources": [],
  "dataset_sources": []
}

3. Regarding Data Sources

If you are using data from a competition, you specify the slug in competition_sources. However, if you are using external data (such as via an API), it is perfectly fine to leave this empty.

In my MLB analysis, I retrieved Statcast data via API using pybaseball, so I set enable_internet: "true" to allow data fetching on Kaggle. However, if your notebook takes a long time to run, it is more reliable to upload the notebook with the outputs already generated from your Colab run.

4. Publishing Settings

Set is_private: "false" to make it publicly available. This allows other users to view and run your notebook.


Insights Gained

There is Demand for Non-Competition Notebooks

It seems that Kaggle is frequented not only by competition participants but also by people looking to learn data analysis methods and how to use various tools. Sometimes, your work catches the eyes of people interested in specific fields, such as sports analytics.

Many Users Are English Speakers

Since the vast majority of Kaggle users are English speakers, writing your notebook title and markdown cells in English makes it more likely to be seen. If you write only in Japanese, it might be harder for others to find your work through searches.

Medal Acquisition is Unpredictable

I published four notebooks, resulting in two Bronze medals and two without medals. Even with the same format and quality, the outcomes differed. I feel that it depends heavily on timing and the relevance of the topic.


Summary

  • Kaggle can be used not only for competitions but also as a platform to publish your own analysis notebooks.
  • You can upload your .ipynb files from Google Colab or Jupyter Notebooks directly.
  • Receiving upvotes can lead to earning Notebook medals.
  • There are ways to leverage Kaggle even if you are not participating in competitions.

For those who engage in data analysis but find Kaggle competitions intimidating, publishing your own analysis notebooks is a very approachable starting point.


Published Notebooks:

GitHubで編集を提案

Discussion