Guided Project: Exploring Hacker News (newbies)

Hi all, this is Tim. This is my first guided project. Satisfying with the dataquest’s approach. Dataquest - Guided Project - Explore Hacker News Posts.ipynb (14.4 KB)

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

1 Like

Hi @Pak I have gone through your project and I want to say congratulations for completing the guided project.Having say that I have got few suggestions;

  • You need to add more weight on your introduction. Remember it’s through the introduction that the reader can really get to know what your project is all about.It’s therefore recommended to include the aim of your projects, and give as well information background of the dataset you are using.
  • The format you have used to display some of the codes also needs little of improvement for example;
counts_by_hour = {}   #num of ask post each hour
comments_by_hour = {}   #num of comments ask posts created each hour

for row in result_list:
    date = row[0]
    num_comment = row[1]
    date_object = dt.datetime.strptime(date,"%m/%d/%Y %H:%M")
    hour = date_object.hour
    if hour not in counts_by_hour:
        counts_by_hour[hour] =1
        comments_by_hour[hour] =num_comment
            else:
        counts_by_hour[hour] +=1
        comments_by_hour[hour] +=num_comment
print (count_by_hour)

with print () function , your output will be displayed horizontally, which to my view is not a good way to go.Instead you could have just call your dictionary name count_by_name
without the print () function and the output will be displayed vertically which is much easier to read.

  • Lastly you should also check on the comments, you have hardly used them in your code, same to conclusion.

Otherwise, everything looks good.
Happy learning!

1 Like

Hi Tim @Pak,

I don’t have much to add. @brayanopiyo18 has already given you almost all the details. For a project, it is important to have the introduction and conclusion.

This link can help you make your project look professional.

Also, regarding the print() function:
If the last command on any notebook cell is printable, Jupyter notebook renders it without print command and most of the time it looks better compared to the one rendered by print() command.

So if you have something like

swap_avg_by_hour

or

result_list[:2]

you don’t have to use the print() command. Just type as it is above and Jupyer notebook will show its magic.

One more thing to add is that, please do add the time zone for your results. The data was collected in EST, so 3 PM EST is the best time to post. Otherwise it might not make sense to people who are not in that time zone.

I hope this helps.

2 Likes