From d62fd64ad17f2dfd8ab8b2fd7d75e46b73ca9b21 Mon Sep 17 00:00:00 2001 From: Brian Vanderwende Date: Tue, 17 Apr 2018 23:22:12 -0600 Subject: [PATCH] Added Seattle, WA to the city roster To further the community effort to add cities, I have added Seattle, WA to the weather simulator. Data was gathered from: https://www.usclimatedata.com/climate/seattle/washington/united-states/uswa0844 --- cities/seattle.json | 17 +++++++++++++++++ wxgen.py | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 cities/seattle.json diff --git a/cities/seattle.json b/cities/seattle.json new file mode 100644 index 0000000..b1105a5 --- /dev/null +++ b/cities/seattle.json @@ -0,0 +1,17 @@ +{ + "name": "Seattle", + "state": "WA", + "high": { + "avg": 15.7, + "std": 3.1 + }, + "low": { + "avg": 7.2, + "std": 3.1 + }, + "precip": { + "yamt": 943.0, + "std": 6.0, + "days": 147.0 + } +} diff --git a/wxgen.py b/wxgen.py index 619d5a6..e499dc6 100755 --- a/wxgen.py +++ b/wxgen.py @@ -2,7 +2,7 @@ # # Script: wxgen.py # Author: Brian Vanderwende -# Last Revised: 15:33, 13 Apr 2018 +# Last Revised: 23:21, 17 Apr 2018 # # This code generates a fake weather forecast for Boulder, CO # @@ -13,7 +13,7 @@ from datetime import datetime # User settings -city_list = ["boulder","philadelphia"] +city_list = ["boulder","philadelphia","seattle"] fcst_path = "forecasts/{}.txt" num_days = 7