Guided Project: Hacker News Data Analysis guided project

Completed my Hacker News Project. Looking for feedback.

Exploring_Hacker_News.ipynb (4.8 KB)

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

Hi @MrB congratulation on completing yet another guided project.

Your project looks great. I personally liked how you have used code comments and created a little design to organise your code. But I am not sure if it is part of the best practices. Similarly the import as well.

Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.
PEP 8 -- Style Guide for Python Code |

You can read more about the best practices in Python from the above link.

Also it would be great if you could mention the Timezone in which you did the analysis and the local timezone you have mentioned there. I hope this helps.

1 Like

Thanks for the input, I normally do put them all at the top of a file. It felt weird in Jupyter as each block feels logically like a “file”. If you put them in the first block then it seems disconnected and you may end up with imports that you no longer need. Similarly, by putting them in the block where you will use them it’s obvious that you brought in a module and (imo) promotes readability.

Commenting is always free and generally cannot hurt. I would not hesitate to put comments wherever you think they might clarify your thinking. Having done some code maintenance in the past explanatory comments always help.

1 Like

Great to hear that @MrB . As long as you know what you are doing, its fine. In your case you do know the stuff. Please do omit my feedback.