Analyzing Heavy Traffic Indicators on I-94

I would appreciate feedback and changes in the project. Do a have look if you have any doubt and queries in the same project.

Analyzing Heavy Traffic Indicators on I-94.ipynb (698.6 KB)

Click here to view the jupyter notebook file in a new tab

1 Like

Hi Aditya,

Thanks for sharing your project with the Community. I liked your interesting observations throughout the project, great approach to emphasize the most important things, and doing some extra exploration of the data.

Here are some suggestions from my side:

  • When the project is already ready, it’s important to re-run it to have all the code cells in order and starting from 1.
  • A good practice is to import all the libraries in the 1st code cell.
  • There are some SettingWithCopyWarning in the project, I suggest you to fix them.
  • Be careful of typos.
  • Avoid too obvious code comments, e.g. # Import pandas library, # Creating ‘df’ DataFrame by using pandas. # Import matplotlib library to plot graph. Also, avoid adding an empty line after a code comment.
  • It’s better to combine adjacent code cells without any output or markdown explanations between them into one (the code cells [21]-[23], [31-33], etc.).
  • You can consider rounding output values (e.g. the code cells [42] and [45])
  • About visualizations:
    • Consider removing spines and ticks from the plots where they are not necessary.
    • Always add a title to a plot.
    • Since you have many plots of the same type, you might create a function for each plot type to optimize your code.
    • The code cell [57]. Instead of dividing the plot into 3 parts, probably it would be better to introduce vertical lines on the same plot and add the parameter alpha to regulate point transparency.
    • The code cells [64] and [66]: consider sorting the bars for better readability.

Hope my feedback was helpful. Happy coding!