Skip to content

Instantly share code, notes, and snippets.

@semanticentity
Created April 10, 2026 18:52
Show Gist options
  • Select an option

  • Save semanticentity/9ac18fb8458a4df2b8dbb0ada0c5279d to your computer and use it in GitHub Desktop.

Select an option

Save semanticentity/9ac18fb8458a4df2b8dbb0ada0c5279d to your computer and use it in GitHub Desktop.
Migraine Cluster Headache Climate Map
<select id="scoreFilter">
<option value="all">Show All</option>
<option value="80">80+</option>
<option value="60">60–79</option>
<option value="59">Below 60</option>
</select>
<div id="map"></div>
// Initialize the map
var map = L.map("map", {
center: [37.0902, -106.7129], // Center on U.S.
zoom: 3 // Zoom level to show most locations
});
// Add dark mode tiles (CartoDB Dark Matter)
var tiles = L.tileLayer(
"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",
{
attribution:
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
subdomains: "abcd",
minZoom: 2,
maxZoom: 19
}
).addTo(map);
// Add score legend
var legend = L.control({ position: "bottomleft" });
legend.onAdd = function () {
var div = L.DomUtil.create("div", "info legend");
div.innerHTML +=
"<p>Score Legend</p>" +
'<i style="background:white"></i> 80-100<br>' +
'<i style="background:pink"></i> 60-79<br>' +
'<i style="background:red"></i> Below 60<br>';
return div;
};
legend.addTo(map);
// Define Locations data array
var locations = [
{
name: "San Diego, CA",
lat: 32.7157,
lon: -117.1611,
score: 90,
temp: "60-70°F",
humidity: "50-60%",
weather: "Rare storms"
},
{
name: "San Francisco, CA",
lat: 37.7749,
lon: -122.4194,
score: 85,
temp: "55-65°F",
humidity: "60-75%",
weather: "Dry summers"
},
{
name: "Spokane, WA",
lat: 47.6588,
lon: -117.426,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Dry"
},
{
name: "El Paso, TX",
lat: 31.7619,
lon: -106.485,
score: 75,
temp: "90-95°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Apalachicola, FL",
lat: 29.7258,
lon: -84.983,
score: 60,
temp: "85-90°F",
humidity: "70-75%",
weather: "Summer rains"
},
{
name: "South Florida (Miami)",
lat: 25.7617,
lon: -80.1918,
score: 30,
temp: "90°F",
humidity: "80%",
weather: "Daily storms"
},
{
name: "New York, NY",
lat: 40.7128,
lon: -74.006,
score: 50,
temp: "30-85°F",
humidity: "60-70%",
weather: "Spring/summer storms"
},
{
name: "Burlington, VT",
lat: 44.4759,
lon: -73.2121,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Moderate storms"
},
{
name: "Portland, ME",
lat: 43.6615,
lon: -70.2553,
score: 70,
temp: "70-75°F",
humidity: "65-75%",
weather: "Occasional storms"
},
{
name: "Asheville, NC",
lat: 35.5951,
lon: -82.5515,
score: 70,
temp: "80-85°F",
humidity: "60-70%",
weather: "Moderate storms"
},
{
name: "Savannah, GA",
lat: 32.0809,
lon: -81.0912,
score: 40,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Madison, WI",
lat: 43.0731,
lon: -89.4012,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Omaha, NE",
lat: 41.2565,
lon: -95.9345,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Tucson, AZ",
lat: 32.2226,
lon: -110.9747,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Albuquerque, NM",
lat: 35.0844,
lon: -106.6504,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Bellingham, WA",
lat: 48.7491,
lon: -122.4787,
score: 85,
temp: "65-75°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Boise, ID",
lat: 43.615,
lon: -116.2023,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Rapid City, SD",
lat: 44.0805,
lon: -103.231,
score: 70,
temp: "80-85°F",
humidity: "50-60%",
weather: "Summer storms"
},
{
name: "Amarillo, TX",
lat: 35.222,
lon: -101.8313,
score: 65,
temp: "90-95°F",
humidity: "40-50%",
weather: "Stormy springs"
},
{
name: "Eureka, CA",
lat: 40.8021,
lon: -124.1637,
score: 80,
temp: "60-65°F",
humidity: "70-80%",
weather: "Rare storms"
},
{
name: "Flagstaff, AZ",
lat: 35.1983,
lon: -111.6513,
score: 85,
temp: "75-80°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Bend, OR",
lat: 44.0582,
lon: -121.3153,
score: 85,
temp: "75-80°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Charleston, SC",
lat: 32.7765,
lon: -79.9311,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Kansas City, MO",
lat: 39.0997,
lon: -94.5786,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Denver, CO",
lat: 39.7392,
lon: -104.9903,
score: 80,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Reno, NV",
lat: 39.5296,
lon: -119.8138,
score: 80,
temp: "85-90°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Salt Lake City, UT",
lat: 40.7608,
lon: -111.891,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Boston, MA",
lat: 42.3601,
lon: -71.0589,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Concord, NH",
lat: 43.2081,
lon: -71.5376,
score: 70,
temp: "75-80°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Mobile, AL",
lat: 30.6954,
lon: -88.0399,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Jackson, MS",
lat: 32.2988,
lon: -90.1848,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Raleigh, NC",
lat: 35.7796,
lon: -78.6382,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Chicago, IL",
lat: 41.8781,
lon: -87.6298,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Minneapolis, MN",
lat: 44.9778,
lon: -93.265,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Des Moines, IA",
lat: 41.5868,
lon: -93.625,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Phoenix, AZ",
lat: 33.4484,
lon: -112.074,
score: 70,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Las Vegas, NV",
lat: 36.1699,
lon: -115.1398,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Santa Fe, NM",
lat: 35.6869,
lon: -105.9378,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Portland, OR",
lat: 45.5152,
lon: -122.6784,
score: 80,
temp: "75-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Seattle, WA",
lat: 47.6062,
lon: -122.3321,
score: 85,
temp: "70-75°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Fargo, ND",
lat: 46.8772,
lon: -96.7898,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Billings, MT",
lat: 45.7833,
lon: -108.5007,
score: 75,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Cheyenne, WY",
lat: 41.14,
lon: -104.8202,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Los Angeles, CA",
lat: 34.0522,
lon: -118.2437,
score: 85,
temp: "75-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Sacramento, CA",
lat: 38.5816,
lon: -121.4944,
score: 80,
temp: "85-90°F",
humidity: "40-50%",
weather: "Dry summers"
},
{
name: "Birmingham, AL",
lat: 33.5207,
lon: -86.8025,
score: 45,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Louisville, KY",
lat: 38.2527,
lon: -85.7585,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "St. Louis, MO",
lat: 38.627,
lon: -90.1994,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Oklahoma City, OK",
lat: 35.4676,
lon: -97.5164,
score: 55,
temp: "90-95°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Anchorage, AK",
lat: 61.2181,
lon: -149.9003,
score: 85,
temp: "60-65°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Hartford, CT",
lat: 41.7658,
lon: -72.6734,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Dover, DE",
lat: 39.1582,
lon: -75.5244,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Annapolis, MD",
lat: 38.9784,
lon: -76.4922,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Trenton, NJ",
lat: 40.2171,
lon: -74.7429,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Harrisburg, PA",
lat: 40.2732,
lon: -76.8867,
score: 60,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Montpelier, VT",
lat: 44.2601,
lon: -72.5754,
score: 70,
temp: "75-80°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Atlanta, GA",
lat: 33.749,
lon: -84.388,
score: 45,
temp: "85-90°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Tallahassee, FL",
lat: 30.4383,
lon: -84.2807,
score: 40,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Nashville, TN",
lat: 36.1627,
lon: -86.7816,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Richmond, VA",
lat: 37.5407,
lon: -77.436,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Charleston, WV",
lat: 38.3498,
lon: -81.6326,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Little Rock, AR",
lat: 34.7465,
lon: -92.2896,
score: 45,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "New Orleans, LA",
lat: 29.9511,
lon: -90.0715,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Columbus, OH",
lat: 39.9612,
lon: -82.9988,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Indianapolis, IN",
lat: 39.7684,
lon: -86.1581,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Detroit, MI",
lat: 42.3314,
lon: -83.0458,
score: 60,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Topeka, KS",
lat: 39.0473,
lon: -95.6752,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Austin, TX",
lat: 30.2672,
lon: -97.7431,
score: 60,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "San Antonio, TX",
lat: 29.4241,
lon: -98.4936,
score: 55,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Houston, TX",
lat: 29.7604,
lon: -95.3698,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Medford, OR",
lat: 42.3265,
lon: -122.8756,
score: 80,
temp: "85-90°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Missoula, MT",
lat: 46.8721,
lon: -113.994,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Coeur d'Alene, ID",
lat: 47.6777,
lon: -116.7805,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Lincoln, NE",
lat: 40.8136,
lon: -96.7026,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Bismarck, ND",
lat: 46.8083,
lon: -100.7837,
score: 70,
temp: "80-85°F",
humidity: "50-60%",
weather: "Summer storms"
},
{
name: "Honolulu, HI",
lat: 21.3069,
lon: -157.8583,
score: 80,
temp: "85-90°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Key West, FL",
lat: 24.5551,
lon: -81.78,
score: 45,
temp: "85-90°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Orlando, FL",
lat: 28.5383,
lon: -81.3792,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Daily storms"
},
{
name: "Tampa, FL",
lat: 27.9506,
lon: -82.4572,
score: 40,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Columbia, SC",
lat: 34.0007,
lon: -81.0348,
score: 45,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Shreveport, LA",
lat: 32.5252,
lon: -93.7502,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Milwaukee, WI",
lat: 43.0389,
lon: -87.9065,
score: 65,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Springfield, IL",
lat: 39.7817,
lon: -89.6501,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Dallas, TX",
lat: 32.7767,
lon: -96.797,
score: 55,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Bakersfield, CA",
lat: 35.3733,
lon: -119.0187,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Fresno, CA",
lat: 36.7378,
lon: -119.7871,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Salem, OR",
lat: 44.9429,
lon: -123.0351,
score: 80,
temp: "75-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Philadelphia, PA",
lat: 39.9526,
lon: -75.1652,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Virginia Beach, VA",
lat: 36.8529,
lon: -75.978,
score: 60,
temp: "80-85°F",
humidity: "70-80%",
weather: "Summer storms"
},
{
name: "Oakland, CA",
lat: 37.8044,
lon: -122.2711,
score: 80,
temp: "65-75°F",
humidity: "60-70%",
weather: "Dry summers"
},
{
name: "Tulsa, OK",
lat: 36.1539,
lon: -95.9928,
score: 60,
temp: "90-95°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Wichita, KS",
lat: 37.6872,
lon: -97.3301,
score: 60,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Arlington, TX",
lat: 32.7357,
lon: -97.1081,
score: 65,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Aurora, CO",
lat: 39.7294,
lon: -104.8319,
score: 75,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Fort Wayne, IN",
lat: 41.0793,
lon: -85.1394,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Lexington, KY",
lat: 38.0468,
lon: -84.5037,
score: 65,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Colorado Springs, CO",
lat: 38.8339,
lon: -104.8214,
score: 75,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Mesa, AZ",
lat: 33.4152,
lon: -111.8315,
score: 70,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Long Beach, CA",
lat: 33.7701,
lon: -118.1937,
score: 85,
temp: "75-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Buffalo, NY",
lat: 42.8864,
lon: -78.8784,
score: 60,
temp: "70-75°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Durham, NC",
lat: 35.994,
lon: -78.8986,
score: 65,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "St. Petersburg, FL",
lat: 27.7731,
lon: -82.64,
score: 45,
temp: "85-90°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Lubbock, TX",
lat: 33.5779,
lon: -101.8552,
score: 70,
temp: "90-95°F",
humidity: "40-50%",
weather: "Stormy springs"
},
{
name: "Chandler, AZ",
lat: 33.3062,
lon: -111.8413,
score: 75,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Scottsdale, AZ",
lat: 33.4942,
lon: -111.9261,
score: 75,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Glendale, AZ",
lat: 33.5387,
lon: -112.1859,
score: 70,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Norfolk, VA",
lat: 36.8467,
lon: -76.2855,
score: 60,
temp: "80-85°F",
humidity: "70-80%",
weather: "Summer storms"
},
{
name: "Winston-Salem, NC",
lat: 36.0999,
lon: -80.2442,
score: 65,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Chesapeake, VA",
lat: 36.7682,
lon: -76.2875,
score: 60,
temp: "80-85°F",
humidity: "70-80%",
weather: "Summer storms"
},
{
name: "Garland, TX",
lat: 32.9126,
lon: -96.6389,
score: 65,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Irving, TX",
lat: 32.814,
lon: -96.9489,
score: 65,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "North Las Vegas, NV",
lat: 36.1989,
lon: -115.1175,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Fremont, CA",
lat: 37.5483,
lon: -121.9886,
score: 85,
temp: "65-75°F",
humidity: "60-70%",
weather: "Dry summers"
},
{
name: "Gilbert, AZ",
lat: 33.3528,
lon: -111.789,
score: 75,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Hialeah, FL",
lat: 25.8576,
lon: -80.2781,
score: 35,
temp: "90°F",
humidity: "80%",
weather: "Daily storms"
},
{
name: "San Bernardino, CA",
lat: 34.1083,
lon: -117.2898,
score: 75,
temp: "90-95°F",
humidity: "30-40%",
weather: "Dry summers"
},
{
name: "Tacoma, WA",
lat: 47.2529,
lon: -122.4443,
score: 80,
temp: "70-75°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Yonkers, NY",
lat: 40.9327,
lon: -73.8987,
score: 55,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Huntington Beach, CA",
lat: 33.6595,
lon: -117.9988,
score: 85,
temp: "70-75°F",
humidity: "60-70%",
weather: "Dry summers"
},
{
name: "Aurora, IL",
lat: 41.7606,
lon: -88.3201,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Montgomery, AL",
lat: 32.3668,
lon: -86.3,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Akron, OH",
lat: 41.0814,
lon: -81.519,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Augusta, GA",
lat: 33.4735,
lon: -81.9748,
score: 45,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Port St. Lucie, FL",
lat: 27.2939,
lon: -80.3503,
score: 40,
temp: "85-90°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Grand Rapids, MI",
lat: 42.9634,
lon: -85.6681,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Overland Park, KS",
lat: 38.9822,
lon: -94.6708,
score: 65,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Grand Prairie, TX",
lat: 32.7457,
lon: -97.0417,
score: 65,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Knoxville, TN",
lat: 35.9606,
lon: -83.9207,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Worcester, MA",
lat: 42.2626,
lon: -71.8023,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Brownsville, TX",
lat: 25.9017,
lon: -97.4975,
score: 50,
temp: "90-95°F",
humidity: "70-80%",
weather: "Summer storms"
},
{
name: "Santa Clarita, CA",
lat: 34.3917,
lon: -118.5426,
score: 85,
temp: "85-90°F",
humidity: "40-50%",
weather: "Dry summers"
},
{
name: "Providence, RI",
lat: 41.824,
lon: -71.4128,
score: 65,
temp: "75-80°F",
humidity: "65-75%",
weather: "Moderate storms"
},
{
name: "Fort Lauderdale, FL",
lat: 26.1224,
lon: -80.1434,
score: 35,
temp: "90°F",
humidity: "80%",
weather: "Daily storms"
},
{
name: "Newport News, VA",
lat: 37.0771,
lon: -76.4741,
score: 60,
temp: "80-85°F",
humidity: "70-80%",
weather: "Summer storms"
},
{
name: "Chattanooga, TN",
lat: 35.0456,
lon: -85.3097,
score: 60,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Tempe, AZ",
lat: 33.4255,
lon: -111.94,
score: 75,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Rancho Cucamonga, CA",
lat: 34.1064,
lon: -117.5931,
score: 80,
temp: "85-90°F",
humidity: "40-50%",
weather: "Dry summers"
},
{
name: "Oceanside, CA",
lat: 33.1959,
lon: -117.3795,
score: 85,
temp: "70-75°F",
humidity: "60-70%",
weather: "Dry summers"
},
{
name: "Santa Rosa, CA",
lat: 38.4404,
lon: -122.7141,
score: 85,
temp: "70-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Elk Grove, CA",
lat: 38.4088,
lon: -121.3716,
score: 80,
temp: "85-90°F",
humidity: "40-50%",
weather: "Dry summers"
},
{
name: "Pembroke Pines, FL",
lat: 26.0018,
lon: -80.2356,
score: 40,
temp: "90°F",
humidity: "80%",
weather: "Daily storms"
},
{
name: "Eugene, OR",
lat: 44.0521,
lon: -123.0868,
score: 80,
temp: "75-80°F",
humidity: "50-60%",
weather: "Dry summers"
},
{
name: "Corona, CA",
lat: 33.8753,
lon: -117.5664,
score: 80,
temp: "85-90°F",
humidity: "40-50%",
weather: "Dry summers"
},
{
name: "Cape Coral, FL",
lat: 26.5629,
lon: -81.9495,
score: 40,
temp: "90°F",
humidity: "80%",
weather: "Daily storms"
},
{
name: "Springfield, MO",
lat: 37.2089,
lon: -93.2923,
score: 60,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Peoria, AZ",
lat: 33.5806,
lon: -112.2374,
score: 70,
temp: "100-105°F",
humidity: "20-30%",
weather: "Short monsoon"
},
{
name: "Sioux Falls, SD",
lat: 43.5446,
lon: -96.7311,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Frisco, TX",
lat: 33.1507,
lon: -96.8236,
score: 70,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Huntsville, AL",
lat: 34.7304,
lon: -86.5861,
score: 65,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Albany, NY",
lat: 42.6526,
lon: -73.7562,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Syracuse, NY",
lat: 43.0481,
lon: -76.1474,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Rochester, NY",
lat: 43.155,
lon: -77.6114,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Pittsburgh, PA",
lat: 40.4406,
lon: -79.9959,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Allentown, PA",
lat: 40.6084,
lon: -75.4902,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Bridgeport, CT",
lat: 41.1792,
lon: -73.1895,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "New Haven, CT",
lat: 41.3083,
lon: -72.9279,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Jersey City, NJ",
lat: 40.7178,
lon: -74.0431,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Manchester, NH",
lat: 42.9956,
lon: -71.4548,
score: 70,
temp: "75-80°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Bangor, ME",
lat: 44.8012,
lon: -68.7778,
score: 70,
temp: "70-75°F",
humidity: "65-75%",
weather: "Occasional storms"
},
{
name: "Charlotte, NC",
lat: 35.2271,
lon: -80.8431,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Greenville, SC",
lat: 34.8526,
lon: -82.394,
score: 50,
temp: "85-90°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Jacksonville, FL",
lat: 30.3322,
lon: -81.6557,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Gainesville, FL",
lat: 29.6516,
lon: -82.3248,
score: 40,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Pensacola, FL",
lat: 30.4213,
lon: -87.2169,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Baton Rouge, LA",
lat: 30.4515,
lon: -91.1871,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Memphis, TN",
lat: 35.1495,
lon: -90.049,
score: 50,
temp: "90-95°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Huntington, WV",
lat: 38.4192,
lon: -82.4452,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Athens, GA",
lat: 33.9519,
lon: -83.3576,
score: 45,
temp: "85-90°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Biloxi, MS",
lat: 30.396,
lon: -88.8853,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Cleveland, OH",
lat: 41.4993,
lon: -81.6944,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Cincinnati, OH",
lat: 39.1031,
lon: -84.512,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Dayton, OH",
lat: 39.7589,
lon: -84.1916,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Ann Arbor, MI",
lat: 42.2808,
lon: -83.743,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Lansing, MI",
lat: 42.7325,
lon: -84.5555,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Duluth, MN",
lat: 46.7867,
lon: -92.1005,
score: 70,
temp: "70-75°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Rochester, MN",
lat: 44.0121,
lon: -92.4802,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Springfield, OH",
lat: 39.9242,
lon: -83.8088,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Cedar Rapids, IA",
lat: 41.9779,
lon: -91.6656,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Peoria, IL",
lat: 40.6936,
lon: -89.589,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Laredo, TX",
lat: 27.5036,
lon: -99.5075,
score: 60,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Corpus Christi, TX",
lat: 27.8006,
lon: -97.3964,
score: 50,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Midland, TX",
lat: 31.9973,
lon: -102.0779,
score: 70,
temp: "90-95°F",
humidity: "40-50%",
weather: "Occasional storms"
},
{
name: "Odessa, TX",
lat: 31.8457,
lon: -102.3676,
score: 70,
temp: "90-95°F",
humidity: "40-50%",
weather: "Occasional storms"
},
{
name: "Prescott, AZ",
lat: 34.54,
lon: -112.4685,
score: 80,
temp: "85-90°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Yuma, AZ",
lat: 32.6927,
lon: -114.6277,
score: 65,
temp: "105-110°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Las Cruces, NM",
lat: 32.3199,
lon: -106.7637,
score: 75,
temp: "90-95°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Roswell, NM",
lat: 33.3943,
lon: -104.523,
score: 75,
temp: "90-95°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Tahlequah, OK",
lat: 35.9154,
lon: -94.97,
score: 50,
temp: "90-95°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Yakima, WA",
lat: 46.6021,
lon: -120.5059,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Olympia, WA",
lat: 47.0379,
lon: -122.9007,
score: 85,
temp: "70-75°F",
humidity: "60-70%",
weather: "Rare storms"
},
{
name: "Pocatello, ID",
lat: 42.8713,
lon: -112.4455,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Lewiston, ID",
lat: 46.42,
lon: -117.0177,
score: 80,
temp: "85-90°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Wichita Falls, TX",
lat: 33.9137,
lon: -98.4934,
score: 60,
temp: "95-100°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Great Falls, MT",
lat: 47.4942,
lon: -111.2833,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Pierre, SD",
lat: 44.3683,
lon: -100.351,
score: 65,
temp: "85-90°F",
humidity: "50-60%",
weather: "Summer storms"
},
{
name: "North Platte, NE",
lat: 41.1239,
lon: -100.7654,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Garden City, KS",
lat: 37.9717,
lon: -100.8727,
score: 60,
temp: "90-95°F",
humidity: "50-60%",
weather: "Frequent storms"
},
{
name: "Grand Forks, ND",
lat: 47.9253,
lon: -97.0329,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Aberdeen, SD",
lat: 45.4647,
lon: -98.4865,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Helena, MT",
lat: 46.5891,
lon: -112.0391,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Bozeman, MT",
lat: 45.6769,
lon: -111.0429,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Casper, WY",
lat: 42.8666,
lon: -106.3131,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Laramie, WY",
lat: 41.3114,
lon: -105.5911,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Idaho Falls, ID",
lat: 43.4917,
lon: -112.0339,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Twin Falls, ID",
lat: 42.5629,
lon: -114.4609,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Kearney, NE",
lat: 40.6995,
lon: -99.0818,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Scottsbluff, NE",
lat: 41.8666,
lon: -103.6672,
score: 65,
temp: "85-90°F",
humidity: "50-60%",
weather: "Summer storms"
},
{
name: "Manhattan, KS",
lat: 39.1836,
lon: -96.5717,
score: 60,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Lawrence, KS",
lat: 38.9717,
lon: -95.2353,
score: 60,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Norman, OK",
lat: 35.2226,
lon: -97.4395,
score: 55,
temp: "90-95°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Lawton, OK",
lat: 34.6036,
lon: -98.3959,
score: 55,
temp: "90-95°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Fayetteville, AR",
lat: 36.0626,
lon: -94.1574,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Fort Smith, AR",
lat: 35.3859,
lon: -94.3985,
score: 50,
temp: "90-95°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Lafayette, LA",
lat: 30.2241,
lon: -92.0198,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Lake Charles, LA",
lat: 30.2266,
lon: -93.2174,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Gulfport, MS",
lat: 30.3674,
lon: -89.0928,
score: 35,
temp: "90-95°F",
humidity: "75-80%",
weather: "Frequent storms"
},
{
name: "Hattiesburg, MS",
lat: 31.3271,
lon: -89.2903,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Morgantown, WV",
lat: 39.6295,
lon: -79.9559,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Baltimore, MD",
lat: 39.2904,
lon: -76.6122,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Frederick, MD",
lat: 39.4143,
lon: -77.4105,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Wilmington, DE",
lat: 39.7459,
lon: -75.5466,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Newark, NJ",
lat: 40.7357,
lon: -74.1724,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Paterson, NJ",
lat: 40.9168,
lon: -74.1718,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Warwick, RI",
lat: 41.7001,
lon: -71.4162,
score: 65,
temp: "75-80°F",
humidity: "65-75%",
weather: "Moderate storms"
},
{
name: "Stamford, CT",
lat: 41.0534,
lon: -73.5387,
score: 60,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Bennington, VT",
lat: 42.8781,
lon: -73.1968,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Moderate storms"
},
{
name: "Portsmouth, NH",
lat: 43.0718,
lon: -70.7626,
score: 70,
temp: "75-80°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Augusta, ME",
lat: 44.3106,
lon: -69.7795,
score: 70,
temp: "70-75°F",
humidity: "65-75%",
weather: "Occasional storms"
},
{
name: "Provo, UT",
lat: 40.2338,
lon: -111.6585,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Ogden, UT",
lat: 41.223,
lon: -111.9738,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Fort Collins, CO",
lat: 40.5853,
lon: -105.0844,
score: 75,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Boulder, CO",
lat: 40.015,
lon: -105.2705,
score: 75,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Carson City, NV",
lat: 39.1638,
lon: -119.7674,
score: 80,
temp: "85-90°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Henderson, NV",
lat: 36.0395,
lon: -114.9817,
score: 75,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Alamogordo, NM",
lat: 32.8995,
lon: -105.9603,
score: 75,
temp: "90-95°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Minot, ND",
lat: 48.2325,
lon: -101.2963,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Watertown, SD",
lat: 44.8994,
lon: -97.1151,
score: 65,
temp: "80-85°F",
humidity: "60-70%",
weather: "Summer storms"
},
{
name: "Kalispell, MT",
lat: 48.1958,
lon: -114.3129,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Sheridan, WY",
lat: 44.7972,
lon: -106.9562,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Nampa, ID",
lat: 43.5407,
lon: -116.5635,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Meridian, ID",
lat: 43.6121,
lon: -116.3915,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Grand Island, NE",
lat: 40.925,
lon: -98.342,
score: 55,
temp: "85-90°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Hays, KS",
lat: 38.8792,
lon: -99.3268,
score: 60,
temp: "90-95°F",
humidity: "50-60%",
weather: "Frequent storms"
},
{
name: "Enid, OK",
lat: 36.3956,
lon: -97.8784,
score: 55,
temp: "90-95°F",
humidity: "60-70%",
weather: "Frequent storms"
},
{
name: "Jonesboro, AR",
lat: 35.8423,
lon: -90.7043,
score: 50,
temp: "85-90°F",
humidity: "65-75%",
weather: "Frequent storms"
},
{
name: "Pine Bluff, AR",
lat: 34.2284,
lon: -92.0032,
score: 45,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Monroe, LA",
lat: 32.5093,
lon: -92.1193,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Alexandria, LA",
lat: 31.3113,
lon: -92.4451,
score: 30,
temp: "90-95°F",
humidity: "75-85%",
weather: "Daily storms"
},
{
name: "Meridian, MS",
lat: 32.3643,
lon: -88.7037,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Greenville, MS",
lat: 33.4101,
lon: -91.0618,
score: 40,
temp: "90-95°F",
humidity: "70-80%",
weather: "Frequent storms"
},
{
name: "Bowling Green, KY",
lat: 36.9903,
lon: -86.4436,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Owensboro, KY",
lat: 37.7719,
lon: -87.1112,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Parkersburg, WV",
lat: 39.2667,
lon: -81.5615,
score: 60,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Murfreesboro, TN",
lat: 35.8456,
lon: -86.3903,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Clarksville, TN",
lat: 36.5298,
lon: -87.3595,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Rutland, VT",
lat: 43.6106,
lon: -72.9726,
score: 65,
temp: "75-80°F",
humidity: "60-70%",
weather: "Moderate storms"
},
{
name: "Dover, NH",
lat: 43.1979,
lon: -70.8737,
score: 70,
temp: "75-80°F",
humidity: "60-70%",
weather: "Occasional storms"
},
{
name: "Lewiston, ME",
lat: 44.1004,
lon: -70.2148,
score: 70,
temp: "70-75°F",
humidity: "65-75%",
weather: "Occasional storms"
},
{
name: "Newark, DE",
lat: 39.6837,
lon: -75.7497,
score: 55,
temp: "80-85°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Cranston, RI",
lat: 41.7798,
lon: -71.4373,
score: 65,
temp: "75-80°F",
humidity: "65-75%",
weather: "Moderate storms"
},
{
name: "Green Bay, WI",
lat: 44.5192,
lon: -88.0198,
score: 65,
temp: "75-80°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "Evansville, IN",
lat: 37.9716,
lon: -87.5711,
score: 55,
temp: "85-90°F",
humidity: "65-75%",
weather: "Summer storms"
},
{
name: "West Valley City, UT",
lat: 40.6916,
lon: -112.0011,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Butte, MT",
lat: 46.0038,
lon: -112.5348,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Havre, MT",
lat: 48.55,
lon: -109.6841,
score: 75,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Miles City, MT",
lat: 46.4083,
lon: -105.8406,
score: 70,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Gillette, WY",
lat: 44.2911,
lon: -105.5022,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Rock Springs, WY",
lat: 41.5875,
lon: -109.2029,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Moscow, ID",
lat: 46.7324,
lon: -117.0002,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Rexburg, ID",
lat: 43.826,
lon: -111.7897,
score: 80,
temp: "80-85°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Winnemucca, NV",
lat: 40.973,
lon: -117.7357,
score: 75,
temp: "90-95°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Fallon, NV",
lat: 39.475,
lon: -118.777,
score: 75,
temp: "90-95°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "St. George, UT",
lat: 37.1042,
lon: -113.5841,
score: 70,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Cedar City, UT",
lat: 37.6775,
lon: -113.0619,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Pueblo, CO",
lat: 38.2544,
lon: -104.6091,
score: 75,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Durango, CO",
lat: 37.2753,
lon: -107.8801,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Farmington, NM",
lat: 36.7281,
lon: -108.2187,
score: 75,
temp: "85-90°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Taos, NM",
lat: 36.4072,
lon: -105.5731,
score: 80,
temp: "80-85°F",
humidity: "20-40%",
weather: "Occasional storms"
},
{
name: "Wenatchee, WA",
lat: 47.4235,
lon: -120.3103,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Pasco, WA",
lat: 46.2396,
lon: -119.1006,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Klamath Falls, OR",
lat: 42.2249,
lon: -121.7817,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "La Grande, OR",
lat: 45.3246,
lon: -118.0877,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Dry summers"
},
{
name: "Kingman, AZ",
lat: 35.1894,
lon: -114.053,
score: 70,
temp: "95-100°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Moab, UT",
lat: 38.5733,
lon: -109.5498,
score: 75,
temp: "85-90°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Logan, UT",
lat: 41.736,
lon: -111.8338,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Vernal, UT",
lat: 40.4555,
lon: -109.5287,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Price, UT",
lat: 39.5994,
lon: -110.8107,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Tooele, UT",
lat: 40.5308,
lon: -112.2983,
score: 80,
temp: "85-90°F",
humidity: "20-40%",
weather: "Dry summers"
},
{
name: "Dillon, MT",
lat: 45.2163,
lon: -112.6375,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Livingston, MT",
lat: 45.6624,
lon: -110.561,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Glendive, MT",
lat: 47.1053,
lon: -104.7125,
score: 70,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Sidney, MT",
lat: 47.7167,
lon: -104.1563,
score: 70,
temp: "85-90°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Whitefish, MT",
lat: 48.4111,
lon: -114.3376,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Evanston, WY",
lat: 41.2683,
lon: -110.9632,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Green River, WY",
lat: 41.5286,
lon: -109.4662,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Rawlins, WY",
lat: 41.7911,
lon: -107.2387,
score: 80,
temp: "75-80°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Jackson, WY",
lat: 43.4799,
lon: -110.7624,
score: 85,
temp: "70-75°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Riverton, WY",
lat: 43.025,
lon: -108.3803,
score: 80,
temp: "80-85°F",
humidity: "30-50%",
weather: "Occasional storms"
},
{
name: "Tonopah, NV",
lat: 38.0672,
lon: -117.23,
score: 75,
temp: "90-95°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Elko, NV",
lat: 40.8324,
lon: -115.7631,
score: 80,
temp: "85-90°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Mesquite, NV",
lat: 36.8055,
lon: -114.0672,
score: 65,
temp: "100-105°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Sparks, NV",
lat: 39.5349,
lon: -119.7527,
score: 80,
temp: "85-90°F",
humidity: "20-30%",
weather: "Dry summers"
},
{
name: "Fernley, NV",
lat: 39.608,
lon: -119.2518,
score: 75,
temp: "90-95°F",
humidity: "20-30%",
weather: "Dry summers"
}
];
// --- SCRIPT TO REMOVE DUPLICATES BY NAME ---
console.log("Original locations count:", locations.length); // Optional: Check count before
const uniqueLocations = [];
const seenNames = new Set(); // Use a Set for efficient tracking of seen names
locations.forEach(loc => {
// Check if the 'name' (e.g., "San Diego, CA") has already been added
if (!seenNames.has(loc.name)) {
uniqueLocations.push(loc); // Add the location object to the unique list
seenNames.add(loc.name); // Add the name to the set of seen names
}
// If the name is already in seenNames, skip this location object
});
// Overwrite the original array with the unique one for the rest of the script
locations = uniqueLocations;
console.log("Unique locations count:", locations.length); // Optional: Check count after
// --- END SCRIPT TO REMOVE DUPLICATES ---
// Create a layer group to hold markers
var markerGroup = L.featureGroup().addTo(map);
function addMarkers() {
// Clear existing markers from the group
markerGroup.clearLayers();
// Now 'locations' is the de-duplicated array
locations.forEach(function (loc) {
var color = loc.score >= 80 ? "white" : loc.score >= 60 ? "pink" : "red";
var icon = L.divIcon({
html: `<div style="
background:${color};
width:12px;
height:12px;
border-radius:50%;
border: 1px solid #333;"></div>`,
className: "" // remove default styles
});
var marker = L.marker([loc.lat, loc.lon], { icon: icon })
.bindPopup(
`
<b>${loc.name}</b><br>
Score: ${loc.score}/100<br>
Temp: ${loc.temp}<br>
Humidity: ${loc.humidity}<br>
Weather: ${loc.weather}
`
)
.bindTooltip(`${loc.name}`, { direction: "top" });
markerGroup.addLayer(marker);
});
// Ensure markers were added before calling fitBounds
var layers = markerGroup.getLayers();
if (layers.length > 0) {
var bounds = markerGroup.getBounds();
// map.fitBounds(bounds.pad(0.4)); // Add padding to prevent Hawaii/Alaska cutoff
} else {
console.log("No markers to fit bounds on!");
}
}
// Function to remove markers
function removeMarkers() {
markerGroup.clearLayers();
}
// Add markers initially (using the de-duplicated list)
addMarkers();
// Add score filter
document.getElementById("scoreFilter").addEventListener("change", function () {
var value = this.value;
markerGroup.clearLayers();
locations.forEach(function (loc) {
var show =
value === "all" ||
(value === "80" && loc.score >= 80) ||
(value === "60" && loc.score >= 60 && loc.score < 80) ||
(value === "59" && loc.score < 60);
if (show) {
var color = loc.score >= 80 ? "white" : loc.score >= 60 ? "pink" : "red";
var icon = L.divIcon({
html: `<div style="background:${color};width:12px;height:12px;border-radius:50%;border:1px solid #333;"></div>`,
className: ""
});
var marker = L.marker([loc.lat, loc.lon], { icon: icon })
.bindPopup(
`<b>${loc.name}</b><br>Score: ${loc.score}/100<br>Temp: ${loc.temp}<br>Humidity: ${loc.humidity}<br>Weather: ${loc.weather}`
)
.bindTooltip(`${loc.name}`, { direction: "top" });
markerGroup.addLayer(marker);
}
});
});
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
html,
body {
margin: 0;
padding: 0;
height: 100vh;
width: 100%;
background: #000;
}
#map {
height: 100vh;
width: 100%;
background: #000;
}
.leaflet-popup-content-wrapper {
width: 100%;
}
.info.legend {
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 0 10px 10px;
font: 13px Arial, sans-serif;
border-radius: 5px;
}
.info.legend i {
width: 12px;
height: 12px;
float: left;
margin-right: 8px;
opacity: 0.9;
font-weight: 400;
}
#scoreFilter {
position: absolute;
top: 10px;
right: 10px;
z-index: 1000;
font-size: 13px;
font-family: system-ui, Arial, sans-serif;
font-weight: bold;
width: 120px;
padding: 6px 10px;
border-radius: 3px;
background: #fff;
background: rgba(255, 255, 255, 0.8);
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
<link href="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet" />
<link href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.Default.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment