Indicators of Heavy Traffic on I-94 proyect

Screen Link:

My Code:

count1 = day.groupby(['traffic_volume','weather_description']).count()
count1
traffic_volume_5000_or_more = day[day['traffic_volume'] >= 5000]
count2 = traffic_volume_5000_or_more['weather_description'].value_counts()
count2

I was reproducing the weather types group by plots. After running the by_weather_description plot. there are 3 weather types where traffic volume exceeded 5000. However I wanted to show this in a chart. I wasn’t able to get out the correct chart. How can I do this?

1 Like

hi @paolagarcia0815

let’s see if I can help you. Instead of telling you what you have to do, I’m going to show what I’ve done (try) to understand your question and see what I’ve been encountering.

For the little information you give and making a parallel between what you need and what I have in my code the result is this:

traffic_daytime.groupby(['weather_main','weather_description'])

day[day['traffic_volume'] >= 5000]

I encourage you to try the different ways of graphing as I have done, investigate the type of data, I hope it has at least given you a clue to follow.

A&E

1 Like

Sorry, I’m really bad at reading.

Are you trying to plot count1 and count2? Or are you trying to replicate a plot from the solution notebook?

You can also upload your current notebook in your post, so we can see your whole code. Sometimes the problem comes from code written before, and the notebook can give us the context needed to understand if that’s really the case.

1 Like

Hi @paolagarcia0815,

If you feel that  your question was successfully solved, could you please mark the helpful answer as Solution? You can find here how to do it technically (in the GUIDELINE #5). Please consider this practice also for any other questions you might ask in the Community. This would be of great help both to your helpers and the other learners who can have the same questions in the future.

Many thanks and happy learning! 

:rotating_light: NOTE: This is an automated message. Please do not reply. :rotating_light:

1 Like