Farewell HNTrends

HNTrends was a fun little side project I worked on in 2009 to learn Flash and how to work with JSON data. You can read the original HackerNews post here, the second discussion here, and Fenin’s JavaScript port here.

Even though I haven’t worked on it for a long time, the site has been up and running (albiet a bit slowly due to the giant database).

Sadly, I need to use the hosting plan attached to it for something jMockups-related, so HNTrends will be no more.

Adios, amigo.

An Amazing JavaScript Port of HNTrends.com Using Raphael JS

I received the following email last week:

I am a fellow hacker-news reader, and just wanted to share with you this weekend project i did a few weeks back: hntrends.timepurge.com

This is basically a javascript (Raphaeljs) port of the flash frontend you have at hntrends.com.This was done as a personal learning exercise for Raphaeljs JavaScript library. There is a little python code at hntrends.timepurge.com/fetchdata that fetches your json data (Not set as a cron job. Just to create local snapshot manually).

Hope you like it.

My best wishes to you for the success of Preceden.
-Fenin.

With his permission, I’m posting it here for you all to check out. View it at hntrends.timepurge.com. To view the original version, visit hntrends.com.

It’s amazing how closely it resembles the original version. When I first loaded it I immediately right clicked the graph to ensure that I was actually looking at JavaScript and not Flash. I was showing off his version last night to a few folks at a Philadelphia Hackathon meetup and actually mixed up my site with his a few times because they look so similar.

A side by side comparison (click to view full image):

(With libraries like RaphaelJS and the advent of HTML5, you’ve got to wonder what the state of Flash is going to be in a few years. Outlook doesn’t look so good.)

Fenin, well done sir.

Comments on HackerNews here.

Six Months of HackerNews Front Page Data

Back in September 2009 I launched a small web app called HNTrends.com, a tool for visualizing the movement of stories on HackerNews’s front page over time.

I haven’t worked on the site much since then, but the script that logs the data has been diligently recording the front page submissions every 15 minutes since it started.

It occurred to me that a detailed analysis of the data might yield some interesting results such as how the site has grown since then, when is the best time to post a new submission, user participation rates, or some insight that changes the way we see the site. I offer it to you today so that you may analyze it to your heart’s content.

You can download it here (CSV, 13.4 MB zipped, 169 MB unzipped).

In total, the database contains 514,478 records spanning from August 31, 2009 to March 7, 2010.

A single line looks like this:

"1","http://paulgraham.com/kate.html","What Kate saw in Silicon Valley","129","albertcardona","2009-08-31 20:15:15","63","1","2009-08-31 23:15:15","796573","HackerNews","c18577"

Removing the quotes and splitting by comma, here is what each item represents:

  • 1 – Primary key
  • http://paulgraham.com/kate.html – Destination URL
  • What Kate saw in Silicon Valley – Title
  • 129 – Points
  • albertcardona – Submitter
  • 2009-08-31 20:15:15 – Approximate UTC submission time, calculated based on the time minus the age of the submission
  • 63 – Comments
  • 1 – Rank
  • 2009-08-31 23:15:15 – UTC time record was created
  • 796573 – HackerNews ID
  • HackerNews – Always “HackerNews”
  • c18577 – Color for display purposes

One final note: this database covers roughly 99% of the time period since it started. For a while the script broke whenever an article didn’t contain comment link, and every so often it goes down for miscellaneous reasons.

Introducing HNTrends.com

HNTrends makes it debut on HackerNews

HNTrends makes it debut on HackerNews

Cross-posted form the HackerNews thread:

The idea for HNTrends has been bouncing around in my head for about a year as one of those man-I-wish-I-had-more-free-time-type side projects. I recently decided to take up learning Flash and ActionScript and this seemed like the perfect opportunity to build it.

It’s fairly straight forward: A Python script scrapes HackerNews every 15 minutes and saves the data in a MySQL database. A PHP script queries the database and outputs the the last five hours worth headlines as neatly-formatted JSON data, which the chart grabs and plots.

The older, less trendy news items are rendered with a slight transparency in order to reduce the chart’s business. You can hover over any of the lines to see it in greater detail. Also, if you click any of the points it’ll take you to the comments. The links on the right take you to the actual news articles.

Hope you like it. Let me know if you have any suggestions

Launching is exhilarating.