Challenge 14 Megathread

I’m having intermittent connectivity too. Still. I tried restarting the browser with no luck, so I’ve just rebooted. VERY frustrating. I keep getting this messageL

#### Connection failed

A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.

I am having issues running my code as well. I have been having connectivity issues for three days now :weary:
It keeps telling me that the kernel has died and will restart automatically.

NOW I’ve submitted my answer, but I just get "LOADING…"

OK, I finally switched computers and still keep getting “kernel died” messages but managed to keep one alive long enough to input my answer. Finally got it but wasted MUCH too much time restarting the challenge page!

Is there possibly another way to access the notebook to do the challenge? I have been trying to get the program to do something, anything, for over an hour and I am still having connectivity issues. I don’t want to miss a challenge because of this. :sob:

Hi @ladyvankan,

I had some connectivity issues too. This is what I did:

  1. I downloaded the csv file
  2. I found the question and completed the challenge on google colab (a free online notebook)
  3. I submitted the answer on LHL’s notebook (the connectivity issues did not seem to affect submitting the answer)

The Question for Today’s Challenge (#14)

  1. Find the regions (variable regionName) which had the lowest amount (sum of trafficCount) of each light and heavy traffic during the year 2020. (one region for each classWeight)
  2. Using a bar chart, which month had the lowest amount of total traffic in 2020?
  3. What was the % of heavy traffic (using variable trafficCount) in New Zealand in 2020?

Where to Download the CSV File

The easiest way I think is to download it from my github. Today’s csv file is “nz_car_traffic.csv”. But all the csv files (up to today’s challenge, i.e. challenge 14) are up there. Whenever there is a new challenge, I (or someone else) will add the new csv file (if there’s a new file).
To download, click on Code and choose Download ZIP.

How to Upload the CSV to Google Colab

This is explained in the second half of this post:

Basically, you run this code:

from google.colab import files
uploaded = files.upload()

Then click on the upload button that appears, and choose the csv file you want to upload. This is a large file so it will take a few minutes (maybe 5minutes) to upload.

Then you run this code:

import pandas as pd
import io

# Replace EDIT_THIS_FILENAME.csv with the name of your csv file 
df = pd.read_csv(io.BytesIO(uploaded['EDIT_THIS_FILENAME.csv']))

Make sure to replace “EDIT_THIS_FILENAME.csv” with “nz_car_traffic.csv”.

Then you’re all set! If you are having trouble let me know or check out the original post I linked to. :grin:


Is it just me or is the “right” answer not the same as the solutions posted on the Notebook? They don’t seem to match on my end.

1 Like

Thank you, thank you, thank you!!! I’m in! :hugs:
And now, to complete the challenge…

1 Like

Thanks for preparing those questions to be solved by Python.
The difficult part is understanding the question correctly.
What would be the next after 21-day challenge?

1 Like

check two parts:

  1. Dataset
  2. Method you solve problem.

In retrospect, I see what I did wrong - I tried to eyeball the first question with grouped.head(40)

There is a deception there so make sure to use min() or idxmin() to not make the same mistake.

The hints were very helpful, the bar graph was easier to read than yesterday’s graphs. I liked today’s challenge a lot :slight_smile:


Hi all, I will be moderating the forum for the next 2 hours. Please let me know if you face any barriers in attempting to complete todays challenge. Also, please remember to not share any answers on this forum.


1 Like

I have the same feeling. Reading today’s challenge it said, “…combining the various functions…”.
I got the result but I don’t know if I achieve the objective using various combined functions.
It was the same amount of functions of everyday challenges.

Where can we view the recommended solution after completing the challenge?

If you open up the challenge again, and look just beneath the question, you should be able to see LHL’s solution code written there. For challenge #14, you can also find it if you ctrl+f “# SOLUTION”.

1 Like

On my end, the output from the solution code does not match the multiple choice answer that awarded points, is this just on my end? The month for the lowest traffic count, for example, is close but not the same.

Hmmm. My code gave me output that matched one of the answers, and when I submitted that answer it told me that I got the right answer.

Are you saying that your code doesn’t give you anything that matches one of the options?

Or are you saying that when you try LHL’s solution code, you get output that does not match up with any of the options? (I haven’t tried LHL’s solution code yet but I’ll try it now.)

The latter, I can never edit on the Notebook after the challenge is done (i.e., when I submit the answer(s)). But I’m looking at the answer that i was awarded points for and it’s not the same as the solution posted on the Notebook for today’s challenge.

I see. LHL’s solution matches the solution that I submitted (and that I was given awards for).

One possibility is that you thought you got awards for your solution but didn’t. Another is that you misinterpreted what LHL is saying that solution to question 2 is. Third possibility is that your notebook is somehow glitchy.

If you want, I’ll DM you (since you finished the challenge) with what LHL is showing the solution to be on my screen and we can compare.

1 Like