console.table([...document.querySelectorAll('.fatitem table .athing')].map(el => [el.textContent.trim(), el.nextSibling.textContent.trim()]).sort(([,a], [,b]) => parseInt(b) - parseInt(a))) 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?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.
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.
Is showing green for me, so some people might be without power but most of the state is fine.
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.
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...
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...
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.
'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://paul.kinlan.me/use-bookmarklets-on-chrome-on-android...
A random intro to bookmarklets: https://betterprogramming.pub/are-bookmarklets-still-useful-...
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>')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.
Denver's also a big telecommunications and defense hub. Both industries employ armies of developers
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...Makes sense, otherwise entries would contain itself.
Thank you!
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/...
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)))