turbot/steampipe-mod-hackernews-insights

Dashboard: Hacker News Dashboard

This dashboard answers the following questions:

  • What are the max and average scores of recent stories?
  • How many Ask and Show HNs are there?
  • What are the average scores of Ask and Show HNs?
  • Which companies, languages, operating systems, clouds and DBs have been mentioned in recent stories?
This dashboard contains 6 cards and 1 input.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-hackernews-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select Hacker News Dashboard dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run hackernews_insights.dashboard.hackernews_dashboard --share

Queries

This dashboard uses the the following queries:
with ask_hn as (
select
to_char(time::timestamptz,'MM-DD HH24:00') as hour
from
hackernews_new
where
time::timestamptz > now() - interval '14 day'
and title ~ '^Ask HN:'
),
show_hn as (
select
to_char(time::timestamptz,'MM-DD HH24:00') as hour
from
hackernews_new
where
time::timestamptz > now() - interval '14 day'
and title ~ '^Show HN:'
)
select
hour,
count(a.*) as "Ask HN",
count(s.*) as "Show HN"
from
ask_hn a
left join
show_hn s
using
(hour)
group by
hour
order by
hour

Tags