barometer 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +2 -2
- data/lib/barometer/query/converters/from_coordinates_to_noaa_station_id.rb +1 -1
- data/lib/barometer/query/services/noaa_station_id.rb +9 -3
- data/lib/barometer/version.rb +1 -1
- data/lib/barometer/weather_service.rb +0 -1
- data/spec/cassettes/Service_NoaaStation.json +1 -1
- data/spec/query/converters/from_coordinates_to_noaa_station_id_spec.rb +46 -31
- data/spec/query/services/noaa_station_id_spec.rb +27 -16
- metadata +2 -19
- data/lib/barometer/weather_services/yahoo.rb +0 -27
- data/lib/barometer/weather_services/yahoo/api.rb +0 -21
- data/lib/barometer/weather_services/yahoo/query.rb +0 -42
- data/lib/barometer/weather_services/yahoo/response.rb +0 -39
- data/lib/barometer/weather_services/yahoo/response/current_weather.rb +0 -86
- data/lib/barometer/weather_services/yahoo/response/forecasted_weather.rb +0 -71
- data/lib/barometer/weather_services/yahoo/response/location.rb +0 -47
- data/lib/barometer/weather_services/yahoo/response/sun.rb +0 -43
- data/lib/barometer/weather_services/yahoo/response/timezone.rb +0 -15
- data/spec/cassettes/WeatherService_ForecastIo.json +0 -1
- data/spec/cassettes/WeatherService_Yahoo.json +0 -1
- data/spec/weather_services/yahoo/response_spec.rb +0 -73
- data/spec/weather_services/yahoo_spec.rb +0 -60
@@ -1,71 +0,0 @@
|
|
1
|
-
module Barometer
|
2
|
-
module WeatherService
|
3
|
-
class Yahoo
|
4
|
-
class Response
|
5
|
-
class ForecastedWeather
|
6
|
-
def initialize(payload, timezone, current_sun)
|
7
|
-
@payload = payload
|
8
|
-
@timezone = timezone
|
9
|
-
@current_sun = current_sun
|
10
|
-
@predictions = Barometer::Response::PredictionCollection.new
|
11
|
-
end
|
12
|
-
|
13
|
-
def parse
|
14
|
-
each_prediction do |prediction, forecast_payload|
|
15
|
-
prediction.date = date(forecast_payload), timezone
|
16
|
-
prediction.icon = icon(forecast_payload)
|
17
|
-
prediction.condition = condition(forecast_payload)
|
18
|
-
prediction.high = high(forecast_payload)
|
19
|
-
prediction.low = low(forecast_payload)
|
20
|
-
prediction.sun = sun(forecast_payload, prediction.starts_at, prediction.ends_at)
|
21
|
-
end
|
22
|
-
|
23
|
-
predictions
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
attr_reader :payload, :timezone, :predictions, :current_sun
|
29
|
-
|
30
|
-
def units
|
31
|
-
payload.units
|
32
|
-
end
|
33
|
-
|
34
|
-
def each_prediction
|
35
|
-
payload.fetch_each('item', 'forecast') do |forecast_payload|
|
36
|
-
predictions.build do |prediction|
|
37
|
-
yield prediction, forecast_payload
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def date(forecast_payload)
|
43
|
-
forecast_payload.fetch('@date')
|
44
|
-
end
|
45
|
-
|
46
|
-
def icon(forecast_payload)
|
47
|
-
forecast_payload.fetch('@code')
|
48
|
-
end
|
49
|
-
|
50
|
-
def condition(forecast_payload)
|
51
|
-
forecast_payload.fetch('@text')
|
52
|
-
end
|
53
|
-
|
54
|
-
def high(forecast_payload)
|
55
|
-
[units, forecast_payload.fetch('@high')]
|
56
|
-
end
|
57
|
-
|
58
|
-
def low(forecast_payload)
|
59
|
-
[units, forecast_payload.fetch('@low')]
|
60
|
-
end
|
61
|
-
|
62
|
-
def sun(forecast_payload, starts_at, ends_at)
|
63
|
-
utc_rise_time = Utils::Time.utc_merge_base_plus_time(starts_at, current_sun.rise)
|
64
|
-
utc_set_time = Utils::Time.utc_merge_base_plus_time(ends_at, current_sun.set)
|
65
|
-
Data::Sun.new(rise: utc_rise_time, set: utc_set_time)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module Barometer
|
2
|
-
module WeatherService
|
3
|
-
class Yahoo
|
4
|
-
class Response
|
5
|
-
class Location
|
6
|
-
def initialize(payload)
|
7
|
-
@payload = payload
|
8
|
-
end
|
9
|
-
|
10
|
-
def parse
|
11
|
-
Data::Location.new(
|
12
|
-
city: city,
|
13
|
-
state_code: state_code,
|
14
|
-
country_code: country_code,
|
15
|
-
latitude: latitude,
|
16
|
-
longitude: longitude
|
17
|
-
)
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
attr_reader :payload
|
23
|
-
|
24
|
-
def city
|
25
|
-
payload.fetch('location', '@city')
|
26
|
-
end
|
27
|
-
|
28
|
-
def state_code
|
29
|
-
payload.fetch('location', '@region')
|
30
|
-
end
|
31
|
-
|
32
|
-
def country_code
|
33
|
-
payload.fetch('location', '@country')
|
34
|
-
end
|
35
|
-
|
36
|
-
def latitude
|
37
|
-
payload.fetch('item', 'lat')
|
38
|
-
end
|
39
|
-
|
40
|
-
def longitude
|
41
|
-
payload.fetch('item', 'long')
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
module Barometer
|
2
|
-
module WeatherService
|
3
|
-
class Yahoo
|
4
|
-
class Response
|
5
|
-
class Sun
|
6
|
-
def initialize(payload, base_time)
|
7
|
-
@payload = payload
|
8
|
-
@base_time = base_time
|
9
|
-
end
|
10
|
-
|
11
|
-
def parse
|
12
|
-
return if local_rise_time.nil? || local_set_time.nil?
|
13
|
-
Data::Sun.new(rise: utc_rise_time, set: utc_set_time)
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
attr_reader :payload, :base_time
|
19
|
-
|
20
|
-
def local_rise_time
|
21
|
-
@local_rise_time ||= Utils::Time.parse(payload.fetch('astronomy', '@sunrise'))
|
22
|
-
end
|
23
|
-
|
24
|
-
def local_set_time
|
25
|
-
@local_set_time ||= Utils::Time.parse(payload.fetch('astronomy', '@sunset'))
|
26
|
-
end
|
27
|
-
|
28
|
-
def utc_rise_time
|
29
|
-
Utils::Time.utc_from_base_plus_local_time(
|
30
|
-
base_time.timezone, base_time.base, local_rise_time.hour, local_rise_time.min
|
31
|
-
)
|
32
|
-
end
|
33
|
-
|
34
|
-
def utc_set_time
|
35
|
-
Utils::Time.utc_from_base_plus_local_time(
|
36
|
-
base_time.timezone, base_time.base, local_set_time.hour, local_set_time.min
|
37
|
-
)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"get","uri":"https://api.darkskyapp.com/v1/forecast/FORECAST_IO_APIKEY/42.7243,-73.6927?units=si","body":{"encoding":"US-ASCII","string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx/1.1.19"],"Date":["Thu, 05 Sep 2013 02:31:07 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["7213"],"Connection":["close"],"X-Powered-By":["Express"],"X-Forecast-Api-Calls":["1"],"Etag":["\"-1525689390\""]},"body":{"encoding":"US-ASCII","string":"{\"hourPrecipitation\":[{\"time\":1378348262,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348322,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348382,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348442,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348502,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348562,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348622,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348682,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348742,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348802,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348862,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348922,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378348982,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349042,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349102,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349162,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349222,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349282,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349342,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349402,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349462,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349522,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349582,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349642,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349702,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349762,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349822,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349882,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378349942,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350002,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350062,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350122,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350182,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350242,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350302,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350362,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350422,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350482,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350542,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350602,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350662,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350722,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350782,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350842,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350902,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378350962,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351022,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351082,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351142,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351202,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351262,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351322,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351382,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351442,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351502,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351562,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351622,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351682,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351742,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"},{\"time\":1378351802,\"probability\":0,\"intensity\":0,\"error\":0,\"type\":\"rain\"}],\"radarStation\":\"enx\",\"dayPrecipitation\":[{\"time\":1378346400,\"probability\":0.03,\"type\":\"rain\",\"temp\":61,\"cloudCover\":0,\"relHumidity\":0.8},{\"time\":1378350000,\"probability\":0.05,\"type\":\"rain\",\"temp\":61,\"cloudCover\":0.61,\"relHumidity\":0.83},{\"time\":1378353600,\"probability\":0.08,\"type\":\"rain\",\"temp\":62,\"cloudCover\":0.63,\"relHumidity\":0.8},{\"time\":1378357200,\"probability\":0.11,\"type\":\"rain\",\"temp\":62,\"cloudCover\":0.93,\"relHumidity\":0.83},{\"time\":1378360800,\"probability\":0.27,\"type\":\"rain\",\"temp\":62,\"cloudCover\":1,\"relHumidity\":0.82},{\"time\":1378364400,\"probability\":0.32,\"type\":\"rain\",\"temp\":62,\"cloudCover\":1,\"relHumidity\":0.79},{\"time\":1378368000,\"probability\":0.2,\"type\":\"rain\",\"temp\":61,\"cloudCover\":1,\"relHumidity\":0.82},{\"time\":1378371600,\"probability\":0.17,\"type\":\"rain\",\"temp\":60,\"cloudCover\":1,\"relHumidity\":0.85},{\"time\":1378375200,\"probability\":0.13,\"type\":\"rain\",\"temp\":58,\"cloudCover\":1,\"relHumidity\":0.87},{\"time\":1378378800,\"probability\":0.11,\"type\":\"rain\",\"temp\":57,\"cloudCover\":1,\"relHumidity\":0.87},{\"time\":1378382400,\"probability\":0.08,\"type\":\"rain\",\"temp\":59,\"cloudCover\":1,\"relHumidity\":0.82},{\"time\":1378386000,\"probability\":0.06,\"type\":\"rain\",\"temp\":60,\"cloudCover\":0.8,\"relHumidity\":0.76},{\"time\":1378389600,\"probability\":0.04,\"type\":\"rain\",\"temp\":62,\"cloudCover\":0.78,\"relHumidity\":0.69},{\"time\":1378393200,\"probability\":0.03,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0.47,\"relHumidity\":0.62},{\"time\":1378396800,\"probability\":0.02,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0.44,\"relHumidity\":0.58},{\"time\":1378400400,\"probability\":0.02,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0.21,\"relHumidity\":0.53},{\"time\":1378404000,\"probability\":0.03,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0.13,\"relHumidity\":0.51},{\"time\":1378407600,\"probability\":0.01,\"type\":\"rain\",\"temp\":64,\"cloudCover\":0.12,\"relHumidity\":0.49},{\"time\":1378411200,\"probability\":0,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0,\"relHumidity\":0.47},{\"time\":1378414800,\"probability\":0,\"type\":\"rain\",\"temp\":63,\"cloudCover\":0,\"relHumidity\":0.44},{\"time\":1378418400,\"probability\":0,\"type\":\"rain\",\"temp\":61,\"cloudCover\":0,\"relHumidity\":0.46},{\"time\":1378422000,\"probability\":0,\"type\":\"rain\",\"temp\":58,\"cloudCover\":0,\"relHumidity\":0.5},{\"time\":1378425600,\"probability\":0,\"type\":\"rain\",\"temp\":54,\"cloudCover\":0,\"relHumidity\":0.55},{\"time\":1378429200,\"probability\":0.01,\"type\":\"rain\",\"temp\":52,\"cloudCover\":0,\"relHumidity\":0.59},{\"time\":1378432800,\"probability\":0.02,\"type\":\"rain\",\"temp\":50,\"cloudCover\":0,\"relHumidity\":0.64}],\"currentTemp\":61,\"timezone\":\"America/New_York (EDT, -0400)\",\"currentSummary\":\"clear\",\"hourSummary\":\"clear\",\"daySummary\":\"moderate chance of rain later tonight through tomorrow morning\",\"isPrecipitating\":false,\"currentIntensity\":0,\"minutesUntilChange\":0,\"checkTimeout\":1320}"},"http_version":null},"recorded_at":"Thu, 05 Sep 2013 02:31:07 GMT"},{"request":{"method":"get","uri":"https://api.forecast.io/forecast/FORECAST_IO_APIKEY/42.7243,-73.6927?units=si","body":{"encoding":"UTF-8","string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx/1.1.19"],"Date":["Sat, 26 Oct 2013 14:41:51 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["24310"],"Connection":["close"],"X-Powered-By":["Express"],"X-Forecast-Api-Calls":["2"],"Cache-Control":["max-age=9"],"Expires":["Sat, 26 Oct 2013 14:42:00 +0000"],"Etag":["\"-1234689706\""],"X-Response-Time":["426ms"]},"body":{"encoding":"UTF-8","string":"{\"latitude\":42.7243,\"longitude\":-73.6927,\"timezone\":\"America/New_York\",\"offset\":-4,\"currently\":{\"time\":1382798511,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":6.46,\"apparentTemperature\":3.43,\"dewPoint\":0.37,\"windSpeed\":4.45,\"windBearing\":220,\"cloudCover\":0.77,\"humidity\":0.65,\"pressure\":1017.95,\"visibility\":16.09,\"ozone\":289.67},\"minutely\":{\"summary\":\"Mostly cloudy for the hour.\",\"icon\":\"partly-cloudy-day\",\"data\":[{\"time\":1382798460,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798520,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798580,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798640,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798700,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798760,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798820,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798880,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382798940,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799000,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799060,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799120,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799180,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799240,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799300,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799360,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799420,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799480,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799540,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799600,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799660,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799720,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799780,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799840,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799900,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382799960,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800020,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800080,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800140,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800200,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800260,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800320,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800380,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800440,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800500,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800560,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800620,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800680,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800740,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800800,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800860,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800920,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382800980,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801040,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801100,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801160,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801220,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801280,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801340,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801400,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801460,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801520,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801580,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801640,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801700,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801760,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801820,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801880,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382801940,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382802000,\"precipIntensity\":0,\"precipProbability\":0},{\"time\":1382802060,\"precipIntensity\":0,\"precipProbability\":0}]},\"hourly\":{\"summary\":\"Mostly cloudy later this morning.\",\"icon\":\"partly-cloudy-day\",\"data\":[{\"time\":1382796000,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":5.36,\"apparentTemperature\":2.24,\"dewPoint\":0.25,\"windSpeed\":4.11,\"windBearing\":209,\"cloudCover\":0.76,\"humidity\":0.7,\"pressure\":1018.34,\"visibility\":16.08,\"ozone\":290.13},{\"time\":1382799600,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":6.94,\"apparentTemperature\":3.95,\"dewPoint\":0.4,\"windSpeed\":4.6,\"windBearing\":224,\"cloudCover\":0.77,\"humidity\":0.63,\"pressure\":1017.78,\"visibility\":16.09,\"ozone\":289.47},{\"time\":1382803200,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":7.85,\"apparentTemperature\":4.74,\"dewPoint\":-0.37,\"windSpeed\":5.42,\"windBearing\":198,\"cloudCover\":0.86,\"humidity\":0.56,\"pressure\":1016.44,\"visibility\":16.09,\"ozone\":288.82},{\"time\":1382806800,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":8.72,\"apparentTemperature\":5.48,\"dewPoint\":-1.11,\"windSpeed\":6.38,\"windBearing\":192,\"cloudCover\":0.9,\"humidity\":0.5,\"pressure\":1014.34,\"visibility\":16.09,\"ozone\":288.26},{\"time\":1382810400,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.84,\"apparentTemperature\":6.78,\"dewPoint\":-1.38,\"windSpeed\":6.86,\"windBearing\":190,\"cloudCover\":0.83,\"humidity\":0.45,\"pressure\":1012.29,\"visibility\":16.09,\"ozone\":287.92},{\"time\":1382814000,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":10.6,\"apparentTemperature\":10.6,\"dewPoint\":-2.01,\"windSpeed\":7.17,\"windBearing\":189,\"cloudCover\":0.85,\"humidity\":0.41,\"pressure\":1008.36,\"visibility\":16.09,\"ozone\":287.93},{\"time\":1382817600,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":10.74,\"apparentTemperature\":10.74,\"dewPoint\":-1.93,\"windSpeed\":6.88,\"windBearing\":190,\"cloudCover\":0.97,\"humidity\":0.41,\"pressure\":1007.53,\"visibility\":16.09,\"ozone\":288.15},{\"time\":1382821200,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":10.26,\"apparentTemperature\":10.26,\"dewPoint\":-2.16,\"windSpeed\":6.4,\"windBearing\":187,\"cloudCover\":0.98,\"humidity\":0.42,\"pressure\":1006.85,\"visibility\":16.09,\"ozone\":288.32},{\"time\":1382824800,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.28,\"apparentTemperature\":6.43,\"dewPoint\":-2.09,\"windSpeed\":5.71,\"windBearing\":184,\"cloudCover\":0.99,\"humidity\":0.45,\"pressure\":1006.46,\"visibility\":16.09,\"ozone\":288.01},{\"time\":1382828400,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.02274,\"precipProbability\":0.02,\"precipType\":\"rain\",\"temperature\":8.37,\"apparentTemperature\":5.46,\"dewPoint\":-1.82,\"windSpeed\":5.23,\"windBearing\":184,\"cloudCover\":0.99,\"humidity\":0.49,\"pressure\":1006.26,\"visibility\":16.09,\"ozone\":287.65},{\"time\":1382832000,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.0304,\"precipProbability\":0.02,\"precipType\":\"rain\",\"temperature\":7.63,\"apparentTemperature\":4.65,\"dewPoint\":-1.44,\"windSpeed\":4.93,\"windBearing\":182,\"cloudCover\":0.99,\"humidity\":0.53,\"pressure\":1006.06,\"visibility\":16.09,\"ozone\":288.19},{\"time\":1382835600,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.03107,\"precipProbability\":0.03,\"precipType\":\"rain\",\"temperature\":7.24,\"apparentTemperature\":4.2,\"dewPoint\":-1.24,\"windSpeed\":4.86,\"windBearing\":185,\"cloudCover\":0.99,\"humidity\":0.55,\"pressure\":1005.79,\"visibility\":16.09,\"ozone\":290.09},{\"time\":1382839200,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.04317,\"precipProbability\":0.06,\"precipType\":\"rain\",\"temperature\":6.8,\"apparentTemperature\":3.7,\"dewPoint\":-0.93,\"windSpeed\":4.73,\"windBearing\":188,\"cloudCover\":1,\"humidity\":0.58,\"pressure\":1005.51,\"visibility\":16.09,\"ozone\":292.9},{\"time\":1382842800,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.05013,\"precipProbability\":0.1,\"precipType\":\"rain\",\"temperature\":6.51,\"apparentTemperature\":3.48,\"dewPoint\":-0.47,\"windSpeed\":4.47,\"windBearing\":189,\"cloudCover\":1,\"humidity\":0.61,\"pressure\":1005.24,\"visibility\":16.09,\"ozone\":296.21},{\"time\":1382846400,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.02347,\"precipProbability\":0.04,\"precipType\":\"rain\",\"temperature\":6.17,\"apparentTemperature\":3.18,\"dewPoint\":-0.18,\"windSpeed\":4.22,\"windBearing\":189,\"cloudCover\":1,\"humidity\":0.64,\"pressure\":1004.97,\"visibility\":16.09,\"ozone\":300.09},{\"time\":1382850000,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.02554,\"precipProbability\":0.03,\"precipType\":\"rain\",\"temperature\":5.92,\"apparentTemperature\":2.96,\"dewPoint\":-0.11,\"windSpeed\":4.05,\"windBearing\":191,\"cloudCover\":1,\"humidity\":0.65,\"pressure\":1004.71,\"visibility\":16.06,\"ozone\":304.47},{\"time\":1382853600,\"summary\":\"Overcast\",\"icon\":\"cloudy\",\"precipIntensity\":0.03099,\"precipProbability\":0.03,\"precipType\":\"rain\",\"temperature\":5.52,\"apparentTemperature\":2.57,\"dewPoint\":-0.07,\"windSpeed\":3.88,\"windBearing\":194,\"cloudCover\":1,\"humidity\":0.67,\"pressure\":1004.51,\"visibility\":16.02,\"ozone\":308.73},{\"time\":1382857200,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-night\",\"precipIntensity\":0.01908,\"precipProbability\":0.02,\"precipType\":\"rain\",\"temperature\":5.07,\"apparentTemperature\":2.12,\"dewPoint\":0.21,\"windSpeed\":3.71,\"windBearing\":200,\"cloudCover\":0.9,\"humidity\":0.71,\"pressure\":1004.37,\"visibility\":15.82,\"ozone\":313.25},{\"time\":1382860800,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-night\",\"precipIntensity\":0.01741,\"precipProbability\":0.01,\"precipType\":\"rain\",\"temperature\":4.39,\"apparentTemperature\":1.42,\"dewPoint\":0.17,\"windSpeed\":3.5,\"windBearing\":203,\"cloudCover\":0.77,\"humidity\":0.74,\"pressure\":1004.3,\"visibility\":15.93,\"ozone\":317.66},{\"time\":1382864400,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.84,\"apparentTemperature\":0.87,\"dewPoint\":0.24,\"windSpeed\":3.34,\"windBearing\":210,\"cloudCover\":0.65,\"humidity\":0.77,\"pressure\":1004.38,\"visibility\":16.01,\"ozone\":320.19},{\"time\":1382868000,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.34,\"apparentTemperature\":0.53,\"dewPoint\":0.25,\"windSpeed\":2.98,\"windBearing\":213,\"cloudCover\":0.5,\"humidity\":0.8,\"pressure\":1004.69,\"visibility\":16.05,\"ozone\":319.93},{\"time\":1382871600,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.1,\"apparentTemperature\":0.38,\"dewPoint\":0.26,\"windSpeed\":2.81,\"windBearing\":211,\"cloudCover\":0.17,\"humidity\":0.82,\"pressure\":1005.14,\"visibility\":16.07,\"ozone\":317.8},{\"time\":1382875200,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.38,\"apparentTemperature\":0.66,\"dewPoint\":0.5,\"windSpeed\":2.87,\"windBearing\":219,\"cloudCover\":0.36,\"humidity\":0.81,\"pressure\":1005.57,\"visibility\":16.09,\"ozone\":314.82},{\"time\":1382878800,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":4.59,\"apparentTemperature\":1.5,\"dewPoint\":0.78,\"windSpeed\":3.75,\"windBearing\":232,\"cloudCover\":0.27,\"humidity\":0.76,\"pressure\":1005.95,\"visibility\":16.09,\"ozone\":310.7},{\"time\":1382882400,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":6.38,\"apparentTemperature\":3.15,\"dewPoint\":1.11,\"windSpeed\":4.8,\"windBearing\":255,\"cloudCover\":0.35,\"humidity\":0.69,\"pressure\":1006.34,\"visibility\":16.09,\"ozone\":305.71},{\"time\":1382886000,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":7.8,\"apparentTemperature\":4.56,\"dewPoint\":1.43,\"windSpeed\":5.72,\"windBearing\":263,\"cloudCover\":0.31,\"humidity\":0.64,\"pressure\":1006.67,\"visibility\":16.09,\"ozone\":301.76},{\"time\":1382889600,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":8.88,\"apparentTemperature\":5.72,\"dewPoint\":1.26,\"windSpeed\":6.32,\"windBearing\":265,\"cloudCover\":0.43,\"humidity\":0.59,\"pressure\":1006.87,\"visibility\":16.09,\"ozone\":299.73},{\"time\":1382893200,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.53,\"apparentTemperature\":6.46,\"dewPoint\":0.64,\"windSpeed\":6.57,\"windBearing\":266,\"cloudCover\":0.64,\"humidity\":0.54,\"pressure\":1007,\"visibility\":16.09,\"ozone\":298.72},{\"time\":1382896800,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.72,\"apparentTemperature\":6.7,\"dewPoint\":0.06,\"windSpeed\":6.59,\"windBearing\":266,\"cloudCover\":0.8,\"humidity\":0.51,\"pressure\":1007.22,\"visibility\":16.09,\"ozone\":298.01},{\"time\":1382900400,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.91,\"apparentTemperature\":6.95,\"dewPoint\":0.13,\"windSpeed\":6.57,\"windBearing\":268,\"cloudCover\":0.82,\"humidity\":0.51,\"pressure\":1007.56,\"visibility\":16.09,\"ozone\":297.35},{\"time\":1382904000,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":9.43,\"apparentTemperature\":6.47,\"dewPoint\":0.33,\"windSpeed\":6.18,\"windBearing\":269,\"cloudCover\":0.78,\"humidity\":0.53,\"pressure\":1007.99,\"visibility\":16.09,\"ozone\":296.99},{\"time\":1382907600,\"summary\":\"Mostly Cloudy\",\"icon\":\"partly-cloudy-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":8.65,\"apparentTemperature\":5.61,\"dewPoint\":0.52,\"windSpeed\":5.78,\"windBearing\":270,\"cloudCover\":0.67,\"humidity\":0.57,\"pressure\":1008.54,\"visibility\":16.09,\"ozone\":296.91},{\"time\":1382911200,\"summary\":\"Partly Cloudy\",\"icon\":\"partly-cloudy-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":7.49,\"apparentTemperature\":4.44,\"dewPoint\":0.65,\"windSpeed\":5.01,\"windBearing\":268,\"cloudCover\":0.48,\"humidity\":0.62,\"pressure\":1009.3,\"visibility\":16.09,\"ozone\":297.62},{\"time\":1382914800,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":6.11,\"apparentTemperature\":3.2,\"dewPoint\":0.71,\"windSpeed\":4.04,\"windBearing\":265,\"cloudCover\":0.23,\"humidity\":0.68,\"pressure\":1010.17,\"visibility\":16.09,\"ozone\":298.63},{\"time\":1382918400,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":4.92,\"apparentTemperature\":2.25,\"dewPoint\":0.64,\"windSpeed\":3.23,\"windBearing\":260,\"cloudCover\":0.03,\"humidity\":0.74,\"pressure\":1010.92,\"visibility\":16.09,\"ozone\":298.46},{\"time\":1382922000,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":4.1,\"apparentTemperature\":1.62,\"dewPoint\":0.55,\"windSpeed\":2.76,\"windBearing\":253,\"cloudCover\":0,\"humidity\":0.78,\"pressure\":1011.45,\"visibility\":16.09,\"ozone\":296.09},{\"time\":1382925600,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.46,\"apparentTemperature\":1.12,\"dewPoint\":0.46,\"windSpeed\":2.45,\"windBearing\":243,\"cloudCover\":0,\"humidity\":0.81,\"pressure\":1011.87,\"visibility\":16.09,\"ozone\":292.55},{\"time\":1382929200,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":2.93,\"apparentTemperature\":0.69,\"dewPoint\":0.34,\"windSpeed\":2.25,\"windBearing\":236,\"cloudCover\":0.02,\"humidity\":0.83,\"pressure\":1012.27,\"visibility\":16.09,\"ozone\":289.46},{\"time\":1382932800,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":2.6,\"apparentTemperature\":0.38,\"dewPoint\":0.26,\"windSpeed\":2.17,\"windBearing\":232,\"cloudCover\":0.04,\"humidity\":0.85,\"pressure\":1012.67,\"visibility\":16.09,\"ozone\":287.46},{\"time\":1382936400,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":2.36,\"apparentTemperature\":0.05,\"dewPoint\":0.15,\"windSpeed\":2.22,\"windBearing\":229,\"cloudCover\":0.06,\"humidity\":0.85,\"pressure\":1013.04,\"visibility\":16.09,\"ozone\":285.91},{\"time\":1382940000,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":2.02,\"apparentTemperature\":-0.42,\"dewPoint\":-0.06,\"windSpeed\":2.29,\"windBearing\":224,\"cloudCover\":0.08,\"humidity\":0.86,\"pressure\":1013.39,\"visibility\":16.09,\"ozone\":284.61},{\"time\":1382943600,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":1.56,\"apparentTemperature\":-0.93,\"dewPoint\":-0.32,\"windSpeed\":2.26,\"windBearing\":215,\"cloudCover\":0.07,\"humidity\":0.87,\"pressure\":1013.73,\"visibility\":16.09,\"ozone\":283.42},{\"time\":1382947200,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":1.1,\"apparentTemperature\":-1.35,\"dewPoint\":-0.55,\"windSpeed\":2.15,\"windBearing\":202,\"cloudCover\":0.07,\"humidity\":0.89,\"pressure\":1014.05,\"visibility\":16.09,\"ozone\":282.48},{\"time\":1382950800,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":0.79,\"apparentTemperature\":-1.77,\"dewPoint\":-0.73,\"windSpeed\":2.2,\"windBearing\":191,\"cloudCover\":0.06,\"humidity\":0.9,\"pressure\":1014.39,\"visibility\":16.09,\"ozone\":281.89},{\"time\":1382954400,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":0.44,\"apparentTemperature\":-2.28,\"dewPoint\":-0.92,\"windSpeed\":2.29,\"windBearing\":184,\"cloudCover\":0.06,\"humidity\":0.91,\"pressure\":1014.8,\"visibility\":16.09,\"ozone\":281.81},{\"time\":1382958000,\"summary\":\"Clear\",\"icon\":\"clear-night\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":0.23,\"apparentTemperature\":-2.68,\"dewPoint\":-1.05,\"windSpeed\":2.43,\"windBearing\":179,\"cloudCover\":0.06,\"humidity\":0.91,\"pressure\":1015.22,\"visibility\":16.09,\"ozone\":282.09},{\"time\":1382961600,\"summary\":\"Clear\",\"icon\":\"clear-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":0.85,\"apparentTemperature\":-2.24,\"dewPoint\":-0.82,\"windSpeed\":2.73,\"windBearing\":179,\"cloudCover\":0.06,\"humidity\":0.89,\"pressure\":1015.57,\"visibility\":16.09,\"ozone\":282.42},{\"time\":1382965200,\"summary\":\"Clear\",\"icon\":\"clear-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":3.04,\"apparentTemperature\":-0.15,\"dewPoint\":0.01,\"windSpeed\":3.41,\"windBearing\":189,\"cloudCover\":0.04,\"humidity\":0.8,\"pressure\":1015.8,\"visibility\":16.09,\"ozone\":282.7},{\"time\":1382968800,\"summary\":\"Clear\",\"icon\":\"clear-day\",\"precipIntensity\":0,\"precipProbability\":0,\"temperature\":6.17,\"apparentTemperature\":3.08,\"dewPoint\":0.95,\"windSpeed\":4.42,\"windBearing\":205,\"cloudCover\":0.02,\"humidity\":0.69,\"pressure\":1015.95,\"visibility\":16.09,\"ozone\":283.02}]},\"daily\":{\"summary\":\"Light rain on Tuesday through Friday; temperatures bottoming out at 7° on Tuesday.\",\"icon\":\"rain\",\"data\":[{\"time\":1382760000,\"summary\":\"Mostly cloudy throughout the day.\",\"icon\":\"partly-cloudy-day\",\"sunriseTime\":1382786566,\"sunsetTime\":1382824620,\"precipIntensity\":0.01106,\"precipIntensityMax\":0,\"precipProbability\":0.41,\"precipType\":\"rain\",\"temperatureMin\":1.42,\"temperatureMinTime\":1382770800,\"temperatureMax\":10.74,\"temperatureMaxTime\":1382817600,\"apparentTemperatureMin\":-1.53,\"apparentTemperatureMinTime\":1382785200,\"apparentTemperatureMax\":10.74,\"apparentTemperatureMaxTime\":1382817600,\"dewPoint\":-0.89,\"windSpeed\":4.3,\"windBearing\":189,\"cloudCover\":0.75,\"humidity\":0.64,\"pressure\":1013.85,\"visibility\":15.95,\"ozone\":293.45},{\"time\":1382846400,\"summary\":\"Partly cloudy until evening.\",\"icon\":\"partly-cloudy-day\",\"sunriseTime\":1382873041,\"sunsetTime\":1382910935,\"precipIntensity\":0.00789,\"precipIntensityMax\":0,\"precipProbability\":0.04,\"precipType\":\"rain\",\"temperatureMin\":2.93,\"temperatureMinTime\":1382929200,\"temperatureMax\":9.91,\"temperatureMaxTime\":1382900400,\"apparentTemperatureMin\":0.38,\"apparentTemperatureMinTime\":1382871600,\"apparentTemperatureMax\":6.95,\"apparentTemperatureMaxTime\":1382900400,\"dewPoint\":0.45,\"windSpeed\":4.31,\"windBearing\":238,\"cloudCover\":0.51,\"humidity\":0.68,\"pressure\":1007.2,\"visibility\":16.06,\"ozone\":303.99},{\"time\":1382932800,\"summary\":\"Mostly cloudy starting in the afternoon.\",\"icon\":\"partly-cloudy-day\",\"sunriseTime\":1382959516,\"sunsetTime\":1382997251,\"precipIntensity\":0.00444,\"precipIntensityMax\":0,\"precipProbability\":0.01,\"precipType\":\"rain\",\"temperatureMin\":0.23,\"temperatureMinTime\":1382958000,\"temperatureMax\":12.33,\"temperatureMaxTime\":1382986800,\"apparentTemperatureMin\":-2.68,\"apparentTemperatureMinTime\":1382958000,\"apparentTemperatureMax\":12.33,\"apparentTemperatureMaxTime\":1382986800,\"dewPoint\":1.4,\"windSpeed\":3.5,\"windBearing\":235,\"cloudCover\":0.23,\"humidity\":0.75,\"pressure\":1016.4,\"visibility\":16.09,\"ozone\":284.47},{\"time\":1383019200,\"summary\":\"Light rain overnight.\",\"icon\":\"rain\",\"sunriseTime\":1383045992,\"sunsetTime\":1383083569,\"precipIntensity\":0.01291,\"precipIntensityMax\":0.14942,\"precipIntensityMaxTime\":1383102000,\"precipProbability\":0.14,\"precipType\":\"rain\",\"temperatureMin\":-1.65,\"temperatureMinTime\":1383044400,\"temperatureMax\":7.24,\"temperatureMaxTime\":1383069600,\"apparentTemperatureMin\":-4.3,\"apparentTemperatureMinTime\":1383044400,\"apparentTemperatureMax\":4.64,\"apparentTemperatureMaxTime\":1383069600,\"dewPoint\":-2.98,\"windSpeed\":2.51,\"windBearing\":310,\"cloudCover\":0.26,\"humidity\":0.7,\"pressure\":1022.49,\"visibility\":16.09,\"ozone\":290.25},{\"time\":1383105600,\"summary\":\"Light snow (1 cm) in the morning.\",\"icon\":\"snow\",\"sunriseTime\":1383132468,\"sunsetTime\":1383169888,\"precipIntensity\":0.11091,\"precipIntensityMax\":0.25996,\"precipIntensityMaxTime\":1383112800,\"precipProbability\":0.37,\"temperatureMin\":-1.45,\"temperatureMinTime\":1383130800,\"temperatureMax\":8.5,\"temperatureMaxTime\":1383156000,\"apparentTemperatureMin\":-1.45,\"apparentTemperatureMinTime\":1383130800,\"apparentTemperatureMax\":7.5,\"apparentTemperatureMaxTime\":1383156000,\"dewPoint\":-2.34,\"windSpeed\":0.84,\"windBearing\":313,\"cloudCover\":0.43,\"humidity\":0.72,\"pressure\":1024.19,\"ozone\":313.14},{\"time\":1383192000,\"summary\":\"Light rain in the evening.\",\"icon\":\"rain\",\"sunriseTime\":1383218944,\"sunsetTime\":1383256208,\"precipIntensity\":0.15089,\"precipIntensityMax\":0.50579,\"precipIntensityMaxTime\":1383274800,\"precipProbability\":0.9,\"precipType\":\"rain\",\"temperatureMin\":0.14,\"temperatureMinTime\":1383192000,\"temperatureMax\":11.88,\"temperatureMaxTime\":1383249600,\"apparentTemperatureMin\":-2.31,\"apparentTemperatureMinTime\":1383210000,\"apparentTemperatureMax\":11.88,\"apparentTemperatureMaxTime\":1383249600,\"dewPoint\":4.46,\"windSpeed\":3.39,\"windBearing\":173,\"cloudCover\":0.92,\"humidity\":0.86,\"pressure\":1018.38,\"ozone\":275.71},{\"time\":1383278400,\"summary\":\"Light rain until evening.\",\"icon\":\"rain\",\"sunriseTime\":1383305420,\"sunsetTime\":1383342530,\"precipIntensity\":0.27005,\"precipIntensityMax\":0.68623,\"precipIntensityMaxTime\":1383285600,\"precipProbability\":0.99,\"precipType\":\"rain\",\"temperatureMin\":9.61,\"temperatureMinTime\":1383361200,\"temperatureMax\":17.56,\"temperatureMaxTime\":1383328800,\"apparentTemperatureMin\":8.9,\"apparentTemperatureMinTime\":1383361200,\"apparentTemperatureMax\":17.56,\"apparentTemperatureMaxTime\":1383328800,\"dewPoint\":10.84,\"windSpeed\":3.89,\"windBearing\":226,\"cloudCover\":0.55,\"humidity\":0.88,\"pressure\":1005.09,\"ozone\":279.33},{\"time\":1383364800,\"summary\":\"Drizzle until afternoon.\",\"icon\":\"rain\",\"sunriseTime\":1383391897,\"sunsetTime\":1383428853,\"precipIntensity\":0.09392,\"precipIntensityMax\":0.1576,\"precipIntensityMaxTime\":1383404400,\"precipProbability\":0.43,\"precipType\":\"rain\",\"temperatureMin\":5.42,\"temperatureMinTime\":1383447600,\"temperatureMax\":13.63,\"temperatureMaxTime\":1383415200,\"apparentTemperatureMin\":3.48,\"apparentTemperatureMinTime\":1383447600,\"apparentTemperatureMax\":13.63,\"apparentTemperatureMaxTime\":1383415200,\"dewPoint\":6.49,\"windSpeed\":2.28,\"windBearing\":299,\"cloudCover\":0.04,\"humidity\":0.83,\"pressure\":1004.02,\"ozone\":284.98}]},\"flags\":{\"sources\":[\"isd\",\"fnmoc\",\"sref\",\"rap\",\"nam\",\"cmc\",\"gfs\",\"rtma\",\"metar\",\"lamp\",\"nwspa\",\"darksky\"],\"isd-stations\":[\"725180-14735\",\"744994-04741\",\"999999-04741\",\"999999-14735\",\"999999-14796\"],\"metar-stations\":[\"KALB\",\"KDDH\",\"KPSF\"],\"lamp-stations\":[\"KALB\",\"KDDH\",\"KPSF\"],\"darksky-stations\":[\"KENX\"],\"units\":\"si\"}}"},"http_version":null},"recorded_at":"Sat, 26 Oct 2013 14:41:51 GMT"}],"recorded_with":"VCR 2.6.0"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"http_interactions":[{"request":{"method":"get","uri":"http://weather.yahooapis.com/forecastrss?p=90210&u=c","body":{"encoding":"UTF-8","string":""},"headers":{}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Date":["Sat, 26 Oct 2013 14:56:33 GMT"],"P3p":["policyref=\"http://info.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV\""],"Cache-Control":["max-age=200, public"],"Vary":["Accept-Encoding"],"Content-Type":["text/xml;charset=UTF-8"],"Age":["0"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Server":["YTS/1.20.28"]},"body":{"encoding":"UTF-8","string":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n\t\t<rss version=\"2.0\" xmlns:yweather=\"http://xml.weather.yahoo.com/ns/rss/1.0\" xmlns:geo=\"http://www.w3.org/2003/01/geo/wgs84_pos#\">\n\t\t\t<channel>\n\t\t\n<title>Yahoo! Weather - Beverly Hills, CA</title>\n<link>http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html</link>\n<description>Yahoo! Weather for Beverly Hills, CA</description>\n<language>en-us</language>\n<lastBuildDate>Sat, 26 Oct 2013 6:52 am PDT</lastBuildDate>\n<ttl>60</ttl>\n<yweather:location city=\"Beverly Hills\" region=\"CA\" country=\"US\"/>\n<yweather:units temperature=\"C\" distance=\"km\" pressure=\"mb\" speed=\"km/h\"/>\n<yweather:wind chill=\"12\" direction=\"0\" speed=\"0\" />\n<yweather:atmosphere humidity=\"72\" visibility=\"16.09\" pressure=\"1017.1\" rising=\"0\" />\n<yweather:astronomy sunrise=\"7:07 am\" sunset=\"6:04 pm\"/>\n<image>\n<title>Yahoo! Weather</title>\n<width>142</width>\n<height>18</height>\n<link>http://weather.yahoo.com</link>\n<url>http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif</url>\n</image>\n<item>\n<title>Conditions for Beverly Hills, CA at 6:52 am PDT</title>\n<geo:lat>34.08</geo:lat>\n<geo:long>-118.4</geo:long>\n<link>http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html</link>\n<pubDate>Sat, 26 Oct 2013 6:52 am PDT</pubDate>\n<yweather:condition text=\"Fair\" code=\"33\" temp=\"12\" date=\"Sat, 26 Oct 2013 6:52 am PDT\" />\n<description><![CDATA[\n<img src=\"http://l.yimg.com/a/i/us/we/52/33.gif\"/><br />\n<b>Current Conditions:</b><br />\nFair, 12 C<BR />\n<BR /><b>Forecast:</b><BR />\nSat - Mostly Sunny. High: 27 Low: 14<br />\nSun - Partly Cloudy. High: 25 Low: 14<br />\nMon - Few Showers. High: 17 Low: 11<br />\nTue - Few Showers. High: 16 Low: 11<br />\nWed - Sunny. High: 20 Low: 11<br />\n<br />\n<a href=\"http://us.rd.yahoo.com/dailynews/rss/weather/Beverly_Hills__CA/*http://weather.yahoo.com/forecast/USCA0090_c.html\">Full Forecast at Yahoo! Weather</a><BR/><BR/>\n(provided by <a href=\"http://www.weather.com\" >The Weather Channel</a>)<br/>\n]]></description>\n<yweather:forecast day=\"Sat\" date=\"26 Oct 2013\" low=\"14\" high=\"27\" text=\"Mostly Sunny\" code=\"34\" />\n<yweather:forecast day=\"Sun\" date=\"27 Oct 2013\" low=\"14\" high=\"25\" text=\"Partly Cloudy\" code=\"30\" />\n<yweather:forecast day=\"Mon\" date=\"28 Oct 2013\" low=\"11\" high=\"17\" text=\"Few Showers\" code=\"11\" />\n<yweather:forecast day=\"Tue\" date=\"29 Oct 2013\" low=\"11\" high=\"16\" text=\"Few Showers\" code=\"11\" />\n<yweather:forecast day=\"Wed\" date=\"30 Oct 2013\" low=\"11\" high=\"20\" text=\"Sunny\" code=\"32\" />\n<guid isPermaLink=\"false\">USCA0090_2013_10_30_7_00_PDT</guid>\n</item>\n</channel>\n</rss>\n\n<!-- fan1566.sports.bf1.yahoo.com Sat Oct 26 14:56:33 PST 2013 -->\n"},"http_version":null},"recorded_at":"Sat, 26 Oct 2013 14:56:33 GMT"}],"recorded_with":"VCR 2.6.0"}
|
@@ -1,73 +0,0 @@
|
|
1
|
-
require_relative '../../spec_helper'
|
2
|
-
|
3
|
-
module Barometer::WeatherService
|
4
|
-
describe Yahoo::Response do
|
5
|
-
it "parses the timezones correctly for current weather" do
|
6
|
-
payload = Barometer::Utils::Payload.new({
|
7
|
-
"item" => {
|
8
|
-
"pubDate" => "Sun, 14 Apr 2013 1:24 pm PDT"
|
9
|
-
}
|
10
|
-
})
|
11
|
-
response = Yahoo::Response.new.parse(payload)
|
12
|
-
|
13
|
-
utc_observed_at = Time.utc(2013,4,14,20,24,0)
|
14
|
-
utc_stale_at = Time.utc(2013,4,14,21,24,0)
|
15
|
-
|
16
|
-
expect( response.current.observed_at.utc ).to eq utc_observed_at
|
17
|
-
expect( response.current.stale_at.utc ).to eq utc_stale_at
|
18
|
-
expect( response.timezone.to_s ).to eq 'PDT'
|
19
|
-
end
|
20
|
-
|
21
|
-
it "parses the timezones correctly for forecasted weather" do
|
22
|
-
payload = Barometer::Utils::Payload.new({
|
23
|
-
"item" => {
|
24
|
-
"pubDate" => "Sun, 14 Apr 2013 1:24 pm PDT",
|
25
|
-
"forecast" => [
|
26
|
-
{
|
27
|
-
"@date" => "14 Apr 2013"
|
28
|
-
}
|
29
|
-
]
|
30
|
-
},
|
31
|
-
"astronomy" => {
|
32
|
-
"@sunrise" => "6:44 am",
|
33
|
-
"@sunset" => "5:32 pm"
|
34
|
-
}
|
35
|
-
})
|
36
|
-
response = Yahoo::Response.new.parse(payload)
|
37
|
-
|
38
|
-
utc_starts_at = Time.utc(2013,4,14,7,0,0)
|
39
|
-
utc_ends_at = Time.utc(2013,4,15,6,59,59)
|
40
|
-
|
41
|
-
expect( response.forecast[0].starts_at.utc ).to eq utc_starts_at
|
42
|
-
expect( response.forecast[0].ends_at.utc ).to eq utc_ends_at
|
43
|
-
end
|
44
|
-
|
45
|
-
it "parses sun timezones correctly" do
|
46
|
-
payload = Barometer::Utils::Payload.new({
|
47
|
-
"item" => {
|
48
|
-
"pubDate" => "Sun, 14 Apr 2013 1:24 pm PDT",
|
49
|
-
"forecast" => [
|
50
|
-
{
|
51
|
-
"@date" => "15 Apr 2013"
|
52
|
-
}
|
53
|
-
]
|
54
|
-
},
|
55
|
-
"astronomy" => {
|
56
|
-
"@sunrise" => "6:44 am",
|
57
|
-
"@sunset" => "5:32 pm"
|
58
|
-
}
|
59
|
-
})
|
60
|
-
response = Yahoo::Response.new.parse(payload)
|
61
|
-
|
62
|
-
utc_current_sun_rise = Time.utc(2013,4,14,13,44,0)
|
63
|
-
utc_current_sun_set = Time.utc(2013,4,15,0,32,0)
|
64
|
-
utc_forecast_sun_rise = Time.utc(2013,4,15,13,44,0)
|
65
|
-
utc_forecast_sun_set = Time.utc(2013,4,16,0,32,0)
|
66
|
-
|
67
|
-
expect( response.current.sun.rise.utc ).to eq utc_current_sun_rise
|
68
|
-
expect( response.current.sun.set.utc ).to eq utc_current_sun_set
|
69
|
-
expect( response.forecast[0].sun.rise ).to eq utc_forecast_sun_rise
|
70
|
-
expect( response.forecast[0].sun.set.utc ).to eq utc_forecast_sun_set
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require_relative '../spec_helper'
|
2
|
-
|
3
|
-
describe Barometer::WeatherService::Yahoo, vcr: {
|
4
|
-
cassette_name: "WeatherService::Yahoo"
|
5
|
-
} do
|
6
|
-
|
7
|
-
it "auto-registers this weather service as :yahoo" do
|
8
|
-
Barometer::WeatherService.source(:yahoo).should == Barometer::WeatherService::Yahoo
|
9
|
-
end
|
10
|
-
|
11
|
-
describe ".call" do
|
12
|
-
let(:converted_query) { Barometer::ConvertedQuery.new('90210', :zipcode, :metric) }
|
13
|
-
let(:query) { build_query.tap{|q|q.stub(:convert! => converted_query)} }
|
14
|
-
|
15
|
-
subject { Barometer::WeatherService::Yahoo.call(query) }
|
16
|
-
|
17
|
-
it "asks the query to convert to accepted formats" do
|
18
|
-
query.should_receive(:convert!).with(:zipcode, :weather_id, :woe_id)
|
19
|
-
subject
|
20
|
-
end
|
21
|
-
|
22
|
-
it "includes the expected data" do
|
23
|
-
subject.query.should == '90210'
|
24
|
-
subject.format.should == :zipcode
|
25
|
-
subject.should be_metric
|
26
|
-
|
27
|
-
should have_data(:current, :observed_at).as_format(:time)
|
28
|
-
should have_data(:current, :stale_at).as_format(:time)
|
29
|
-
|
30
|
-
should have_data(:current, :humidity).as_format(:float)
|
31
|
-
should have_data(:current, :condition).as_format(:string)
|
32
|
-
should have_data(:current, :icon).as_format(:number)
|
33
|
-
should have_data(:current, :temperature).as_format(:temperature)
|
34
|
-
should have_data(:current, :wind_chill).as_format(:temperature)
|
35
|
-
should have_data(:current, :wind).as_format(:vector)
|
36
|
-
should have_data(:current, :pressure).as_format(:pressure)
|
37
|
-
should have_data(:current, :visibility).as_format(:distance)
|
38
|
-
should have_data(:current, :sun, :rise).as_format(:time)
|
39
|
-
should have_data(:current, :sun, :set).as_format(:time)
|
40
|
-
|
41
|
-
should have_data(:location, :city).as_value("Beverly Hills")
|
42
|
-
should have_data(:location, :state_code).as_value("CA")
|
43
|
-
should have_data(:location, :country_code).as_value("US")
|
44
|
-
should have_data(:location, :latitude).as_value(34.08)
|
45
|
-
should have_data(:location, :longitude).as_value(-118.4)
|
46
|
-
|
47
|
-
should have_data(:timezone, :to_s).as_format(/^P[DS]T$/i)
|
48
|
-
|
49
|
-
subject.forecast.size.should == 5
|
50
|
-
should have_forecast(:starts_at).as_format(:time)
|
51
|
-
should have_forecast(:ends_at).as_format(:time)
|
52
|
-
should have_forecast(:icon).as_format(:number)
|
53
|
-
should have_forecast(:condition).as_format(:string)
|
54
|
-
should have_forecast(:high).as_format(:temperature)
|
55
|
-
should have_forecast(:low).as_format(:temperature)
|
56
|
-
should have_forecast(:sun, :rise).as_format(:time)
|
57
|
-
should have_forecast(:sun, :set).as_format(:time)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|