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? 'US: California', '10.87%'
'Canada', '5.79%'
'United Kingdom', '4.51%'
'US: Washington', '4.45%'
'Germany', '4.45%'
'US: New York', '4.32%'
'US: Colorado', '2.10%'
'US: Texas', '1.97%'
'US: Massachusetts', '1.84%'
'France', '1.78%'
The US in total makes up 49% of responses so far (even though it is nearly 10pm in most of Europe)Edit: quick and dirty one-liner to get the full table with relative values:
data = [...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)); total = data.map(a => parseInt(a[1])-1).reduce((a,b) => a+b, 0); console.table(data.map(a => [a[0], ((parseInt(a[1])-1)/total*100).toFixed(2) + "%"])); us = data.filter(a => a[0].startsWith("US:")).map(a => parseInt(a[1])-1).reduce((a,b) => a+b, 0); `US makes up ${(us/total*100).toFixed(2)}% of ${total} responses`
Edit2: made one-liner even dirtier to account for counts starting at 1Anyways, here's the current result in a pastebin: https://pastebin.com/fR89qMKk
https://news.ycombinator.com/item?id=30213991
https://news.ycombinator.com/item?id=30215244
Edit (this version subtracts 1 to see the real score and pops open in a new window):
javascript:open().document.write('<meta name=viewport content="width=device-width, initial-scale=1.0"><table>' + [...document.querySelectorAll('.fatitem table .athing')].map(el => ({place: el.textContent.trim(), score: parseInt(el.nextSibling.textContent) - 1})).sort((a, b) => b.score - a.score || a.place.localeCompare(b.place)).map(e => `<tr><td>${e.place}<td align=right>${e.score}`).join('') + '</table>')https://paul.kinlan.me/use-bookmarklets-on-chrome-on-android...
A random intro to bookmarklets: https://betterprogramming.pub/are-bookmarklets-still-useful-...
Also the UK and Germany being about the same is interesting. Germany does have a slightly larger population, but of course the UK is natively English speaking.
Also, given the new(ish) move to remote work that many firms nationally have begun to embrace there is also a strong showing here of people that work in Colorado, but for firms located elsewhere. This is my personal current situation, and I work with a guy who is moving here from the midwest in a couple months to work 100% remote. It's more and more common.
Only two people in my network of people I know lost power in Texas, one of which was a coworker's neighbor because said coworker's tree dropped a branch on the neighbor's overhead power delivery line.
Another week+ of 0 degrees would likely have not been as smooth...
Tried to access some dashboards that are supposed to show some data, but not sure if I can't access it because I'm not in the US/Texas or if it's down as well (because they don't have power?)
- https://www.ercot.com/gridmktinfo/dashboards
- https://www.ercot.com/gridmktinfo/dashboards/gridconditions
- https://www.ercot.com/gridinfo
Says "This request was blocked by the security rules" so I'm assuming it's the former.
https://stormcenter.oncor.com/
They show 7,073 customers affected by outages out of 3,835,901 customers served. That's 0.18% of customers affected.
Texas-New Mexico Power is another power delivery company in Texas.
https://www.tnmp.com/power-outage-map
They are showing 1,195 customers affected. They serve ~400k customers. So ~0.3% of customers are without power for that company.
Austin Energy is another power company in Texas, they serve pretty much the entire city of Austin so ~1M customers. They are reporting 24 affected customers. So 0.0024% of customers affected.
https://outagemap.austinenergy.com/external/default.html
The above poster is not right, and neither are you for suggesting some massive amount of the state is without power.
You shared lies and slandered a state suggesting its a third world country based on false data.
The difference is the US doesn't generally build or maintain infrastructure in a fashion commensurate with the extant risks here (which are different than those of e.g. Germany). Obviously, it is possible to keep a grid running when it is extremely cold outside, see the Nordics and Russia, for example. The US just makes systematic choices not to build & maintain to that standard.
Is showing green for me, so some people might be without power but most of the state is fine.
An interesting note is that Texas has its own power grid, more or less, and it isn't federally regulated.
more info: https://en.wikipedia.org/wiki/Texas_Interconnection https://slate.com/news-and-politics/2003/08/why-texas-has-it...
Denver's also a big telecommunications and defense hub. Both industries employ armies of developers
Large US states are more populous than most countries, and the US tech industry is orders of magnitude larger than most countries'.
If US weren't broken out, it would be a huge outlier at the top and wouldn't be nearly as interesting.
I don't know of any other country that would make the chart that much more interesting by being broken up.
console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => ({place: el.textContent.trim(), score: parseInt(el.nextSibling.textContent)})).sort((a, b) => b.score - a.score)) console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => ({place: el.textContent.trim(), score: parseInt(el.nextSibling.textContent)})).sort((a, b) => b.score - a.score || a.place.localeCompare(b.place))) javascript:document.write('<table>' + [...document.querySelectorAll('.fatitem table .athing')].map(el => ({place: el.textContent.trim(), score: parseInt(el.nextSibling.textContent)})).sort((a, b) => b.score - a.score || a.place.localeCompare(b.place)).map(e => `<tr><td>${e.place}<td align=right>${e.score}`).join('') + '</table>')It works on Chrome for Android.
console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.replace(/:.*/,'').trim(), parseInt(el.nextSibling.textContent.trim())]).reduce((d, [k,v]) => {d[k]=v + (d[k] || 0); return d}, {}))
I can't figure out how to sort that, though...Are you accepting PRs? If so, align=right. Thanks!
To see the sorted results: https://gabrielsroka.github.io/hnpoll.html?id=30210378
Source: https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...
Makes sense, otherwise entries would contain itself.
Thank you!
Source: https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...
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)))
JSON.stringify([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
console.table(Object.entries([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).reduce((rv, [a,b]) => {var key = a.split(": ")[0]; rv[key] = rv[key] || 0; rv[key] += parseInt(b); return rv;}, {})).sort(([,a], [,b]) => parseInt(b) - parseInt(a)))
'US' 959
'Canada' 114
'United Kingdom' 96
'Germany' 96
'France' 35
'Netherlands' 30
'Sweden' 30
'Poland' 24
'Brazil' 24
'Denmark' 19
'Switzerland' 18 US: California 535 / 39.51 Mil. = 13.54 / Mil.
Canada 244 / 38.01 Mil. = 6.42 / Mil.
Germany 232 / 83.24 Mil. = 2.79 / Mil.
UK 220 / 67.22 Mil. = 3.27 / Mil.
US: New York 206 / 39.52 Mil. = 5.21 / Mil.
US: Washington 199 / 7.71 Mil. = 25.81 / Mil.
US: Texas 122 / 29.15 Mil. = 4.19 / Mil.
There might even be some hidden champions in the lower absolute numbers. Sweden 74 / 10.35 Mil. = 7.15 / Mil.
Denmark 40 / 5.83 Mil. = 6.86 / Mil.
Finland 33 / 5.53 Mil. = 5.97 / Mil.
Norway 31 / 5.38 Mil. = 5.76 / Mil.
but nothing beats Vatican City 6 / 825 = 7273 / Mil.Employees there that I talked with had never noticed that for everything sourced outside Africa the outline and flag of that nation was displayed but for everything from Africa there was only an outline of Africa labeled as "Africa".
Geography is so important especially today with the ability to connect to anyone, anywhere in near real time.
The questions in the poll are so we know where the OP is from.
Happy to see both Dakotas have votes.
const totalPop = {"Oklahoma":3986639,"Nebraska":1963692,"Hawaii":1441553,"South Dakota":895376,"Tennessee":6975218,"Nevada":3143991,"New Mexico":2115877,"Iowa":3193079,"Kansas":2934582,"District of Columbia":670050,"Texas":29527941,"Missouri":6168187,"Arkansas":3025891,"Michigan":10050811,"New Hampshire":1388992,"North Carolina":10551162,"Ohio":11780017,"South Carolina":5190705,"Wyoming":578803,"California":39237836,"North Dakota":774948,"Louisiana":4624047,"Maryland":6165129,"Delaware":1003384,"Pennsylvania":12964056,"Georgia":10799566,"Oregon":4246155,"Minnesota":5707390,"Colorado":5812069,"New Jersey":9267130,"Kentucky":4509394,"Washington":7738692,"Maine":1372247,"Vermont":645570,"Idaho":1900923,"Indiana":6805985,"Montana":1104271,"New York":19835913,"Puerto Rico":3263584,"Connecticut":3605597,"Florida":21781128,"Virginia":8642274,"Massachusetts":6984723,"Illinois":12671469,"Mississippi":2949965,"Arizona":7276316,"Utah":3337975,"Wisconsin":5895908,"Alabama":5039877,"West Virginia":1782959,"Rhode Island":1095610,"Alaska":732673};
console.table(
[...document.querySelectorAll('.fatitem table .athing')]
.map(el => ({place: el.textContent.trim(), score: parseInt(el.nextSibling.textContent)}))
.filter(el => el.place.includes("US:"))
.map(el => ({...el, place: el.place.replace("US: ", "")}))
.map(el => ({...el, totalPop: totalPop[el.place]}))
.filter(el => el.totalPop != undefined)
.map(el => ({...el, density: el.score / el.totalPop}))
.sort((a, b) => b.density - a.density)
)$$('.score').map(node => [node.parentElement.parentElement.parentElement.previousSibling.innerText?.trim(), parseInt(node.innerText)]).sort(([,scoreA], [,scoreB]) => scoreB - scoreA)