Guided Project: Exploring Hacker News Posts - The consideration of Hacker News

Hello all,
i have worked on my first guided project and would be very happy if you could have a look at it.

For me the project is the conclusion of the Python learning part.

I would be very happy about feedback.
Best regards :slight_smile:

exploring_hacker.ipynb (22.8 KB)

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

1 Like

@1sp34k2r0b0ts I really like your handle in 1337sp34k. Congrats :handshake: on completing your project. You’ve done a great job.

I’ve added a few pointers below, that will hopefully help to improve the project. (please click on the bullet triangles for the detailed explanation.)

Presentation Style
  • Include a proper introduction and conclusion section. They are especially useful to readers who want to a quick overview of your project and don’t have the time to read.
  • Add a link to where the reader can access the dataset, this should be available in the page where Dataquest introduces the project.
  • Seeing as this project mostly consists of terminal outputs and since you have yet to get in to visualizations, you could format your output with color or boldening. e.g The output for cell [6] could look like:
    The average number of ask comments is 14.04
    Check this for the same. This could help to differentiate your code from your output
  • You’ve done a great job highlighting some of your findings. These help the reader get through your analysis quickly.
Coding Style
  • I feel it is good practice that you round your outputs instead of outing the non-rounded values like in cell [15]. A simple numpy.round() should help with this regard.
  • You’ve done a great job with adding comments to your code, it’ll help when you attempt to re-do the project.
Bugs/Inaccuracies
  • I could not find any issues, but seeing as you’ve got most of the right outputs, I believe you have no issues.
Miscellaneous
  • Once you have got a hold on visualization. I recommend that you re-do this project and add a couple of visualizations.
  • Also you could look in to creating separate sections like Reading and Exploring the Data, Data Analysis etc.

Hope that review is helpful. You are doing a wonderful job :sunglasses: :+1: …keep doing what you are doing !

1 Like

Thank you very much for your feedback.
That helped me a lot.
I will definitely take the feedback with me to the next project. Thank you :slight_smile:

1 Like

Can you explain this set of codes?

for entry in range(0, 2):
    print(ask_posts[entry][1])
    print(ask_posts[-entry-1][1])
    
print('\n')
    
for entry in range(0, 2):
    print(show_posts[entry][1])
    print(show_posts[-entry-1][1])

Hey @madtitan,

in this code before, i have to filter all posts by their initial letters:

for post in hn:
    title = post[1].lower()
    if title.startswith('ask hn'):
        ask_posts.append(post)
    elif title.startswith('show hn'):
        show_posts.append(post)
    else:
        other_posts.append(post)

So i have to check, with:

for entry in range(0, 2):
    print(ask_posts[entry][1])
    print(ask_posts[-entry-1][1])
    
print('\n')
    
for entry in range(0, 2):
    print(show_posts[entry][1])
    print(show_posts[-entry-1][1])

if Ask HN: and Show HN: was added on the first and last two entries.
So i create a for loop with range 0 to 2 and iterate through ask_post[0][1], ask_post[1][1], ask_post[-1][1] and ask_post[-2][1] and the same with show_posts to get the following:

Ask HN: How to improve my personal website?
Ask HN: Why are papers still published as PDFs?
Ask HN: Am I the only one outraged by Twitter shutting down share counts?
Ask HN: How do you balance a serious relationship with starting a company?


Show HN: Wio Link  ESP8266 Based Web of Things Hardware Development Platform
Show HN: Parse recipe ingredients using JavaScript
Show HN: Something pointless I made
Show HN: PhantomJsCloud, Headless Browser SaaS

It should be noted that I have only created this for my own review. Basically this code serves no real purpose, it just shows me that the filter function works.

1 Like

Thank you for the prompt response. This is a really brilliant way and now I understand why you used -entry-1.

1 Like

thanks for posting @ 1sp34k2r0b0ts
I was stuck at counts_by_hour and comments_by_hour portion and ur notebook helped me to overcome that.
Also i dont know muc about how to use community. Its been 3 days that i have joined premium membership

1 Like

Hi Sumit,

Welcome to the Community! :partying_face:

If you are stuck on a certain data science concept or have a technical question, you can find useful our Q&A category to ask questions.

If you would like to share your guided or individual projects or review other learners’ projects, you can do it here.

Also, keep an eye on the Announcements & Guidelines section where you can read useful information about our Community, helpful guidelines, and news.

Finally, check from time to time the Community’s banner, at the top of each page, like this one:

Those are the freshest news of our Community! :star_struck:

Happy learning! See you around in the Community! :dizzy: