barometer 0.7.3 → 0.8.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.
Files changed (138) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +7 -0
  3. data/LICENSE +1 -1
  4. data/{README.rdoc → README.md} +124 -110
  5. data/Rakefile +1 -21
  6. data/TODO +8 -9
  7. data/barometer.gemspec +20 -19
  8. data/bin/barometer +36 -83
  9. data/lib/barometer.rb +13 -11
  10. data/lib/barometer/base.rb +10 -10
  11. data/lib/barometer/data.rb +1 -1
  12. data/lib/barometer/data/distance.rb +25 -25
  13. data/lib/barometer/data/geo.rb +9 -9
  14. data/lib/barometer/data/local_datetime.rb +24 -20
  15. data/lib/barometer/data/local_time.rb +13 -13
  16. data/lib/barometer/data/location.rb +6 -6
  17. data/lib/barometer/data/pressure.rb +24 -24
  18. data/lib/barometer/data/speed.rb +28 -28
  19. data/lib/barometer/data/sun.rb +7 -7
  20. data/lib/barometer/data/temperature.rb +29 -29
  21. data/lib/barometer/data/units.rb +9 -9
  22. data/lib/barometer/data/zone.rb +19 -19
  23. data/lib/barometer/formats.rb +1 -1
  24. data/lib/barometer/formats/coordinates.rb +7 -7
  25. data/lib/barometer/formats/format.rb +6 -6
  26. data/lib/barometer/formats/geocode.rb +5 -5
  27. data/lib/barometer/formats/icao.rb +6 -6
  28. data/lib/barometer/formats/postalcode.rb +3 -3
  29. data/lib/barometer/formats/short_zipcode.rb +2 -2
  30. data/lib/barometer/formats/weather_id.rb +10 -10
  31. data/lib/barometer/formats/woe_id.rb +20 -20
  32. data/lib/barometer/formats/zipcode.rb +3 -3
  33. data/lib/barometer/key_file_parser.rb +20 -0
  34. data/lib/barometer/measurements/measurement.rb +32 -32
  35. data/lib/barometer/measurements/result.rb +39 -39
  36. data/lib/barometer/measurements/result_array.rb +12 -12
  37. data/lib/barometer/query.rb +15 -15
  38. data/lib/barometer/services.rb +3 -3
  39. data/lib/barometer/translations/icao_country_codes.yml +20 -20
  40. data/lib/barometer/translations/weather_country_codes.yml +1 -1
  41. data/lib/barometer/translations/zone_codes.yml +2 -2
  42. data/lib/barometer/version.rb +3 -0
  43. data/lib/barometer/weather.rb +27 -27
  44. data/lib/barometer/weather_services/noaa.rb +314 -3
  45. data/lib/barometer/weather_services/service.rb +32 -30
  46. data/lib/barometer/weather_services/weather_bug.rb +35 -33
  47. data/lib/barometer/weather_services/wunderground.rb +31 -29
  48. data/lib/barometer/weather_services/yahoo.rb +36 -35
  49. data/lib/barometer/web_services/geocode.rb +5 -7
  50. data/lib/barometer/web_services/noaa_station_id.rb +53 -0
  51. data/lib/barometer/web_services/placemaker.rb +11 -13
  52. data/lib/barometer/web_services/timezone.rb +5 -7
  53. data/lib/barometer/web_services/weather_id.rb +4 -6
  54. data/lib/barometer/web_services/web_service.rb +4 -4
  55. data/spec/barometer_spec.rb +25 -27
  56. data/spec/cassettes/Barometer.json +1 -0
  57. data/spec/cassettes/Query.json +1 -0
  58. data/spec/cassettes/Query_Format_Coordinates.json +1 -0
  59. data/spec/cassettes/Query_Format_Geocode.json +1 -0
  60. data/spec/cassettes/Query_Format_WeatherID.json +1 -0
  61. data/spec/cassettes/Query_Format_WoeID.json +1 -0
  62. data/spec/cassettes/WeatherService.json +1 -0
  63. data/spec/cassettes/WeatherService_Noaa.json +1 -0
  64. data/spec/cassettes/WeatherService_WeatherBug.json +1 -0
  65. data/spec/cassettes/WeatherService_Wunderground.json +1 -0
  66. data/spec/cassettes/WeatherService_Yahoo.json +1 -0
  67. data/spec/cassettes/WebService_Geocode.json +1 -0
  68. data/spec/cassettes/WebService_NoaaStation.json +1 -0
  69. data/spec/data/distance_spec.rb +60 -60
  70. data/spec/data/geo_spec.rb +23 -23
  71. data/spec/data/local_datetime_spec.rb +44 -44
  72. data/spec/data/local_time_spec.rb +47 -47
  73. data/spec/data/location_spec.rb +16 -16
  74. data/spec/data/pressure_spec.rb +61 -61
  75. data/spec/data/speed_spec.rb +69 -69
  76. data/spec/data/sun_spec.rb +25 -25
  77. data/spec/data/temperature_spec.rb +68 -68
  78. data/spec/data/units_spec.rb +21 -21
  79. data/spec/data/zone_spec.rb +35 -35
  80. data/spec/formats/coordinates_spec.rb +27 -27
  81. data/spec/formats/format_spec.rb +17 -25
  82. data/spec/formats/geocode_spec.rb +23 -31
  83. data/spec/formats/icao_spec.rb +26 -32
  84. data/spec/formats/postalcode_spec.rb +22 -28
  85. data/spec/formats/short_zipcode_spec.rb +20 -26
  86. data/spec/formats/weather_id_spec.rb +57 -67
  87. data/spec/formats/woe_id_spec.rb +59 -59
  88. data/spec/formats/zipcode_spec.rb +39 -47
  89. data/spec/key_file_parser_spec.rb +28 -0
  90. data/spec/measurements/measurement_spec.rb +79 -133
  91. data/spec/measurements/result_array_spec.rb +23 -38
  92. data/spec/measurements/result_spec.rb +100 -128
  93. data/spec/query_spec.rb +83 -100
  94. data/spec/spec_helper.rb +24 -6
  95. data/spec/weather_services/noaa_spec.rb +179 -0
  96. data/spec/weather_services/services_spec.rb +28 -36
  97. data/spec/weather_services/weather_bug_spec.rb +57 -77
  98. data/spec/weather_services/wunderground_spec.rb +36 -65
  99. data/spec/weather_services/yahoo_spec.rb +38 -60
  100. data/spec/weather_spec.rb +79 -79
  101. data/spec/web_services/geocode_spec.rb +7 -11
  102. data/spec/web_services/noaa_station_id_spec.rb +33 -0
  103. data/spec/web_services/placemaker_spec.rb +7 -12
  104. data/spec/web_services/web_services_spec.rb +3 -9
  105. metadata +214 -163
  106. data/VERSION.yml +0 -5
  107. data/lib/barometer/weather_services/google.rb +0 -142
  108. data/lib/barometer/weather_services/weather_dot_com.rb +0 -279
  109. data/spec/fakeweb_helper.rb +0 -179
  110. data/spec/fixtures/formats/weather_id/90210.xml +0 -7
  111. data/spec/fixtures/formats/weather_id/from_USGA0028.xml +0 -3
  112. data/spec/fixtures/formats/weather_id/ksfo.xml +0 -1
  113. data/spec/fixtures/formats/weather_id/manhattan.xml +0 -7
  114. data/spec/fixtures/formats/weather_id/new_york.xml +0 -1
  115. data/spec/fixtures/formats/weather_id/the_hills.xml +0 -1
  116. data/spec/fixtures/geocode/40_73_v3.json +0 -497
  117. data/spec/fixtures/geocode/90210_v3.json +0 -63
  118. data/spec/fixtures/geocode/T5B4M9_v3.json +0 -68
  119. data/spec/fixtures/geocode/atlanta_v3.json +0 -58
  120. data/spec/fixtures/geocode/calgary_ab_v3.json +0 -58
  121. data/spec/fixtures/geocode/ksfo_v3.json +0 -73
  122. data/spec/fixtures/geocode/newyork_ny_v3.json +0 -58
  123. data/spec/fixtures/services/google/calgary_ab.xml +0 -1
  124. data/spec/fixtures/services/placemaker/T5B4M9.xml +0 -65
  125. data/spec/fixtures/services/placemaker/atlanta.xml +0 -65
  126. data/spec/fixtures/services/placemaker/coords.xml +0 -65
  127. data/spec/fixtures/services/placemaker/ksfo.xml +0 -65
  128. data/spec/fixtures/services/placemaker/new_york.xml +0 -65
  129. data/spec/fixtures/services/placemaker/the_hills.xml +0 -65
  130. data/spec/fixtures/services/placemaker/w615702.xml +0 -47
  131. data/spec/fixtures/services/weather_bug/90210_current.xml +0 -93
  132. data/spec/fixtures/services/weather_bug/90210_forecast.xml +0 -76
  133. data/spec/fixtures/services/weather_dot_com/90210.xml +0 -1
  134. data/spec/fixtures/services/wunderground/current_calgary_ab.xml +0 -9
  135. data/spec/fixtures/services/wunderground/forecast_calgary_ab.xml +0 -13
  136. data/spec/fixtures/services/yahoo/90210.xml +0 -3
  137. data/spec/weather_services/google_spec.rb +0 -181
  138. data/spec/weather_services/weather_dot_com_spec.rb +0 -224
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- This document is intended only for use by authorized licensees of The -->
3
- <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, -->
4
- <!-- The Weather Channel Interactive, Inc. All Rights Reserved. -->
5
- <search ver="3.0">
6
- <loc id="90210" type="4">Beverly Hills, CA (90210)</loc>
7
- </search>
@@ -1,3 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <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#"> <channel>
2
-
3
- <title>Yahoo! Weather - Atlanta, GA</title> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html</link> <description>Yahoo! Weather for Atlanta, GA</description> <language>en-us</language> <lastBuildDate>Wed, 01 Jun 2011 5:52 pm EDT</lastBuildDate> <ttl>60</ttl> <yweather:location city="Atlanta" region="GA" country="US"/> <yweather:units temperature="F" distance="mi" pressure="in" speed="mph"/> <yweather:wind chill="95" direction="60" speed="12" /> <yweather:atmosphere humidity="33" visibility="10" pressure="30.11" rising="2" /> <yweather:astronomy sunrise="6:27 am" sunset="8:40 pm"/> <image> <title>Yahoo! Weather</title> <width>142</width> <height>18</height> <link>http://weather.yahoo.com</link> <url>http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif</url> </image> <item> <title>Conditions for Atlanta, GA at 5:52 pm EDT</title> <geo:lat>33.75</geo:lat> <geo:long>-84.39</geo:long> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html</link> <pubDate>Wed, 01 Jun 2011 5:52 pm EDT</pubDate> <yweather:condition text="Partly Cloudy" code="30" temp="95" date="Wed, 01 Jun 2011 5:52 pm EDT" /> <description><![CDATA[ <img src="http://l.yimg.com/a/i/us/we/52/30.gif"/><br /> <b>Current Conditions:</b><br /> Partly Cloudy, 95 F<BR /> <BR /><b>Forecast:</b><BR /> Wed - Clear. High: 94 Low: 73<br /> Thu - Mostly Sunny. High: 96 Low: 69<br /> <br /> <a href="http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html">Full Forecast at Yahoo! Weather</a><BR/><BR/> (provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/> ]]></description> <yweather:forecast day="Wed" date="1 Jun 2011" low="73" high="94" text="Clear" code="31" /> <yweather:forecast day="Thu" date="2 Jun 2011" low="69" high="96" text="Mostly Sunny" code="34" /> <guid isPermaLink="false">USGA0028_2011_06_01_17_52_EDT</guid> </item> </channel> </rss> <!-- api6.weather.ac4.yahoo.com uncompressed/chunked Wed Jun 1 15:23:52 PDT 2011 --><?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <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#"> <channel> <title>Yahoo! Weather - Atlanta, GA</title> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html</link> <description>Yahoo! Weather for Atlanta, GA</description> <language>en-us</language> <lastBuildDate>Mon, 04 May 2009 2:52 am EDT</lastBuildDate> <ttl>60</ttl> <yweather:location city="Atlanta" region="GA" country="US"/> <yweather:units temperature="F" distance="mi" pressure="in" speed="mph"/> <yweather:wind chill="63" direction="230" speed="8" /> <yweather:atmosphere humidity="90" visibility="10" pressure="29.96" rising="0" /> <yweather:astronomy sunrise="6:47 am" sunset="8:23 pm"/> <image> <title>Yahoo! Weather</title> <width>142</width> <height>18</height> <link>http://weather.yahoo.com</link> <url>http://l.yimg.com/a/i/us/nws/th/main_142b.gif</url> </image> <item> <title>Conditions for Atlanta, GA at 2:52 am EDT</title> <geo:lat>33.75</geo:lat> <geo:long>-84.39</geo:long> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html</link> <pubDate>Mon, 04 May 2009 2:52 am EDT</pubDate> <yweather:condition text="Mostly Cloudy" code="27" temp="63" date="Mon, 04 May 2009 2:52 am EDT" /> <description><![CDATA[ <img src="http://l.yimg.com/a/i/us/we/52/27.gif"/><br /> <b>Current Conditions:</b><br /> Mostly Cloudy, 63 F<BR /> <BR /><b>Forecast:</b><BR /> Mon - Strong Storms. High: 77 Low: 64<br /> Tue - Thunderstorms. High: 70 Low: 59<br /> <br /> <a href="http://us.rd.yahoo.com/dailynews/rss/weather/Atlanta__GA/*http://weather.yahoo.com/forecast/USGA0028_f.html">Full Forecast at Yahoo! Weather</a><BR/> (provided by The Weather Channel)<br/> ]]></description> <yweather:forecast day="Mon" date="4 May 2009" low="64" high="77" text="Strong Storms" code="3" /> <yweather:forecast day="Tue" date="5 May 2009" low="59" high="70" text="Thunderstorms" code="4" /> <guid isPermaLink="false">USGA0028_2009_05_04_2_52_EDT</guid> </item> </channel> </rss><!-- api4.weather.sp1.yahoo.com compressed/chunked Mon May 4 00:02:14 PDT 2009 -->
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?> <!-- This document is intended only for use by authorized licensees of The --> <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, --> <!-- The Weather Channel Interactive, Inc. All Rights Reserved. --> <search ver="3.0"> <loc id="USCA0987" type="1">San Francisco, CA</loc> <loc id="USCA1085" type="1">South San Francisco, CA</loc> </search>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- This document is intended only for use by authorized licensees of The -->
3
- <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, -->
4
- <!-- The Weather Channel Interactive, Inc. All Rights Reserved. -->
5
- <search ver="3.0">
6
- <loc id="USNY0996" type="1">New York, NY</loc>
7
- </search>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?> <!-- This document is intended only for use by authorized licensees of The --> <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, --> <!-- The Weather Channel Interactive, Inc. All Rights Reserved. --> <search ver="3.0"> <loc id="USNY0996" type="1">New York, NY</loc> <loc id="USNY0011" type="1">Albany, NY</loc> <loc id="USNY0181" type="1">Buffalo, NY</loc> <loc id="USNY1232" type="1">Rochester, NY</loc> <loc id="USNY1434" type="1">Syracuse, NY</loc> <loc id="USNY1010" type="1">Niagara Falls, NY</loc> <loc id="USNY1630" type="1">York, NY</loc> <loc id="USNY0997" type="1">New York Mills, NY</loc> <loc id="USNY0819" type="1">Little York, NY</loc> <loc id="USNY0998" type="1">New York/Central Park, NY</loc> </search>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?> <!-- This document is intended only for use by authorized licensees of The --> <!-- Weather Channel. Unauthorized use is prohibited. Copyright 1995-2011, --> <!-- The Weather Channel Interactive, Inc. All Rights Reserved. --> <search ver="3.0"> <loc id="USCA0090" type="1">Beverly Hills, CA</loc> </search>
@@ -1,497 +0,0 @@
1
- {
2
- "results" : [
3
- {
4
- "address_components" : [
5
- {
6
- "long_name" : "601-699",
7
- "short_name" : "601-699",
8
- "types" : [ "street_number" ]
9
- },
10
- {
11
- "long_name" : "7th Ave",
12
- "short_name" : "7th Ave",
13
- "types" : [ "route" ]
14
- },
15
- {
16
- "long_name" : "Manhattan",
17
- "short_name" : "Manhattan",
18
- "types" : [ "sublocality", "political" ]
19
- },
20
- {
21
- "long_name" : "New York",
22
- "short_name" : "New York",
23
- "types" : [ "locality", "political" ]
24
- },
25
- {
26
- "long_name" : "New York",
27
- "short_name" : "New York",
28
- "types" : [ "administrative_area_level_2", "political" ]
29
- },
30
- {
31
- "long_name" : "New York",
32
- "short_name" : "NY",
33
- "types" : [ "administrative_area_level_1", "political" ]
34
- },
35
- {
36
- "long_name" : "United States",
37
- "short_name" : "US",
38
- "types" : [ "country", "political" ]
39
- },
40
- {
41
- "long_name" : "10036",
42
- "short_name" : "10036",
43
- "types" : [ "postal_code" ]
44
- }
45
- ],
46
- "formatted_address" : "601-699 7th Ave, Manhattan, NY 10036, USA",
47
- "geometry" : {
48
- "bounds" : {
49
- "northeast" : {
50
- "lat" : 40.75669690,
51
- "lng" : -73.98648360
52
- },
53
- "southwest" : {
54
- "lat" : 40.7560340,
55
- "lng" : -73.98694510
56
- }
57
- },
58
- "location" : {
59
- "lat" : 40.75603950,
60
- "lng" : -73.98691470
61
- },
62
- "location_type" : "RANGE_INTERPOLATED",
63
- "viewport" : {
64
- "northeast" : {
65
- "lat" : 40.75951307068017,
66
- "lng" : -73.98356672931983
67
- },
68
- "southwest" : {
69
- "lat" : 40.75321782931983,
70
- "lng" : -73.98986197068018
71
- }
72
- }
73
- },
74
- "types" : [ "street_address" ]
75
- },
76
- {
77
- "address_components" : [
78
- {
79
- "long_name" : "Theater District - Times Square",
80
- "short_name" : "Theater District - Times Square",
81
- "types" : [ "neighborhood", "political" ]
82
- },
83
- {
84
- "long_name" : "Manhattan",
85
- "short_name" : "Manhattan",
86
- "types" : [ "sublocality", "political" ]
87
- },
88
- {
89
- "long_name" : "New York",
90
- "short_name" : "New York",
91
- "types" : [ "locality", "political" ]
92
- },
93
- {
94
- "long_name" : "New York",
95
- "short_name" : "New York",
96
- "types" : [ "administrative_area_level_2", "political" ]
97
- },
98
- {
99
- "long_name" : "New York",
100
- "short_name" : "NY",
101
- "types" : [ "administrative_area_level_1", "political" ]
102
- },
103
- {
104
- "long_name" : "United States",
105
- "short_name" : "US",
106
- "types" : [ "country", "political" ]
107
- }
108
- ],
109
- "formatted_address" : "Theater District - Times Square, New York, NY, USA",
110
- "geometry" : {
111
- "bounds" : {
112
- "northeast" : {
113
- "lat" : 40.7641790,
114
- "lng" : -73.9790780
115
- },
116
- "southwest" : {
117
- "lat" : 40.753730,
118
- "lng" : -73.99088209999999
119
- }
120
- },
121
- "location" : {
122
- "lat" : 40.756590,
123
- "lng" : -73.986260
124
- },
125
- "location_type" : "APPROXIMATE",
126
- "viewport" : {
127
- "northeast" : {
128
- "lat" : 40.7641790,
129
- "lng" : -73.9790780
130
- },
131
- "southwest" : {
132
- "lat" : 40.753730,
133
- "lng" : -73.99088209999999
134
- }
135
- }
136
- },
137
- "types" : [ "neighborhood", "political" ]
138
- },
139
- {
140
- "address_components" : [
141
- {
142
- "long_name" : "10036",
143
- "short_name" : "10036",
144
- "types" : [ "postal_code" ]
145
- },
146
- {
147
- "long_name" : "Manhattan",
148
- "short_name" : "Manhattan",
149
- "types" : [ "sublocality", "political" ]
150
- },
151
- {
152
- "long_name" : "New York",
153
- "short_name" : "NY",
154
- "types" : [ "administrative_area_level_1", "political" ]
155
- },
156
- {
157
- "long_name" : "United States",
158
- "short_name" : "US",
159
- "types" : [ "country", "political" ]
160
- }
161
- ],
162
- "formatted_address" : "Manhattan, NY 10036, USA",
163
- "geometry" : {
164
- "bounds" : {
165
- "northeast" : {
166
- "lat" : 40.7760470,
167
- "lng" : -73.9781160
168
- },
169
- "southwest" : {
170
- "lat" : 40.7541550,
171
- "lng" : -74.00951999999999
172
- }
173
- },
174
- "location" : {
175
- "lat" : 40.76314850,
176
- "lng" : -73.99622549999999
177
- },
178
- "location_type" : "APPROXIMATE",
179
- "viewport" : {
180
- "northeast" : {
181
- "lat" : 40.7760470,
182
- "lng" : -73.9781160
183
- },
184
- "southwest" : {
185
- "lat" : 40.7541550,
186
- "lng" : -74.00951999999999
187
- }
188
- }
189
- },
190
- "types" : [ "postal_code" ]
191
- },
192
- {
193
- "address_components" : [
194
- {
195
- "long_name" : "Midtown",
196
- "short_name" : "Midtown",
197
- "types" : [ "neighborhood", "political" ]
198
- },
199
- {
200
- "long_name" : "Manhattan",
201
- "short_name" : "Manhattan",
202
- "types" : [ "sublocality", "political" ]
203
- },
204
- {
205
- "long_name" : "New York",
206
- "short_name" : "New York",
207
- "types" : [ "locality", "political" ]
208
- },
209
- {
210
- "long_name" : "New York",
211
- "short_name" : "New York",
212
- "types" : [ "administrative_area_level_2", "political" ]
213
- },
214
- {
215
- "long_name" : "New York",
216
- "short_name" : "NY",
217
- "types" : [ "administrative_area_level_1", "political" ]
218
- },
219
- {
220
- "long_name" : "United States",
221
- "short_name" : "US",
222
- "types" : [ "country", "political" ]
223
- }
224
- ],
225
- "formatted_address" : "Midtown, New York, NY, USA",
226
- "geometry" : {
227
- "bounds" : {
228
- "northeast" : {
229
- "lat" : 40.8060980,
230
- "lng" : -73.94221689999999
231
- },
232
- "southwest" : {
233
- "lat" : 40.72732999999999,
234
- "lng" : -74.00882020
235
- }
236
- },
237
- "location" : {
238
- "lat" : 40.7690810,
239
- "lng" : -73.9771260
240
- },
241
- "location_type" : "APPROXIMATE",
242
- "viewport" : {
243
- "northeast" : {
244
- "lat" : 40.8060980,
245
- "lng" : -73.94221689999999
246
- },
247
- "southwest" : {
248
- "lat" : 40.72732999999999,
249
- "lng" : -74.00882020
250
- }
251
- }
252
- },
253
- "types" : [ "neighborhood", "political" ]
254
- },
255
- {
256
- "address_components" : [
257
- {
258
- "long_name" : "Manhattan",
259
- "short_name" : "Manhattan",
260
- "types" : [ "sublocality", "political" ]
261
- },
262
- {
263
- "long_name" : "New York",
264
- "short_name" : "New York",
265
- "types" : [ "locality", "political" ]
266
- },
267
- {
268
- "long_name" : "New York",
269
- "short_name" : "New York",
270
- "types" : [ "administrative_area_level_2", "political" ]
271
- },
272
- {
273
- "long_name" : "New York",
274
- "short_name" : "NY",
275
- "types" : [ "administrative_area_level_1", "political" ]
276
- },
277
- {
278
- "long_name" : "United States",
279
- "short_name" : "US",
280
- "types" : [ "country", "political" ]
281
- }
282
- ],
283
- "formatted_address" : "Manhattan, New York, NY, USA",
284
- "geometry" : {
285
- "bounds" : {
286
- "northeast" : {
287
- "lat" : 40.8200450,
288
- "lng" : -73.90331300000001
289
- },
290
- "southwest" : {
291
- "lat" : 40.6980780,
292
- "lng" : -74.03514899999999
293
- }
294
- },
295
- "location" : {
296
- "lat" : 40.78343450,
297
- "lng" : -73.96624950
298
- },
299
- "location_type" : "APPROXIMATE",
300
- "viewport" : {
301
- "northeast" : {
302
- "lat" : 40.8200450,
303
- "lng" : -73.90331300000001
304
- },
305
- "southwest" : {
306
- "lat" : 40.6980780,
307
- "lng" : -74.03514899999999
308
- }
309
- }
310
- },
311
- "types" : [ "sublocality", "political" ]
312
- },
313
- {
314
- "address_components" : [
315
- {
316
- "long_name" : "New York",
317
- "short_name" : "New York",
318
- "types" : [ "administrative_area_level_2", "political" ]
319
- },
320
- {
321
- "long_name" : "New York",
322
- "short_name" : "NY",
323
- "types" : [ "administrative_area_level_1", "political" ]
324
- },
325
- {
326
- "long_name" : "United States",
327
- "short_name" : "US",
328
- "types" : [ "country", "political" ]
329
- }
330
- ],
331
- "formatted_address" : "New York, USA",
332
- "geometry" : {
333
- "bounds" : {
334
- "northeast" : {
335
- "lat" : 40.8822140,
336
- "lng" : -73.9070
337
- },
338
- "southwest" : {
339
- "lat" : 40.67954790,
340
- "lng" : -74.0472850
341
- }
342
- },
343
- "location" : {
344
- "lat" : 40.78306030,
345
- "lng" : -73.97124880
346
- },
347
- "location_type" : "APPROXIMATE",
348
- "viewport" : {
349
- "northeast" : {
350
- "lat" : 40.8822140,
351
- "lng" : -73.9070
352
- },
353
- "southwest" : {
354
- "lat" : 40.67954790,
355
- "lng" : -74.0472850
356
- }
357
- }
358
- },
359
- "types" : [ "administrative_area_level_2", "political" ]
360
- },
361
- {
362
- "address_components" : [
363
- {
364
- "long_name" : "New York",
365
- "short_name" : "New York",
366
- "types" : [ "locality", "political" ]
367
- },
368
- {
369
- "long_name" : "New York",
370
- "short_name" : "New York",
371
- "types" : [ "administrative_area_level_2", "political" ]
372
- },
373
- {
374
- "long_name" : "New York",
375
- "short_name" : "NY",
376
- "types" : [ "administrative_area_level_1", "political" ]
377
- },
378
- {
379
- "long_name" : "United States",
380
- "short_name" : "US",
381
- "types" : [ "country", "political" ]
382
- }
383
- ],
384
- "formatted_address" : "New York, NY, USA",
385
- "geometry" : {
386
- "bounds" : {
387
- "northeast" : {
388
- "lat" : 40.9175770,
389
- "lng" : -73.7002720
390
- },
391
- "southwest" : {
392
- "lat" : 40.4773990,
393
- "lng" : -74.259090
394
- }
395
- },
396
- "location" : {
397
- "lat" : 40.71435280,
398
- "lng" : -74.00597309999999
399
- },
400
- "location_type" : "APPROXIMATE",
401
- "viewport" : {
402
- "northeast" : {
403
- "lat" : 40.9175770,
404
- "lng" : -73.7002720
405
- },
406
- "southwest" : {
407
- "lat" : 40.4773990,
408
- "lng" : -74.259090
409
- }
410
- }
411
- },
412
- "types" : [ "locality", "political" ]
413
- },
414
- {
415
- "address_components" : [
416
- {
417
- "long_name" : "New York",
418
- "short_name" : "NY",
419
- "types" : [ "administrative_area_level_1", "political" ]
420
- },
421
- {
422
- "long_name" : "United States",
423
- "short_name" : "US",
424
- "types" : [ "country", "political" ]
425
- }
426
- ],
427
- "formatted_address" : "New York, USA",
428
- "geometry" : {
429
- "bounds" : {
430
- "northeast" : {
431
- "lat" : 45.0158650,
432
- "lng" : -71.7774910
433
- },
434
- "southwest" : {
435
- "lat" : 40.4773990,
436
- "lng" : -79.762590
437
- }
438
- },
439
- "location" : {
440
- "lat" : 43.29942850,
441
- "lng" : -74.21793260000001
442
- },
443
- "location_type" : "APPROXIMATE",
444
- "viewport" : {
445
- "northeast" : {
446
- "lat" : 45.0158650,
447
- "lng" : -71.7774910
448
- },
449
- "southwest" : {
450
- "lat" : 40.4773990,
451
- "lng" : -79.762590
452
- }
453
- }
454
- },
455
- "types" : [ "administrative_area_level_1", "political" ]
456
- },
457
- {
458
- "address_components" : [
459
- {
460
- "long_name" : "United States",
461
- "short_name" : "US",
462
- "types" : [ "country", "political" ]
463
- }
464
- ],
465
- "formatted_address" : "United States",
466
- "geometry" : {
467
- "bounds" : {
468
- "northeast" : {
469
- "lat" : 71.53879999999999,
470
- "lng" : -66.88507489999999
471
- },
472
- "southwest" : {
473
- "lat" : 18.77630,
474
- "lng" : 170.59570
475
- }
476
- },
477
- "location" : {
478
- "lat" : 37.090240,
479
- "lng" : -95.7128910
480
- },
481
- "location_type" : "APPROXIMATE",
482
- "viewport" : {
483
- "northeast" : {
484
- "lat" : 71.53879999999999,
485
- "lng" : -66.88507489999999
486
- },
487
- "southwest" : {
488
- "lat" : 18.77630,
489
- "lng" : 170.59570
490
- }
491
- }
492
- },
493
- "types" : [ "country", "political" ]
494
- }
495
- ],
496
- "status" : "OK"
497
- }