Dashboard: Hacker News Sources
This report answers the following questions:
- What are the top 10 domains by number of stories?
- What are the top 10 domains by max score?
- What are the details of each story for a given domain?
- What are the max and average scores and number of comments for each domain?
This dashboard contains 2 inputs and 2 tables.
Usage
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/steampipe-mod-hackernews-insights
Start the Powerpipe server:
steampipe service startpowerpipe server
Open http://localhost:9033 in your browser and select Hacker News Sources dashboard.
You could also snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe dashboard run hackernews_insights.dashboard.hackernews_sources --share
Queries
This dashboard uses the the following queries:
with stories as ( select * from hackernews_new where $1 = 'New' union select * from hackernews_top where $1 = 'Top' union select * from hackernews_best where $1 = 'Best')select h.id as "ID", h.by as "By", to_char(h.time::timestamptz, 'YYYY-MM-DD HH24:MI:SS') as "Time", h.score as "Score", h.descendants as "Comments", h.title as "Title", h.url as "URL"from stories hwhere h.url ~ $2order by h.score desc
{ "$1": "story_type", "$2": "domain"}