This project involves an exploration and analysis of two types of posts from Hacker News: Ask HN
and Show HN
. The goal is to compare these post types and identify patterns in terms of comments received and the best time for post creation.
Hacker News is a popular platform for sharing and discussing tech-related content. Users can submit posts to ask questions (Ask HN
) or showcase projects/news (Show HN
). In this project, we analyze the following aspects:
- Do
Ask HN
orShow HN
posts receive more comments on average? - Is there a specific time window when
Ask HN
posts tend to receive more comments?
The project uses a dataset containing a subset of Hacker News posts. The dataset has been filtered to include only posts with comments. Each post's attributes include ID, title, URL, points, comments count, author, and creation timestamp.
- Data Loading: The dataset is loaded from a CSV file, and headers are removed.
- Categorizing Posts: Posts are categorized as
Ask HN
,Show HN
, or others based on their titles. - Comments Analysis: We calculate the average number of comments for
Ask HN
andShow HN
posts. - Time Analysis: We analyze the number of
Ask HN
posts and comments by hour of creation. - Average Comments by Hour: The average comments for
Ask HN
posts are calculated for each hour. - Results: The hours with the highest average comments are highlighted.
Based on the analysis, it's recommended to create Ask HN
posts during the 15:00 - 16:00 (3:00 pm - 4:00 pm EST) time window to maximize engagement. These posts tend to receive the highest average comments during this period. Overall, this project provides insights into user engagement on Hacker News and showcases the power of data analysis in identifying trends.
To explore the analysis process and findings, take a look at the Jupyter Notebook here.
Contributions are welcome! Feel free to open issues or pull requests for any enhancements or suggestions.
This project is licensed under the MIT License.