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.
Re:Cities with Nice Weather
by munificent on Friday May 13, 2022 @04:04PM
(#31371986)
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]
Re:Cities with Nice Weather
by wolverine876 on Friday May 13, 2022 @11:04PM
(#31374751)
Those Florida cities get pretty hot in the summer, no?
Bob, are you using the same data as the OP?
Re:Cities with Nice Weather
by munificent on Friday May 13, 2022 @02:59PM
(#31371323)
No idea. I just searched for "average city temperature CSV" and ended up downloading some file from Kaggle.
Re:Cities with Nice Weather
by thefringthing on Friday May 13, 2022 @04:27PM
(#31372191)
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.
Re:Cities with Nice Weather
by munificent on Friday May 13, 2022 @04:07PM
(#31372030)
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.
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:
That looks about right to me.