Select a State-CityAK-FairbanksAK-MatanuskaAL-MontgomeryAR-BethelAR-Little RockAZ-TucsonAZ-PageAZ-PhoenixCA-Santa MariaCA-RiversideCA-DavisCA-FresnoCA-Los AngelesCA-Soda SpringsCA-La JollaCA-InyokernCO-GrandbyCO-Grand LakeCO-Grand JunctionCO-BoulderDC-WashingtonFL-AppalachicolaFL-Belie Is.FL-MiamiFL-GainesvilleFL-TampaGA-AtlantaGA-GriffinHI-HonoluluIA-AmesID-BoiseID-Twin FallsIL-ChicagoIN-IndianapolisKS-ManhattanKS-Dodge CityKY-LexingtonLA-Lake CharlesLA-New OrleansLA-ShreveportMA-E. WarehamMA-BostonMA-Blue HillMA-NatickMA-LynnMD-Silver HillME-CaribouME-PortlandMI-Saulte Ste. MarieMI-E. LansingMN-St. CloudMO-ColumbiaMO-St. LouisMS-MeridianMT-GlasgowMT-Great FallsMT-SummitNM-AlbuquerqueNB-LincolnNB-N. OmahaNC-Cape HatterasNC-GreensboroND-BismarckNJ-Sea BrookNV-Las VegasNV-ElyNY-BinghamtonNY-IthacaNY-SchenectadyNY-RochesterNY-New York CityOH-ColumbusOH-ClevelandOK-StillwaterOK-Oklahoma CityOR-AstoriaOR-CorvallisOR-MedfordPA-PittsburghPA-State CollegeRI-NewportSC-CharlestonSD-Rapid CityTN-NashvilleTN-Oak RidgeTX-San AntonioTX-BrownsvilleTX-El PasoTX-MidlandTX-Fort WorthUT-Salt Lake CityUT-Flaming GorgeVA-RichmondWA-SeattleWA-RichlandWA-PullmanWA-SpokaneWA-ProsserWI-MadisonWV-CharlestonWY-Lander
var mapResults = document.getElementById('map-results');
var cityList = {
"list": [
{
"CITY": "Fairbanks",
"STATE": "AK",
"HIGH": "5.87",
"LOW": "2.12",
"AVERAGE": "3.99"
},
{
"CITY": "Matanuska",
"STATE": "AK",
"HIGH": "5.24",
"LOW": "1.74",
"AVERAGE": "3.55"
},
{
"CITY": "Montgomery",
"STATE": "AL",
"HIGH": "4.69",
"LOW": "3.37",
"AVERAGE": "4.23"
},
{
"CITY": "Bethel",
"STATE": "AR",
"HIGH": "6.29",
"LOW": "2.37",
"AVERAGE": "3.81"
},
{
"CITY": "Little Rock",
"STATE": "AR",
"HIGH": "5.29",
"LOW": "3.88",
"AVERAGE": "4.69"
},
{
"CITY": "Tucson",
"STATE": "AZ",
"HIGH": "7.42",
"LOW": "6.01",
"AVERAGE": "6.57"
},
{
"CITY": "Page",
"STATE": "AZ",
"HIGH": "7.30",
"LOW": "5.65",
"AVERAGE": "6.36"
},
{
"CITY": "Phoenix",
"STATE": "AZ",
"HIGH": "7.13",
"LOW": "5.78",
"AVERAGE": "6.58"
},
{
"CITY": "Santa Maria",
"STATE": "CA",
"HIGH": "6.52",
"LOW": "5.42",
"AVERAGE": "5.94"
},
{
"CITY": "Riverside",
"STATE": "CA",
"HIGH": "6.35",
"LOW": "5.35",
"AVERAGE": "5.87"
},
{
"CITY": "Davis",
"STATE": "CA",
"HIGH": "6.09",
"LOW": "3.31",
"AVERAGE": "5.10"
},
{
"CITY": "Fresno",
"STATE": "CA",
"HIGH": "6.19",
"LOW": "3.42",
"AVERAGE": "5.38"
},
{
"CITY": "Los Angeles",
"STATE": "CA",
"HIGH": "6.14",
"LOW": "5.03",
"AVERAGE": "5.62"
},
{
"CITY": "Soda Springs",
"STATE": "CA",
"HIGH": "6.47",
"LOW": "4.40",
"AVERAGE": "5.60"
},
{
"CITY": "La Jolla",
"STATE": "CA",
"HIGH": "5.24",
"LOW": "4.29",
"AVERAGE": "4.77"
},
{
"CITY": "Inyokern",
"STATE": "CA",
"HIGH": "8.70",
"LOW": "6.87",
"AVERAGE": "7.66"
},
{
"CITY": "Grandby",
"STATE": "CO",
"HIGH": "7.47",
"LOW": "5.15",
"AVERAGE": "5.69"
},
{
"CITY": "Grand Lake",
"STATE": "CO",
"HIGH": "5.86",
"LOW": "3.56",
"AVERAGE": "5.08"
},
{
"CITY": "Grand Junction",
"STATE": "CO",
"HIGH": "6.34",
"LOW": "5.23",
"AVERAGE": "5.85"
},
{
"CITY": "Boulder",
"STATE": "CO",
"HIGH": "5.72",
"LOW": "4.44",
"AVERAGE": "4.87"
},
{
"CITY": "Washington",
"STATE": "DC",
"HIGH": "4.69",
"LOW": "3.37",
"AVERAGE": "4.23"
},
{
"CITY": "Appalachicola",
"STATE": "FL",
"HIGH": "5.98",
"LOW": "4.92",
"AVERAGE": "5.49"
},
{
"CITY": "Belie Is.",
"STATE": "FL",
"HIGH": "5.31",
"LOW": "4.58",
"AVERAGE": "4.99"
},
{
"CITY": "Miami",
"STATE": "FL",
"HIGH": "6.26",
"LOW": "5.05",
"AVERAGE": "5.62"
},
{
"CITY": "Gainesville",
"STATE": "FL",
"HIGH": "5.81",
"LOW": "4.71",
"AVERAGE": "5.27"
},
{
"CITY": "Tampa",
"STATE": "FL",
"HIGH": "6.16",
"LOW": "5.26",
"AVERAGE": "5.67"
},
{
"CITY": "Atlanta",
"STATE": "GA",
"HIGH": "5.16",
"LOW": "4.09",
"AVERAGE": "4.74"
},
{
"CITY": "Griffin",
"STATE": "GA",
"HIGH": "5.41",
"LOW": "4.26",
"AVERAGE": "4.99"
},
{
"CITY": "Honolulu",
"STATE": "HI",
"HIGH": "6.71",
"LOW": "5.59",
"AVERAGE": "6.02"
},
{
"CITY": "Ames",
"STATE": "IA",
"HIGH": "4.80",
"LOW": "3.73",
"AVERAGE": "4.40"
},
{
"CITY": "Boise",
"STATE": "ID",
"HIGH": "5.83",
"LOW": "3.33",
"AVERAGE": "4.92"
},
{
"CITY": "Twin Falls",
"STATE": "ID",
"HIGH": "5.42",
"LOW": "3.42",
"AVERAGE": "4.70"
},
{
"CITY": "Chicago",
"STATE": "IL",
"HIGH": "4.08",
"LOW": "1.47",
"AVERAGE": "3.14"
},
{
"CITY": "Indianapolis",
"STATE": "IN",
"HIGH": "5.02",
"LOW": "2.55",
"AVERAGE": "4.21"
},
{
"CITY": "Manhattan",
"STATE": "KS",
"HIGH": "5.08",
"LOW": "3.62",
"AVERAGE": "4.57"
},
{
"CITY": "Dodge City",
"STATE": "KS",
"HIGH": "6.50",
"LOW": "4.20",
"AVERAGE": "5.60"
},
{
"CITY": "Lexington",
"STATE": "KY",
"HIGH": "5.97",
"LOW": "3.60",
"AVERAGE": "4.94"
},
{
"CITY": "Lake Charles",
"STATE": "LA",
"HIGH": "5.73",
"LOW": "4.29",
"AVERAGE": "4.93"
},
{
"CITY": "New Orleans",
"STATE": "LA",
"HIGH": "5.71",
"LOW": "3.63",
"AVERAGE": "4.92"
},
{
"CITY": "Shreveport",
"STATE": "LA",
"HIGH": "4.99",
"LOW": "3.87",
"AVERAGE": "4.63"
},
{
"CITY": "Wareham",
"STATE": "MA",
"HIGH": "4.48",
"LOW": "3.06",
"AVERAGE": "3.99"
},
{
"CITY": "Boston",
"STATE": "MA",
"HIGH": "4.27",
"LOW": "2.99",
"AVERAGE": "3.84"
},
{
"CITY": "Blue Hill",
"STATE": "MA",
"HIGH": "4.38",
"LOW": "3.33",
"AVERAGE": "4.05"
},
{
"CITY": "Natick",
"STATE": "MA",
"HIGH": "4.62",
"LOW": "3.09",
"AVERAGE": "4.10"
},
{
"CITY": "Lynn",
"STATE": "MA",
"HIGH": "4.60",
"LOW": "2.33",
"AVERAGE": "3.79"
},
{
"CITY": "Silver Hill",
"STATE": "MD",
"HIGH": "4.71",
"LOW": "3.84",
"AVERAGE": "4.47"
},
{
"CITY": "Caribou",
"STATE": "ME",
"HIGH": "5.62",
"LOW": "2.57",
"AVERAGE": "4.19"
},
{
"CITY": "Portland",
"STATE": "ME",
"HIGH": "5.23",
"LOW": "3.56",
"AVERAGE": "4.51"
},
{
"CITY": "Saulte Ste. Marie",
"STATE": "MI",
"HIGH": "4.83",
"LOW": "2.33",
"AVERAGE": "4.20"
},
{
"CITY": "Lansing",
"STATE": "MI",
"HIGH": "4.71",
"LOW": "2.70",
"AVERAGE": "4.00"
},
{
"CITY": "St. Cloud",
"STATE": "MN",
"HIGH": "5.43",
"LOW": "3.53",
"AVERAGE": "4.53"
},
{
"CITY": "Columbia",
"STATE": "MO",
"HIGH": "5.50",
"LOW": "3.97",
"AVERAGE": "4.73"
},
{
"CITY": "St. Louis",
"STATE": "MO",
"HIGH": "4.87",
"LOW": "3.24",
"AVERAGE": "4.38"
},
{
"CITY": "Meridian",
"STATE": "MS",
"HIGH": "4.86",
"LOW": "3.64",
"AVERAGE": "4.43"
},
{
"CITY": "Glasgow",
"STATE": "NT",
"HIGH": "5.97",
"LOW": "4.09",
"AVERAGE": "5.15"
},
{
"CITY": "Great Falls",
"STATE": "NT",
"HIGH": "5.70",
"LOW": "3.66",
"AVERAGE": "4.93"
},
{
"CITY": "Summit",
"STATE": "MT",
"HIGH": "5.17",
"LOW": "2.36",
"AVERAGE": "3.99"
},
{
"CITY": "Albuquerque",
"STATE": "NM",
"HIGH": "7.16",
"LOW": "6.21",
"AVERAGE": "6.77"
},
{
"CITY": "Lincoln",
"STATE": "NB",
"HIGH": "5.40",
"LOW": "4.38",
"AVERAGE": "4.79"
},
{
"CITY": "N. Omaha",
"STATE": "NB",
"HIGH": "5.28",
"LOW": "4.26",
"AVERAGE": "4.90"
},
{
"CITY": "Cape Hatteras",
"STATE": "NC",
"HIGH": "5.81",
"LOW": "4.69",
"AVERAGE": "5.31"
},
{
"CITY": "Greensboro",
"STATE": "NC",
"HIGH": "5.05",
"LOW": "4.00",
"AVERAGE": "4.71"
},
{
"CITY": "Bismarck",
"STATE": "ND",
"HIGH": "5.48",
"LOW": "3.97",
"AVERAGE": "5.01"
},
{
"CITY": "Sea Brook",
"STATE": "NJ",
"HIGH": "4.76",
"LOW": "3.20",
"AVERAGE": "4.21"
},
{
"CITY": "Las Vegas",
"STATE": "NV",
"HIGH": "7.13",
"LOW": "5.84",
"AVERAGE": "6.41"
},
{
"CITY": "Ely",
"STATE": "NV",
"HIGH": "6.48",
"LOW": "5.49",
"AVERAGE": "5.98"
},
{
"CITY": "Binghamton",
"STATE": "NY",
"HIGH": "3.93",
"LOW": "1.62",
"AVERAGE": "3.16"
},
{
"CITY": "Ithaca",
"STATE": "NY",
"HIGH": "4.57",
"LOW": "2.29",
"AVERAGE": "3.79"
},
{
"CITY": "Schenectady",
"STATE": "NY",
"HIGH": "3.92",
"LOW": "2.53",
"AVERAGE": "3.55"
},
{
"CITY": "Rochester",
"STATE": "NY",
"HIGH": "4.22",
"LOW": "1.58",
"AVERAGE": "3.31"
},
{
"CITY": "New York City",
"STATE": "NY",
"HIGH": "4.97",
"LOW": "3.03",
"AVERAGE": "4.08"
},
{
"CITY": "Columbus",
"STATE": "OH",
"HIGH": "5.26",
"LOW": "2.66",
"AVERAGE": "4.15"
},
{
"CITY": "Cleveland",
"STATE": "OH",
"HIGH": "4.79",
"LOW": "2.69",
"AVERAGE": "3.94"
},
{
"CITY": "Stillwater",
"STATE": "OK",
"HIGH": "5.52",
"LOW": "4.22",
"AVERAGE": "4.99"
},
{
"CITY": "Oklahoma City",
"STATE": "OK",
"HIGH": "6.26",
"LOW": "4.98",
"AVERAGE": "5.59"
},
{
"CITY": "Astoria",
"STATE": "OR",
"HIGH": "4.76",
"LOW": "1.99",
"AVERAGE": "3.72"
},
{
"CITY": "Corvallis",
"STATE": "OR",
"HIGH": "5.71",
"LOW": "1.90",
"AVERAGE": "4.03"
},
{
"CITY": "Medford",
"STATE": "OR",
"HIGH": "5.84",
"LOW": "2.02",
"AVERAGE": "4.51"
},
{
"CITY": "Pittsburgh",
"STATE": "PA",
"HIGH": "4.19",
"LOW": "1.45",
"AVERAGE": "3.28"
},
{
"CITY": "State College",
"STATE": "PA",
"HIGH": "4.44",
"LOW": "2.79",
"AVERAGE": "3.91"
},
{
"CITY": "Newport",
"STATE": "RI",
"HIGH": "4.69",
"LOW": "3.58",
"AVERAGE": "4.23"
},
{
"CITY": "Charleston (SC)",
"STATE": "SC",
"HIGH": "5.72",
"LOW": "4.23",
"AVERAGE": "5.06"
},
{
"CITY": "Rapid City",
"STATE": "SD",
"HIGH": "5.91",
"LOW": "4.56",
"AVERAGE": "5.23"
},
{
"CITY": "Nashville",
"STATE": "TN",
"HIGH": "5.20",
"LOW": "3.14",
"AVERAGE": "4.45"
},
{
"CITY": "Oak Ridge",
"STATE": "TN",
"HIGH": "5.06",
"LOW": "3.22",
"AVERAGE": "4.37"
},
{
"CITY": "San Antonio",
"STATE": "TX",
"HIGH": "5.88",
"LOW": "4.65",
"AVERAGE": "5.30"
},
{
"CITY": "Brownsville",
"STATE": "TX",
"HIGH": "5.49",
"LOW": "4.42",
"AVERAGE": "4.92"
},
{
"CITY": "El Paso",
"STATE": "TX",
"HIGH": "7.42",
"LOW": "5.87",
"AVERAGE": "6.72"
},
{
"CITY": "Midland",
"STATE": "TX",
"HIGH": "6.33",
"LOW": "5.23",
"AVERAGE": "5.83"
},
{
"CITY": "Fort Worth",
"STATE": "TX",
"HIGH": "6.00",
"LOW": "4.80",
"AVERAGE": "5.43"
},
{
"CITY": "Salt Lake City",
"STATE": "UT",
"HIGH": "6.09",
"LOW": "3.78",
"AVERAGE": "5.26"
},
{
"CITY": "Flaming Gorge",
"STATE": "UT",
"HIGH": "6.63",
"LOW": "5.48",
"AVERAGE": "5.83"
},
{
"CITY": "Richmond",
"STATE": "VA",
"HIGH": "4.50",
"LOW": "3.37",
"AVERAGE": "4.13"
},
{
"CITY": "Seattle",
"STATE": "WA",
"HIGH": "4.83",
"LOW": "1.60",
"AVERAGE": "3.57"
},
{
"CITY": "Richland",
"STATE": "WA",
"HIGH": "6.13",
"LOW": "2.01",
"AVERAGE": "4.44"
},
{
"CITY": "Pullman",
"STATE": "WA",
"HIGH": "6.07",
"LOW": "2.90",
"AVERAGE": "4.73"
},
{
"CITY": "Spokane",
"STATE": "WA",
"HIGH": "5.53",
"LOW": "1.16",
"AVERAGE": "4.48"
},
{
"CITY": "Prosser",
"STATE": "WA",
"HIGH": "6.21",
"LOW": "3.06",
"AVERAGE": "5.03"
},
{
"CITY": "Madison",
"STATE": "WI",
"HIGH": "4.85",
"LOW": "3.28",
"AVERAGE": "4.29"
},
{
"CITY": "Charleston (WV)",
"STATE": "WV",
"HIGH": "4.12",
"LOW": "2.47",
"AVERAGE": "3.65"
},
{
"CITY": "Lander",
"STATE": "WY",
"HIGH": "6.81",
"LOW": "5.50",
"AVERAGE": "6.06"
}
],
};
// Lame ass polyfill for lame ass IE11
if (!Object.entries) {
Object.entries = function( obj ){
var ownProps = Object.keys( obj ),
i = ownProps.length,
resArray = new Array(i); // preallocate the Array
while (i--)
resArray[i] = [ownProps[i], obj[ownProps[i]]];
return resArray;
};
}
function showCity(city) {
var res = "";
cityList.list.forEach(function(info){
if (info.CITY === city) {
Object.entries(info).forEach(function(entry) {
var key = entry[0];
var value = entry[1];
res += '
' + key + ': ' + value + '
';
});
mapResults.innerHTML = res;
}
});
}