User Guide

Getting Started

  1. Add the KAGGLE_KEY secret to your GitHub repository under Settings > Secrets > Add a new secret.

  2. Define a GitHub workflow by adding a .github/workflow/kaggle-graph.yaml to your repository using the template below:

name: Kaggle Graph Generation

on:
  push:
    branches: master
  schedule:
    - cron:  '00 00 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v2
      - name: Kaggle Graph Generation
        uses: OliverSieweke/kaggle-graph@v0.1.0
        with:
          KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
          KAGGLE_USERNAME: oliversieweke
          KAGGLE_COMPETITION_ID: titanic
      - name: Git Auto Commit
        uses: stefanzweifel/git-auto-commit-action@v4.1.6
        with:
          commit_message: Automatic Kaggle graph generation
  1. Add the graph to your README:

  • Markdown:
    [!Kaggle Submissions Graph](./kaggle-submissions-graph.png)
    
  • reStructuredText:
    .. image:: ./kaggle-submissions-graph.png
        :alt: Kaggle Submissions Graph
    

Note

  • The KAGGLE_KEY key can be generated on Kaggle under My Profile > Edit Profile > API > Create New Api Token.

  • The KAGGLE_USERNAME can be found on Kaggle under My Profile > Edit Profile.

  • The KAGGLE_COMPETITION_ID can be read from the competition’s URL.

Note

Kaggle Graph is designed to be used in conjunction with the following GitHub actions:

Configurations

The action can be further configured over the input keys below:

Name

Description

Required

Default

Type

KAGGLE_USERNAME

Kaggle username.

true

-

str

KAGGLE_KEY

Kaggle key.

true

-

str

KAGGLE_COMPETITION_ID

Kaggle competition ID.

true

-

str

GRAPH_NAME

Output graph file name.

false

"kaggle-submissions-graph"

str

Y_MIN

Y-axis minimum boundary.

false

-

float

Y_MAX

Y-axis maximum boundary.

false

-

float

SCORE

Score type.

false

positive

str (positive or negative)

OBJECTIVE

Score objective.

false

-

float

Troubleshooting

  • My graph does not update:

    GitHub seems to be caching images. Although the graph updates, the display may take a couple of minutes to reflect the change.