diff --git a/README.md b/README.md index 2751136..de76fa6 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,14 @@ a city and be provided with both current weather and a 5-day forecast of that ci Indicators deemed relevant for this dashboard include, temperature, wind speed and UV index. The search history of cities is also stored on the user's machine locally +Desktop Layout +![Desktop View](assets/desktop-view.png) + + * Autocomplete is based off user's local storage state on load combined with [a list of US cities](https://gist.github.com/Miserlou/c5cd8364bf9b2420bb29) filtered to only include those with populations greater than 100,000 + +Mobile Layout + +![Mobile View](assets/mobile-view.png) ## APIs -[Open Weather OneCall API](https://openweathermap.org/api/one-call-api) +[Open Weather OneCall API](https://openweathermap.org/api/one-call-api) \ No newline at end of file diff --git a/assets/app.js b/assets/app.js index 9685d5c..d6c6081 100644 --- a/assets/app.js +++ b/assets/app.js @@ -5,299 +5,299 @@ const iconPathPrefix = "https://openweathermap.org/img/wn/"; const iconPathSuffix = "@2x.png"; // All US cities with a population greater than 100,000 const cityList = [ - "New York,New York", - "Los Angeles,California", - "Chicago,Illinois", - "Houston,Texas", - "Philadelphia,Pennsylvania", - "Phoenix,Arizona", - "San Antonio,Texas", - "San Diego,California", - "Dallas,Texas", - "San Jose,California", - "Austin,Texas", - "Indianapolis,Indiana", - "Jacksonville,Florida", - "San Francisco,California", - "Columbus,Ohio", - "Charlotte,North Carolina", - "Fort Worth,Texas", - "Detroit,Michigan", - "El Paso,Texas", - "Memphis,Tennessee", - "Seattle,Washington", - "Denver,Colorado", - "Washington,District of Columbia", - "Boston,Massachusetts", - "Nashville-Davidson,Tennessee", - "Baltimore,Maryland", - "Oklahoma City,Oklahoma", - "Louisville/Jefferson County,Kentucky", - "Portland,Oregon", - "Las Vegas,Nevada", - "Milwaukee,Wisconsin", - "Albuquerque,New Mexico", - "Tucson,Arizona", - "Fresno,California", - "Sacramento,California", - "Long Beach,California", - "Kansas City,Missouri", - "Mesa,Arizona", - "Virginia Beach,Virginia", - "Atlanta,Georgia", - "Colorado Springs,Colorado", - "Omaha,Nebraska", - "Raleigh,North Carolina", - "Miami,Florida", - "Oakland,California", - "Minneapolis,Minnesota", - "Tulsa,Oklahoma", - "Cleveland,Ohio", - "Wichita,Kansas", - "Arlington,Texas", - "New Orleans,Louisiana", - "Bakersfield,California", - "Tampa,Florida", - "Honolulu,Hawaii", - "Aurora,Colorado", - "Anaheim,California", - "Santa Ana,California", - "St. Louis,Missouri", - "Riverside,California", - "Corpus Christi,Texas", - "Lexington-Fayette,Kentucky", - "Pittsburgh,Pennsylvania", - "Anchorage,Alaska", - "Stockton,California", - "Cincinnati,Ohio", - "St. Paul,Minnesota", - "Toledo,Ohio", - "Greensboro,North Carolina", - "Newark,New Jersey", - "Plano,Texas", - "Henderson,Nevada", - "Lincoln,Nebraska", - "Buffalo,New York", - "Jersey City,New Jersey", - "Chula Vista,California", - "Fort Wayne,Indiana", - "Orlando,Florida", - "St. Petersburg,Florida", - "Chandler,Arizona", - "Laredo,Texas", - "Norfolk,Virginia", - "Durham,North Carolina", - "Madison,Wisconsin", - "Lubbock,Texas", - "Irvine,California", - "Winston-Salem,North Carolina", - "Glendale,Arizona", - "Garland,Texas", - "Hialeah,Florida", - "Reno,Nevada", - "Chesapeake,Virginia", - "Gilbert,Arizona", - "Baton Rouge,Louisiana", - "Irving,Texas", - "Scottsdale,Arizona", - "North Las Vegas,Nevada", - "Fremont,California", - "Boise City,Idaho", - "Richmond,Virginia", - "San Bernardino,California", - "Birmingham,Alabama", - "Spokane,Washington", - "Rochester,New York", - "Des Moines,Iowa", - "Modesto,California", - "Fayetteville,North Carolina", - "Tacoma,Washington", - "Oxnard,California", - "Fontana,California", - "Columbus,Georgia", - "Montgomery,Alabama", - "Moreno Valley,California", - "Shreveport,Louisiana", - "Aurora,Illinois", - "Yonkers,New York", - "Akron,Ohio", - "Huntington Beach,California", - "Little Rock,Arkansas", - "Augusta-Richmond County,Georgia", - "Amarillo,Texas", - "Glendale,California", - "Mobile,Alabama", - "Grand Rapids,Michigan", - "Salt Lake City,Utah", - "Tallahassee,Florida", - "Huntsville,Alabama", - "Grand Prairie,Texas", - "Knoxville,Tennessee", - "Worcester,Massachusetts", - "Newport News,Virginia", - "Brownsville,Texas", - "Overland Park,Kansas", - "Santa Clarita,California", - "Providence,Rhode Island", - "Garden Grove,California", - "Chattanooga,Tennessee", - "Oceanside,California", - "Jackson,Mississippi", - "Fort Lauderdale,Florida", - "Santa Rosa,California", - "Rancho Cucamonga,California", - "Port St. Lucie,Florida", - "Tempe,Arizona", - "Ontario,California", - "Vancouver,Washington", - "Cape Coral,Florida", - "Sioux Falls,South Dakota", - "Springfield,Missouri", - "Peoria,Arizona", - "Pembroke Pines,Florida", - "Elk Grove,California", - "Salem,Oregon", - "Lancaster,California", - "Corona,California", - "Eugene,Oregon", - "Palmdale,California", - "Salinas,California", - "Springfield,Massachusetts", - "Pasadena,Texas", - "Fort Collins,Colorado", - "Hayward,California", - "Pomona,California", - "Cary,North Carolina", - "Rockford,Illinois", - "Alexandria,Virginia", - "Escondido,California", - "McKinney,Texas", - "Kansas City,Kansas", - "Joliet,Illinois", - "Sunnyvale,California", - "Torrance,California", - "Bridgeport,Connecticut", - "Lakewood,Colorado", - "Hollywood,Florida", - "Paterson,New Jersey", - "Naperville,Illinois", - "Syracuse,New York", - "Mesquite,Texas", - "Dayton,Ohio", - "Savannah,Georgia", - "Clarksville,Tennessee", - "Orange,California", - "Pasadena,California", - "Fullerton,California", - "Killeen,Texas", - "Frisco,Texas", - "Hampton,Virginia", - "McAllen,Texas", - "Warren,Michigan", - "Bellevue,Washington", - "West Valley City,Utah", - "Columbia,South Carolina", - "Olathe,Kansas", - "Sterling Heights,Michigan", - "New Haven,Connecticut", - "Miramar,Florida", - "Waco,Texas", - "Thousand Oaks,California", - "Cedar Rapids,Iowa", - "Charleston,South Carolina", - "Visalia,California", - "Topeka,Kansas", - "Elizabeth,New Jersey", - "Gainesville,Florida", - "Thornton,Colorado", - "Roseville,California", - "Carrollton,Texas", - "Coral Springs,Florida", - "Stamford,Connecticut", - "Simi Valley,California", - "Concord,California", - "Hartford,Connecticut", - "Kent,Washington", - "Lafayette,Louisiana", - "Midland,Texas", - "Surprise,Arizona", - "Denton,Texas", - "Victorville,California", - "Evansville,Indiana", - "Santa Clara,California", - "Abilene,Texas", - "Athens-Clarke County,Georgia", - "Vallejo,California", - "Allentown,Pennsylvania", - "Norman,Oklahoma", - "Beaumont,Texas", - "Independence,Missouri", - "Murfreesboro,Tennessee", - "Ann Arbor,Michigan", - "Springfield,Illinois", - "Berkeley,California", - "Peoria,Illinois", - "Provo,Utah", - "El Monte,California", - "Columbia,Missouri", - "Lansing,Michigan", - "Fargo,North Dakota", - "Downey,California", - "Costa Mesa,California", - "Wilmington,North Carolina", - "Arvada,Colorado", - "Inglewood,California", - "Miami Gardens,Florida", - "Carlsbad,California", - "Westminster,Colorado", - "Rochester,Minnesota", - "Odessa,Texas", - "Manchester,New Hampshire", - "Elgin,Illinois", - "West Jordan,Utah", - "Round Rock,Texas", - "Clearwater,Florida", - "Waterbury,Connecticut", - "Gresham,Oregon", - "Fairfield,California", - "Billings,Montana", - "Lowell,Massachusetts", - "San Buenaventura (Ventura),California", - "Pueblo,Colorado", - "High Point,North Carolina", - "West Covina,California", - "Richmond,California", - "Murrieta,California", - "Cambridge,Massachusetts", - "Antioch,California", - "Temecula,California", - "Norwalk,California", - "Centennial,Colorado", - "Everett,Washington", - "Palm Bay,Florida", - "Wichita Falls,Texas", - "Green Bay,Wisconsin", - "Daly City,California", - "Burbank,California", - "Richardson,Texas", - "Pompano Beach,Florida", - "North Charleston,South Carolina", - "Broken Arrow,Oklahoma", - "Boulder,Colorado", - "West Palm Beach,Florida", - "Santa Maria,California", - "El Cajon,California", - "Davenport,Iowa", - "Rialto,California", - "Las Cruces,New Mexico", - "San Mateo,California", - "Lewisville,Texas", - "South Bend,Indiana", - "Lakeland,Florida", - "Erie,Pennsylvania", - "Tyler,Texas", - "Pearland,Texas", - "College Station,Texas", + "New York, New York", + "Los Angeles, California", + "Chicago, Illinois", + "Houston, Texas", + "Philadelphia, Pennsylvania", + "Phoenix, Arizona", + "San Antonio, Texas", + "San Diego, California", + "Dallas, Texas", + "San Jose, California", + "Austin, Texas", + "Indianapolis, Indiana", + "Jacksonville, Florida", + "San Francisco, California", + "Columbus, Ohio", + "Charlotte, North Carolina", + "Fort Worth, Texas", + "Detroit, Michigan", + "El Paso, Texas", + "Memphis, Tennessee", + "Seattle, Washington", + "Denver, Colorado", + "Washington, District of Columbia", + "Boston, Massachusetts", + "Nashville-Davidson, Tennessee", + "Baltimore, Maryland", + "Oklahoma City, Oklahoma", + "Louisville/Jefferson County, Kentucky", + "Portland, Oregon", + "Las Vegas, Nevada", + "Milwaukee, Wisconsin", + "Albuquerque, New Mexico", + "Tucson, Arizona", + "Fresno, California", + "Sacramento, California", + "Long Beach, California", + "Kansas City, Missouri", + "Mesa, Arizona", + "Virginia Beach, Virginia", + "Atlanta, Georgia", + "Colorado Springs, Colorado", + "Omaha, Nebraska", + "Raleigh, North Carolina", + "Miami, Florida", + "Oakland, California", + "Minneapolis, Minnesota", + "Tulsa, Oklahoma", + "Cleveland, Ohio", + "Wichita, Kansas", + "Arlington, Texas", + "New Orleans, Louisiana", + "Bakersfield, California", + "Tampa, Florida", + "Honolulu, Hawaii", + "Aurora, Colorado", + "Anaheim, California", + "Santa Ana, California", + "St. Louis, Missouri", + "Riverside, California", + "Corpus Christi, Texas", + "Lexington-Fayette, Kentucky", + "Pittsburgh, Pennsylvania", + "Anchorage, Alaska", + "Stockton, California", + "Cincinnati, Ohio", + "St. Paul, Minnesota", + "Toledo, Ohio", + "Greensboro, North Carolina", + "Newark, New Jersey", + "Plano, Texas", + "Henderson, Nevada", + "Lincoln, Nebraska", + "Buffalo, New York", + "Jersey City, New Jersey", + "Chula Vista, California", + "Fort Wayne, Indiana", + "Orlando, Florida", + "St. Petersburg, Florida", + "Chandler, Arizona", + "Laredo, Texas", + "Norfolk, Virginia", + "Durham, North Carolina", + "Madison, Wisconsin", + "Lubbock, Texas", + "Irvine, California", + "Winston-Salem, North Carolina", + "Glendale, Arizona", + "Garland, Texas", + "Hialeah, Florida", + "Reno, Nevada", + "Chesapeake, Virginia", + "Gilbert, Arizona", + "Baton Rouge, Louisiana", + "Irving, Texas", + "Scottsdale, Arizona", + "North Las Vegas, Nevada", + "Fremont, California", + "Boise City, Idaho", + "Richmond, Virginia", + "San Bernardino, California", + "Birmingham, Alabama", + "Spokane, Washington", + "Rochester, New York", + "Des Moines, Iowa", + "Modesto, California", + "Fayetteville, North Carolina", + "Tacoma, Washington", + "Oxnard, California", + "Fontana, California", + "Columbus, Georgia", + "Montgomery, Alabama", + "Moreno Valley, California", + "Shreveport, Louisiana", + "Aurora, Illinois", + "Yonkers, New York", + "Akron, Ohio", + "Huntington Beach, California", + "Little Rock, Arkansas", + "Augusta-Richmond County, Georgia", + "Amarillo, Texas", + "Glendale, California", + "Mobile, Alabama", + "Grand Rapids, Michigan", + "Salt Lake City, Utah", + "Tallahassee, Florida", + "Huntsville, Alabama", + "Grand Prairie, Texas", + "Knoxville, Tennessee", + "Worcester, Massachusetts", + "Newport News, Virginia", + "Brownsville, Texas", + "Overland Park, Kansas", + "Santa Clarita, California", + "Providence, Rhode Island", + "Garden Grove, California", + "Chattanooga, Tennessee", + "Oceanside, California", + "Jackson, Mississippi", + "Fort Lauderdale, Florida", + "Santa Rosa, California", + "Rancho Cucamonga, California", + "Port St. Lucie, Florida", + "Tempe, Arizona", + "Ontario, California", + "Vancouver, Washington", + "Cape Coral, Florida", + "Sioux Falls, South Dakota", + "Springfield, Missouri", + "Peoria, Arizona", + "Pembroke Pines, Florida", + "Elk Grove, California", + "Salem, Oregon", + "Lancaster, California", + "Corona, California", + "Eugene, Oregon", + "Palmdale, California", + "Salinas, California", + "Springfield, Massachusetts", + "Pasadena, Texas", + "Fort Collins, Colorado", + "Hayward, California", + "Pomona, California", + "Cary, North Carolina", + "Rockford, Illinois", + "Alexandria, Virginia", + "Escondido, California", + "McKinney, Texas", + "Kansas City, Kansas", + "Joliet, Illinois", + "Sunnyvale, California", + "Torrance, California", + "Bridgeport, Connecticut", + "Lakewood, Colorado", + "Hollywood, Florida", + "Paterson, New Jersey", + "Naperville, Illinois", + "Syracuse, New York", + "Mesquite, Texas", + "Dayton, Ohio", + "Savannah, Georgia", + "Clarksville, Tennessee", + "Orange, California", + "Pasadena, California", + "Fullerton, California", + "Killeen, Texas", + "Frisco, Texas", + "Hampton, Virginia", + "McAllen, Texas", + "Warren, Michigan", + "Bellevue, Washington", + "West Valley City, Utah", + "Columbia, South Carolina", + "Olathe, Kansas", + "Sterling Heights, Michigan", + "New Haven, Connecticut", + "Miramar, Florida", + "Waco, Texas", + "Thousand Oaks, California", + "Cedar Rapids, Iowa", + "Charleston, South Carolina", + "Visalia, California", + "Topeka, Kansas", + "Elizabeth, New Jersey", + "Gainesville, Florida", + "Thornton, Colorado", + "Roseville, California", + "Carrollton, Texas", + "Coral Springs, Florida", + "Stamford, Connecticut", + "Simi Valley, California", + "Concord, California", + "Hartford, Connecticut", + "Kent, Washington", + "Lafayette, Louisiana", + "Midland, Texas", + "Surprise, Arizona", + "Denton, Texas", + "Victorville, California", + "Evansville, Indiana", + "Santa Clara, California", + "Abilene, Texas", + "Athens-Clarke County, Georgia", + "Vallejo, California", + "Allentown, Pennsylvania", + "Norman, Oklahoma", + "Beaumont, Texas", + "Independence, Missouri", + "Murfreesboro, Tennessee", + "Ann Arbor, Michigan", + "Springfield, Illinois", + "Berkeley, California", + "Peoria, Illinois", + "Provo, Utah", + "El Monte, California", + "Columbia, Missouri", + "Lansing, Michigan", + "Fargo, North Dakota", + "Downey, California", + "Costa Mesa, California", + "Wilmington, North Carolina", + "Arvada, Colorado", + "Inglewood, California", + "Miami Gardens, Florida", + "Carlsbad, California", + "Westminster, Colorado", + "Rochester, Minnesota", + "Odessa, Texas", + "Manchester, New Hampshire", + "Elgin, Illinois", + "West Jordan, Utah", + "Round Rock, Texas", + "Clearwater, Florida", + "Waterbury, Connecticut", + "Gresham, Oregon", + "Fairfield, California", + "Billings, Montana", + "Lowell, Massachusetts", + "San Buenaventura (Ventura), California", + "Pueblo, Colorado", + "High Point, North Carolina", + "West Covina, California", + "Richmond, California", + "Murrieta, California", + "Cambridge, Massachusetts", + "Antioch, California", + "Temecula, California", + "Norwalk, California", + "Centennial, Colorado", + "Everett, Washington", + "Palm Bay, Florida", + "Wichita Falls, Texas", + "Green Bay, Wisconsin", + "Daly City, California", + "Burbank, California", + "Richardson, Texas", + "Pompano Beach, Florida", + "North Charleston, South Carolina", + "Broken Arrow, Oklahoma", + "Boulder, Colorado", + "West Palm Beach, Florida", + "Santa Maria, California", + "El Cajon, California", + "Davenport, Iowa", + "Rialto, California", + "Las Cruces, New Mexico", + "San Mateo, California", + "Lewisville, Texas", + "South Bend, Indiana", + "Lakeland, Florida", + "Erie, Pennsylvania", + "Tyler, Texas", + "Pearland, Texas", + "College Station, Texas", ]; var mainCard; @@ -335,9 +335,6 @@ function handleWeatherData(response) { const currSummObj = createWeatherSummaryObject(response.current); let uvColor; - console.log("id: ", currSummObj.icon); - console.log("curr summ obj: ", currSummObj.description); - for (let i = 0; i < 5; i += 1) { const day = response.daily[i]; const daySummary = createWeatherSummaryObject(day); diff --git a/assets/desktop-view.png b/assets/desktop-view.png new file mode 100644 index 0000000..5e2b4a0 Binary files /dev/null and b/assets/desktop-view.png differ diff --git a/assets/mobile-view.png b/assets/mobile-view.png new file mode 100644 index 0000000..90a5cbb Binary files /dev/null and b/assets/mobile-view.png differ