Finding your top Pinboard web sites

· 1233 words · Tweet this

Here’s a quick Node script that you can run against an exported JSON of your Pinboard bookmarks to find out which websites you’ve bookmarked most frequently.

You can download your JSON here, provided you’re logged in.

var fs = require('fs'),
    url = require('url'),
    count = {}, 
    topsites,
    FILEPATH = 'format_json.json',
    THRESHOLD = 3;

JSON.parse(
    fs.readFileSync(FILEPATH, 'utf8')
).map(function(item) {
    return url.parse(item.href).hostname;
}).forEach(function(site) {
    count[site] = (count[site] || 0) + 1;
});

topsites = Object.keys(count)
    .sort(function(siteA, siteB) { 
        return count[siteB] - count[siteA]; 
    })
    .filter(function(site) {
        return count[site] >= THRESHOLD;
    })
    .map(function(site) {
        return site + ' (' + count[site] + ')';
    }).join('\n');

console.log(topsites);

Two things you should change:

Save it as topsites.js or whatever, make the changes above, and run it in your console:

$ node topsites.js

Here’s what I got, with threshold set to 5 for brevity:

en.wikipedia.org (203)
www.nytimes.com (146)
www.amazon.com (121)
github.com (119)
www.flickr.com (104)
vimeo.com (95)
www.guardian.co.uk (71)
www.wired.com (62)
medium.com (54)
www.fastcodesign.com (51)
www.theatlantic.com (48)
www.youtube.com (46)
www.brainpickings.org (45)
www.newyorker.com (42)
www.smashingmagazine.com (40)
www.alistapart.com (29)
www.good.is (27)
www.underconsideration.com (27)
observatory.designobserver.com (27)
hilobrow.com (24)
www.fastcompany.com (23)
berglondon.com (22)
www.slideshare.net (21)
www.lukew.com (21)
www.slate.com (20)
www.reddit.com (20)
nymag.com (19)
ask.metafilter.com (19)
rhizome.org (18)
web.archive.org (18)
opinionator.blogs.nytimes.com (18)
stackoverflow.com (18)
flavorwire.com (17)
the99percent.com (17)
www.theawl.com (17)
observersroom.designobserver.com (17)
online.wsj.com (17)
www.sitepoint.com (16)
24ways.org (16)
www.nybooks.com (16)
www.bbc.co.uk (16)
www.google.com (15)
russelldavies.typepad.com (15)
imprint.printmag.com (15)
www.openculture.com (14)
www.subtraction.com (14)
www.theparisreview.org (14)
alistapart.com (14)
chronicle.com (14)
www.behance.net (14)
www.kk.org (14)
www.456bereastreet.com (13)
gist.github.com (13)
designmind.frogdesign.com (13)
www.theguardian.com (13)
code.google.com (13)
www.domusweb.it (13)
www.niemanlab.org (13)
lifehacker.com (13)
www.themorningnews.org (12)
craigmod.com (12)
www.aiga.org (12)
techcrunch.com (12)
www.metafilter.com (12)
tones.wolfram.com (12)
kottke.org (12)
thoughtcatalog.com (12)
thequietus.com (12)
radar.oreilly.com (12)
www.boingboing.net (11)
www.netmagazine.com (11)
www.itsnicethat.com (11)
developer.mozilla.org (11)
flickr.com (11)
www.readwriteweb.com (11)
www.eyemagazine.com (11)
booktwo.org (11)
www.cityofsound.com (11)
boingboing.net (10)
www.farnamstreetblog.com (10)
www.economist.com (10)
www.telegraph.co.uk (10)
css-tricks.com (10)
www.seriouseats.com (10)
meyerweb.com (10)
hacks.mozilla.org (10)
www.boston.com (9)
www.digital-web.com (9)
bygonebureau.com (9)
www.avclub.com (9)
aworkinglibrary.com (9)
www.esquire.com (9)
blogs.hbr.org (9)
www.creativereview.co.uk (9)
itunes.apple.com (9)
blog.frankchimero.com (9)
frankchimero.com (8)
blogs.suntimes.com (8)
www.npr.org (8)
www.marco.org (8)
thenextweb.com (8)
www.scientificamerican.com (8)
www.uie.com (8)
fontfeed.com (8)
www.w3.org (8)
www.archive.org (8)
addyosmani.com (8)
typographica.org (8)
worrydream.com (8)
adactio.com (8)
developer.yahoo.com (8)
www.adobe.com (8)
www.ft.com (8)
www.fontshop.com (8)
pitchfork.com (8)
content.stamen.com (8)
www.lensculture.com (8)
www.cabinetmagazine.org (7)
sethgodin.typepad.com (7)
gigaom.com (7)
www.designersandbooks.com (7)
bobulate.com (7)
www.html5rocks.com (7)
pinboard.in (7)
butdoesitfloat.com (7)
infovore.org (7)
www.laphamsquarterly.org (7)
www.ribbonfarm.com (7)
ejohn.org (7)
dashes.com (7)
speakerdeck.com (7)
www.creativeapplications.net (7)
www.etsy.com (7)
kotaku.com (6)
www.salon.com (6)
nplusonemag.com (6)
www.themillions.com (6)
io9.com (6)
www.swiss-miss.com (6)
www.taschen.com (6)
www.e-flux.com (6)
www.ibm.com (6)
bldgblog.blogspot.com (6)
snarkmarket.com (6)
uxmag.com (6)
www.stumbleupon.com (6)
www.informationarchitects.jp (6)
highscalability.com (6)
www.time.com (6)
badorgood.com (6)
changethis.com (6)
blog.eyemagazine.com (6)
www.scottberkun.com (6)
www.37signals.com (6)
www.mcsweeneys.net (6)
thenewinquiry.com (6)
twitter.com (6)
www.creativepro.com (6)
headrush.typepad.com (6)
designobserver.com (6)
www.fonts.com (6)
www.gyford.com (5)
places.designobserver.com (5)
zenhabits.net (5)
www.papress.com (5)
macwright.org (5)
www.ubu.com (5)
www.squidoo.com (5)
paulirish.com (5)
www.adaptivepath.com (5)
www.adbusters.org (5)
desktoppub.about.com (5)
fontsinuse.com (5)
englishrussia.com (5)
aeon.co (5)
www.tnr.com (5)
trentwalton.com (5)
www.last.fm (5)
www.huffingtonpost.com (5)
www.typotheque.com (5)
bits.blogs.nytimes.com (5)
www.codinghorror.com (5)
www.joelonsoftware.com (5)
www.aaronland.info (5)
www.scribd.com (5)
frozencanuck.wordpress.com (5)
www.stylusmagazine.com (5)
www.casualoptimist.com (5)
notes.pinboard.in (5)
dailyjs.com (5)
mattgemmell.com (5)
gizmodo.com (5)
tympanus.net (5)
www.ediblegeography.com (5)
www.microsoft.com (5)
www.buzzfeed.com (5)
edition.cnn.com (5)
www.frieze.com (5)
www.core77.com (5)
news.bbc.co.uk (5)
www.readability.com (5)
brettterpstra.com (5)
www.wired.co.uk (5)
www.theatlanticwire.com (5)
www.myspace.com (5)
www.ftrain.com (5)
www.stanford.edu (5)
www.theverge.com (5)
6thfloor.blogs.nytimes.com (5)
www.poynter.org (5)
www.boxesandarrows.com (5)
www.therestisnoise.com (5)
mashable.com (5)
www.quora.com (5)

Earlier: Using tabindex for keyboard events

Later: How to not break the web