extract by delimiter
Thomas McGrath III
mcgrath3 at mac.com
Wed Dec 29 01:18:07 EST 2010
Chris, I was doing just that. Testing Yahoo and then Google's api. I will check into the NOAA next. Thanks for the heads up. It puts out a lot of data over the others.
I like the raw lat/long concept. It won't be more than once an hour, so that's ok.
I did find the way to skip the WOEIDs and go right to the zip code with yahoo.
Weather Bug Geo didn't work for me although I like their accuracy the best - the API is weak and doesn't always work. I had problems with it anyway.
So now I will check the NOAA
THanks
-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net
On Dec 29, 2010, at 12:12 AM, Nonsanity wrote:
> I've tested both Yahoo and Google's (undocumented) REST APIs for weather,
> but settled on NOAA's:
>
> http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdXMLclient.php?lat=38.99&lon=-77.01&product=glance&begin=2010-12-28T00:00:00&end=2011-01-03T00:00:00<%20http://www.weather.gov/forecasts/xml/sample_products/browser_interface/ndfdXMLclient.php?lat=38.99&lon=-77.01&product=glance&begin=2010-12-28T00:00:00&end=2011-01-03T00:00:00>
>
> Note that first the output defines one or more time series with a name like
> "k-p24h-n5-1", then has sections for each of the results. The URL above uses
> the "glance" setting, so it always gives the same result categories. The NOAA
> page on the API <http://www.weather.gov/forecasts/xml/rest.php> goes into
> more detail about what other data types you can fetch.
>
> The thing to note is that the time series name is human readable. "p24h"
> means 24 hours per sample, and "n5" means 5 samples.
>
> Nice thing is, it takes raw lat/lon. No conversion to zip code or other
> location metric. I've already got a nice temp chart going. Just don't fetch
> the data more than once an hour in the final product - There's no point, as
> it only updates once per hour on the 45's.
>
> ~ Chris Innanen
> ~ Nonsanity
>
>
>
> On Tue, Dec 28, 2010 at 11:12 PM, Thomas McGrath III <mcgrath3 at mac.com>wrote:
>
>> By the way I tried all of the examples posted to better see what I was
>> missing. I'm a visual oriented person and so I went with steps I could see.
>> Only one problem in removing leading spaces, I took the lazy way out after
>> getting confused again with multiple repeat loops etc.
>>
>> So here is what I decided to use for now:
>>
>> on mouseUp
>> put "http://weather.yahooapis.com/forecastrss?w=22664069&u=f" into
>> tTempURL
>> put url tTempURL into field "Source"
>> put field 1 into tTemp
>> filter tTemp with "*yweather:*"
>> replace "<" with "" in tTemp
>> replace "/>" with "" in tTemp
>> replace "yweather:" with "" in tTemp
>> replace quote&space with quote&cr in tTemp -- Did the trick
>> repeat for 5 -- Lazy way to catch leading spaces
>> repeat with x = 1 to the number of lines in tTemp
>> if char 1 of line x of tTemp is space then delete
>> char 1 of line x of tTemp
>> if line x of tTemp is quote then delete line x of
>> tTemp
>> if line x of tTemp is "" then delete line x of tTemp
>> end repeat
>> end repeat
>> if last line of tTemp is "" then delete last line of tTemp
>> put tTemp into field "Result"
>> end mouseUp
>>
>> I don't mind the quotes in the Result for my other code and I get a nice
>> list of the info I need.
>>
>> Now I need to write a LAT LON converter to WOEID and or a ZIP Code to WOEID
>> (Yahoo ID scheme)
>>
>> w=22664069 is for Bethel Park PA
>>
>>
>> -- Tom McGrath III
>> http://lazyriver.on-rev.com
>> 3mcgrath at comcast.net
>>
>> On Dec 28, 2010, at 7:50 PM, Mark Wieder wrote:
>>
>>> Jeff-
>>>
>>> Tuesday, December 28, 2010, 4:47:02 PM, you wrote:
>>>
>>>> So, most others have sent you excellent suggestions. I just find
>>>> it funny that the little town you mention just happened to be the
>>>> place I was born. ;-)
>>>
>>> You could probably save Tom a lot of trouble if you just tell him what
>>> the weather's like...
>>>
>>> --
>>> -Mark Wieder
>>> mwieder at ahsoftware.net
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list