[Python] — Extracting Nike Run Club Data — Rating my performance

Alex
7 min readJul 28, 2024

--

(Se desejar Clique Aqui para ver a versão em português)

(If you like Click here so you can read the portuguese version)

My main goal is to use my knowledge of data analysis to rate my runs (and see some way to improve myself)

I was always an addicted to sports, soccer, futsal,volleyball, basketball, handball..(keep going here lol). Nowadays running on the street became one of my focus tasks, something fun and mainly something really challenging.

Since 2021 l’ve been tracking my runs but all of them with some gaps of days and with dfferent results and goals (sometimes just running without a goal, just for fun) and all of them on the street, taking some fresh air (l’m not a huge fan of treadmills). To measure my performance on the runs l’ve been using the NRC (Nike Run Club) App, but on the app i was noticing a lack of some reports that l could use to analyze my informations, understand my behaviors on the activities, with that in mind l’ve made some researchs on github and l’ve found a way to get these data❗️.

2~3 years for now l’ve became an data analyst which my main goal as one is to identify crucial topics or improvement points to help my stakeholders to take some action, always based on DATA never on my or someone assumptions of something. So why not use this same logic for my own sake, who knows, see some manners to improve myself. So let’s get started!

Let’s try it out? Let’s Code!!

Data Extraction:

For any analysis, the most basic and essential item we need is: Data, but Nike does not officially provide this information. So, what do we do now?

Doing a quick web search (something like “nike run exporting data” or similar), I found a way using a program called nrc-exporter (created by Yasoob KhalidGithub), which exports the data to a local folder/directory. Here are some requirements before we extract the data:

  1. Go to the Nike website and log in.
  2. Once logged in, right-click anywhere on the page and click on the inspect button.

3. Look for Application

4. Go to Local Storage — nike.com — and then copy your “access_token”.

Now, open your terminal in your interpreter (here I’m using PyCharm to run my Python scripts), just execute pip install nrc-exporter in your terminal first, and after installation, just open your terminal again and run the following command:

nrc-exporter -t token. (Replace the word token with the token copied from the Nike website)

You will see the execution and the data being downloaded in the same directory as the script execution

Message of results achieved

And that’s it! The data will be downloaded in a folder called Activities. The data will be available in .json format (for manipulation in Python, it is interesting to use the json_normalize function, or you can insert it into a Power BI file and similar tools).

For this analysis, I chose the following metrics:

  • Pace: (Average time taken to run 1 km)
  • Calories: (Estimated calories burned during the activity)
  • Speed: (Average speed during the activity)
  • Distance: (Distance covered)
  • Date: (Activity date — Initially, the data comes as epoch, I used the DateTime library to transform the data)
  • DaysOffRun: (Column calculated by me, the difference in days between one run and another)
  • Weather: (Weather condition during the activity)

DATA EXPLORATION (EDA)

Now that we have the data in hand, we can move on to the fun part!

To facilitate data analysis, I will perform data exploration on Google Colab (so you can check the code used via GitHub, here is the link).

Database after treatment considering the mentioned variables

To start, some descriptive statistics:

General Information

I analyzed a total sample of 107 runs, distributed from the year 2021, with the number of runs performed per year being: 2 (2021), 12 (2022), 61 (2023), and 32 (2024). Therefore, all these runs totaled 426 km covered, with an AVERAGE of 9/10 days between runs, where today, I aim to reduce this to 2/3 days.

Graphical Analysis:

Greater presence of runs after October 2023

After October 2023, I decided to really get back to running more regularly and with much more dedication, which is reflected in the numbers from that period onwards.

There is a higher participation in the data in 2023 because, especially post-COVID, I decided to resume my physical activities, very focused from the end of 2023 to now.
Despite the increase in runs, there is a noticeable gap in the consistency of my runs, with gaps of 1/2 months between runs, looking at the LONGEST time I went without running each year.

With the two points above, I have an initial perception that I increased the number of runs and the effort related to it, but there is still a gap in the consistency between one run and another.

Exploring the consistency topic and adding the weather factor to the run: Around 70% of my runs were performed under cloudy/night conditions, meaning there is a preference for running at this time (here I confess, it’s a mix of preference because I leave daytime for studies and the night is more pleasant to run).

Despite some consistency issues, I have improved my effort in reducing the pace.
One of the main points was to challenge myself to 10 km, and I achieved it in 2024!!

Seeing this information, I decided to explore the relationship between these numbers and the weather condition. As expected, the longest distances achieved by me were again in cloudy/night conditions.

Looking at the same relationship for Pace vs. Weather:

In summary, my best runs were made at night (maybe it’s time to challenge myself and change that)

Validation that: The longer the distance, the more calories burned, so for my weight loss goal, increasing the running distance is an ideal plan.

Most runs are between 4 ~ 8 km, with an outlier at 10 km (these are 2 runs where I challenged myself to run a little beyond in 2024, and I need to continue!!) and finally, the last graph shows the evolution of my pace, distance, and speed over the time I’ve been running.

From this last graph, it is possible to identify an improvement in my pace at various moments, especially from 2023 to 2024. However, it is even more evident the lack of consistency with many fluctuations. Average speed was another item that improved due to the training I’ve been doing to improve endurance and speed, and finally, the distance has been increasing, especially from 2023 to 2024.

CONCLUSION:

  1. About 70% of the runs are performed in cloudy/night conditions, it is suggested to better divide this point (since my goal is to participate in a race in the future, and it can happen at different times).
  2. My training can be focused on running more than 7 km, as one of my goals is to gain endurance/lose calories and gradually increase my performance.
  3. 🌟 The main point where I have a deficit is consistency, there is a big gap between running days, whether looking at the average or the longest time between runs.

FIX TOPICS:

In summary, they are:

  1. Increase the running distance.
  2. Diversify the running times (since I also have the goal of running some races).
  3. Reduce the gap between non-running days.

This was the proposed analysis of my NIKE RUN data. I hope you liked it (suggestions and constructive criticism are welcome ⭐️). If you perform the same analysis, share it with me, I will be happy to see your vision with your indicators!!

See ya!

--

--