Live data from Hacker News

Poll: Where do you live?

news.ycombinator.com

241–250 of 563 posts

Re: Poll: Where do you live?

#242
post #10

I hope there is someone who knows how to code in this community to parse the results and do a nice visualization. I have a cousin who knows about computers, if noone knows here how to do it, I can ask him to try. He always helps me with my printer.

This made me almost spit out my tea, well done :)

Re: Poll: Where do you live?

#245
post #36

Earlier 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)))

Current top 10: '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?

Google and Amazon have a pretty big showing in Denver/Boulder area and Apple's expanding an engineering office here.

Denver's also a big telecommunications and defense hub. Both industries employ armies of developers

Re: Poll: Where do you live?

#246
post #99

Earlier quoted context omitted.

Canada is smaller than California.

By land area Canada is about 20 times as large as California, by culture I'd consider Canada to have a few much more distinct areas than California (comparing Toronto vs. Vancouver vs. Calgary the distinctions are pretty close to the range you'd get across the whole of California by my opinion - with Quebec being radically different... Quebec is less like Vancouver than Texas or Mississippi is like California). By po…

Thank you for stopping at Bangor, parts of Maine south of there are Northern Massachusetts!

Re: Poll: Where do you live?

#247

It's Friday night in Europe. Results will be skewed towards countries that aren't yet drinking, i.e. the US and Canada. A simpler and way more accurate thing to do would be to ask mods to just tally up visits of logged uniques over one week and share the aggregates.

That reminds me to open the beer! Lucky I voted first though.

Re: Poll: Where do you live?

#249
post #10

I hope there is someone who knows how to code in this community to parse the results and do a nice visualization. I have a cousin who knows about computers, if noone knows here how to do it, I can ask him to try. He always helps me with my printer.

Just do it in Bash, of course! Take the poll andcopy/paste it directly into a file called 'hnpoll', then run

   sed -e ':a;N;$!ba;s/\n/ /g' -e 's/points/,/g' -e 's/point/ ,/g' -e  's/,/\n/g' hnpoll | awk '{ print $2 " "$1 }'  | sort -n | grep ^[0-9] | tail -n 20
12 Finland

12 Serbia

13 Norway

13 Romania

15 Belgium

15 Israel

15 Spain

16 Austria

19 Switzerland

20 Italy

21 India

22 Australia

22 Denmark

26 Brazil

26 Poland

35 Netherlands

36 Sweden

41 France

124 Germany

132 Canada

See- easy!

And if you want the US states, even easier:

    grep US -A1  hnpoll  | sed  -e ':a;N;$!ba;s/\n/ /g' -e 's/points/,/g' -e 's/point/ ,/g' -e 's/,/\n/g' -e '/^$/d' | sort -r |cut -d: -f2 | awk '{ print $2" "$1 }' | sort -n | tail -n 20
15 Arizona

16 Michigan

16 Minnesota

16 Ohio

16 Wisconsin

17 Maryland

18 Georgia

25 Florida

28 Jersey

31 Virginia

32 Pennsylvania

35 Oregon

39 Carolina

42 Illinois

47 Massachusetts

51 Colorado

59 Texas

103 Washington

110 New York

265 California

And people say Bash is a terrible language...

BUT WAIT THERE'S MORE!

Get the total number of US results:

   echo $(grep US -A1  hnpoll  | sed  -e ':a;N;$!ba;s/\n/ /g' -e 's/points/,/g' -e 's/point/ ,/g' -e 's/,/\n/g' -e '/^$/d' | sort -r |cut -d: -f2 | awk '{ print $2 }' | sort -n | grep ^[0-9] | paste -sd+ - | bc)" United States"
943 United States

Combine them a bit...

   sed -e ':a;N;$!ba;s/\n/ /g' -e 's/points/,/g' -e 's/point/ ,/g' -e  's/,/\n/g' hnpoll | awk '{ print $2 " "$1 }'  | sort -n | grep ^[0-9] | tail -n 20; echo $(grep US -A1  hnpoll  | sed  -e ':a;N;$!ba;s/\n/ /g' -e 's/points/,/g' -e 's/point/ ,/g' -e 's/,/\n/g' -e '/^$/d' | sort -r |cut -d: -f2 | awk '{ print $2 }' | sort -n | grep ^[0-9] | paste -sd+ - | bc)" United States"

12 Finland

12 Serbia

3 Norway

13 Romania

15 Belgium

15 Israel

15 Spain

16 Austria

19 Switzerland

20 Italy

21 India

22 Australia

22 Denmark

26 Brazil

26 Poland

35 Netherlands

36 Sweden

41 France

124 Germany

132 Canada

943 United States

Re: Poll: Where do you live?

#250
post #144

Earlier quoted context omitted.

It's... still one country, though. And while I understand that Americans are very preoccupied with the difference between California and New Jersey, please understand that it's not that important (or obvious) to the rest of us.

I suppose it's because the main issue is whether or not HN is "Silicon Valley", and so if you're in the UK (for example) you are not Silicon Valley regardless of if you are in NI, Scotland, Wales, or England.

I don't see how this poll determines this. I'm in LA but not silicon valley and had to pick California.
Post reply on HN