Poll: Where do you live?
71–80 of 563 posts
Re: Poll: Where do you live?
#72Pasting this in dev console will give you a quick and dirty rundown. It sorts locations by points. [...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)).map(a => a.join(' - ')) As of this post, California is leading, followed by other places w/ large tech hubs (Germany, UK, Canada, NY, Washington)
This is begging for a console.table console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
'US: California' '79 points'
'Canada' '48 points'
'US: Washington' '39 points'
'US: New York' '36 points'
'Germany' '35 points'
'United Kingdom' '34 points'
'US: Massachusetts' '19 points'
'Netherlands' '18 points'
'US: Colorado' '17 points'
'Sweden' '16 points'
Colorado #9? Really?Re: Poll: Where do you live?
#73This makes me want to create a house-swap service for HN users. Take a two week vacation in someones home (and them in yours) with the social contract established by your HN profiles
Re: Poll: Where do you live?
#74Re: Poll: Where do you live?
#75Earlier quoted context omitted.
This is begging for a console.table console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
Neat! Noob question: is there a similar way to dump it to JSON, instead of a table?
JSON.stringify([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
Re: Poll: Where do you live?
#76Earlier quoted context omitted.
This is begging for a console.table console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
Neat! Noob question: is there a similar way to dump it to JSON, instead of a table?
JSON.stringify([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
Re: Poll: Where do you live?
#77Why does America get states and UK doesn't get England, Wales, Scotland and Northern Ireland?
OP wanted to prove that HN isn't Silicon Valley-centric and instead showed their bias toward US-centrism :)
Re: Poll: Where do you live?
#78Re: Poll: Where do you live?
#79There were similar polls in 2013. We could compare against those to measure tech dispersal over the last decade! - "Poll: Where are you currently living?" (Countries, 2013) https://news.ycombinator.com/item?id=6582647 - "Poll: If you're in the US, What State Do You Live In?" (US states, 2013) https://news.ycombinator.com/item?id=5222370
I'd like to see these votes divided by the total population of each place