outoftime-noaa 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1 -0
- data/Manifest +24 -0
- data/README +77 -0
- data/Rakefile +30 -0
- data/bin/noaa-update-stations +12 -0
- data/data/stations.yml +12091 -0
- data/lib/noaa/current_conditions.rb +141 -0
- data/lib/noaa/forecast.rb +94 -0
- data/lib/noaa/forecast_day.rb +30 -0
- data/lib/noaa/http_service.rb +19 -0
- data/lib/noaa/station.rb +111 -0
- data/lib/noaa/station_writer.rb +26 -0
- data/lib/noaa.rb +61 -0
- data/noaa.gemspec +54 -0
- data/test/data/4-day.xml +116 -0
- data/test/data/KVAY.xml +52 -0
- data/test/data/stations-abridged.xml +44 -0
- data/test/data/stations.xml +22177 -0
- data/test/data/stations.yml +12091 -0
- data/test/test_current_conditions.rb +129 -0
- data/test/test_forecast.rb +57 -0
- data/test/test_helper.rb +16 -0
- data/test/test_http_service.rb +57 -0
- data/test/test_station.rb +65 -0
- data/test/test_station_writer.rb +49 -0
- metadata +145 -0
data/test/data/KVAY.xml
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
+
<current_observation version="1.0"
|
3
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
5
|
+
xsi:noNamespaceSchemaLocation="http://www.weather.gov/xml/current_obs/current_observation.xsd">
|
6
|
+
<credit>NOAA's National Weather Service</credit>
|
7
|
+
<credit_URL>http://weather.gov/</credit_URL>
|
8
|
+
<image>
|
9
|
+
<url>http://weather.gov/images/xml_logo.gif</url>
|
10
|
+
<title>NOAA's National Weather Service</title>
|
11
|
+
<link>http://weather.gov</link>
|
12
|
+
</image>
|
13
|
+
<suggested_pickup>15 minutes after the hour</suggested_pickup>
|
14
|
+
<suggested_pickup_period>60</suggested_pickup_period>
|
15
|
+
<location>Mount Holly, South Jersey Regional Airport, NJ</location>
|
16
|
+
<station_id>KVAY</station_id>
|
17
|
+
<latitude>39.95</latitude>
|
18
|
+
<longitude>-74.84</longitude>
|
19
|
+
<observation_time>Last Updated on Dec 23, 10:54 am EST</observation_time>
|
20
|
+
<observation_time_rfc822>Tue, 23 Dec 2008 10:54:00 -0500 EST</observation_time_rfc822>
|
21
|
+
<weather>Fair</weather>
|
22
|
+
<temperature_string>24 F (-4 C)</temperature_string>
|
23
|
+
<temp_f>24</temp_f>
|
24
|
+
<temp_c>-4</temp_c>
|
25
|
+
<relative_humidity>52</relative_humidity>
|
26
|
+
<wind_string>From the Northwest at 3 MPH</wind_string>
|
27
|
+
<wind_dir>Northwest</wind_dir>
|
28
|
+
<wind_degrees>330</wind_degrees>
|
29
|
+
<wind_mph>3.45</wind_mph>
|
30
|
+
<wind_gust_mph>10.25</wind_gust_mph>
|
31
|
+
<pressure_string>30.70" (1039.5 mb)</pressure_string>
|
32
|
+
<pressure_mb>1039.5</pressure_mb>
|
33
|
+
<pressure_in>30.70</pressure_in>
|
34
|
+
<dewpoint_string>9 F (-13 C)</dewpoint_string>
|
35
|
+
<dewpoint_f>9</dewpoint_f>
|
36
|
+
<dewpoint_c>-13</dewpoint_c>
|
37
|
+
<heat_index_string>NA</heat_index_string>
|
38
|
+
<heat_index_f>105</heat_index_f>
|
39
|
+
<heat_index_c>41</heat_index_c>
|
40
|
+
<windchill_string>NA</windchill_string>
|
41
|
+
<windchill_f>19</windchill_f>
|
42
|
+
<windchill_c>-7</windchill_c>
|
43
|
+
<visibility_mi>10.00</visibility_mi>
|
44
|
+
<icon_url_base>http://weather.gov/weather/images/fcicons/</icon_url_base>
|
45
|
+
<icon_url_name>skc.jpg</icon_url_name>
|
46
|
+
<two_day_history_url>http://www.weather.gov/data/obhistory/KVAY.html</two_day_history_url>
|
47
|
+
<ob_url>http://www.nws.noaa.gov/data/METAR/KVAY.1.txt</ob_url>
|
48
|
+
<disclaimer_url>http://weather.gov/disclaimer.html</disclaimer_url>
|
49
|
+
<copyright_url>http://weather.gov/disclaimer.html</copyright_url>
|
50
|
+
<privacy_policy_url>http://weather.gov/notice.html</privacy_policy_url>
|
51
|
+
</current_observation>
|
52
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<wx_station_index>
|
3
|
+
<credit>NOAA's National Weather Service</credit>
|
4
|
+
<credit_URL>http://weather.gov/</credit_URL>
|
5
|
+
<image>
|
6
|
+
<url>http://weather.gov/images/xml_logo.gif</url>
|
7
|
+
<title>NOAA's National Weather Service</title>
|
8
|
+
<link>http://weather.gov</link>
|
9
|
+
</image>
|
10
|
+
<suggested_pickup>08:00 EST</suggested_pickup>
|
11
|
+
<suggested_pickup_period>1140</suggested_pickup_period>
|
12
|
+
<station>
|
13
|
+
<station_id>KJFK</station_id>
|
14
|
+
<state>NY</state>
|
15
|
+
<station_name>New York/John F. Kennedy Intl Airport</station_name>
|
16
|
+
<latitude>40.66</latitude>
|
17
|
+
<longitude>-73.78</longitude>
|
18
|
+
<html_url>http://weather.noaa.gov/weather/current/KJFK.html</html_url>
|
19
|
+
<rss_url>http://weather.gov/xml/current_obs/KJFK.rss</rss_url>
|
20
|
+
<xml_url>http://weather.gov/xml/current_obs/KJFK.xml</xml_url>
|
21
|
+
</station>
|
22
|
+
|
23
|
+
<station>
|
24
|
+
<station_id>KLGA</station_id>
|
25
|
+
<state>NY</state>
|
26
|
+
<station_name>New York, La Guardia Airport</station_name>
|
27
|
+
<latitude>40.77</latitude>
|
28
|
+
<longitude>-73.9</longitude>
|
29
|
+
<html_url>http://weather.noaa.gov/weather/current/KLGA.html</html_url>
|
30
|
+
<rss_url>http://weather.gov/xml/current_obs/KLGA.rss</rss_url>
|
31
|
+
<xml_url>http://weather.gov/xml/current_obs/KLGA.xml</xml_url>
|
32
|
+
</station>
|
33
|
+
|
34
|
+
<station>
|
35
|
+
<station_id>KNYC</station_id>
|
36
|
+
<state>NY</state>
|
37
|
+
<station_name>New York City, Central Park</station_name>
|
38
|
+
<latitude>40.783</latitude>
|
39
|
+
<longitude>-73.967</longitude>
|
40
|
+
<html_url>http://weather.noaa.gov/weather/current/KNYC.html</html_url>
|
41
|
+
<rss_url>http://weather.gov/xml/current_obs/KNYC.rss</rss_url>
|
42
|
+
<xml_url>http://weather.gov/xml/current_obs/KNYC.xml</xml_url>
|
43
|
+
</station>
|
44
|
+
</wx_station_index>
|