1. Go to https://www.kaggle.com/ and sign in
2. Click Account
or navigate to
https://www.kaggle.com/{username}/account
3. Scroll down to the API
section and click
Create New API Token
(which should cause you to download a
kaggle.json
file with your username and API key)
4. Save the kaggle.json
file in a location
you can easily locate the path for such as the Downloads/
folder
5. Copy the kaggle.json
file to
~/.kaggle/kaggle.json
kgl_auth_file_setup()
that
takes the path of the saved kaggle.json
file and
copies it to the required directory6. Thats it! When calling any of the
kaggler functions the authorization function will check
for that file and create an environment variable,
KAGGLE_PAT
, in your .Renviron
file
usethis::edit_r_environ()