Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looking at the variance as a single datapoint doesn't capture temperature information very well. A single rare outlier data will make a city look bad even if most days are milkd.

I hacked together a little program to try something different. My rule was to look at the daily average temperature for a bunch of cities on a single year. Then count up the number of "good temperature" days which I defined to be within 60°F-80°F. The best cities are the ones with the most good days.

Based on that, looking at US cities, the top and bottom ten are:

    282 : San Diego, California
    256 : Los Angeles, California
    236 : Orlando, Florida
    203 : Honolulu, Hawaii
    202 : Jacksonville, Florida
    199 : West Palm Beach, Florida
    193 : Tampa St. Petersburg, Florida
    189 : Asheville, North Carolina
    179 : Charleston, South Carolina

    ...

     92 : Duluth, Minnesota
     91 : Casper, Wyoming
     89 : Concord, New Hampshire
     89 : Great Falls, Montana
     87 : Sault Ste Marie, Michigan
     80 : Caribou, Maine
     76 : Salt Lake City, Utah
     64 : Anchorage, Alaska
     63 : Fairbanks, Alaska
     41 : Juneau, Alaska
That looks about right to me.


Makes sense, San Diego and anything on Hawaii is hard to beat for 'comfort'. If you account for outdoor diversity then moving bit north to Silicon Valley makes sense. Warmer than San Francisco, with great skiing 4 hours away.


This is interesting. It doesn't capture humidity / heat index, which would drop at least five cities (FL, SC) out of the top ten.


Yeah, if you really want to pick a city by weather, you'd want to take into account more than just temperature. Amount of sunlight is important too, from cloud cover and day length based on latitude.


This seems related to the concept of the degree day. [1]

[1] https://en.wikipedia.org/wiki/Degree_day


Those Florida cities get pretty hot in the summer, no?


Bob, are you using the same data as the OP?


No idea. I just searched for "average city temperature CSV" and ended up downloading some file from Kaggle.


Nope; I used the Wikipedia article I mentioned. This is a different, more detailed, table of temperature data.


Can you please share the code? Or show the results for other continents.


The code is too hacky to share. Basically, I got a CSV of daily average temperatures for a bunch of cities. I discarded all the rows except for ones in the US and within a single year.

Then, for each city, I just counted the number of days whose temperature was within a range.

I had to do a little massaging because for some reason Washington DC was double counted in there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: