API to get current weather conditions for any point on Earth - web-services

I'm in the planning phase of a project and one of the requirements is that the system be able to get the current weather conditions for any point on Earth, given a set of latitude-longitude coordinates.
I signed up for Wunderground.com's Weather API, but immediately realized this wouldn't work. If you enter a set of coordinates that doesn't correspond to a known city, the API returns a "querynotfound" error with the description "No cities match your search query."
Does a service like this exist?
EDIT: To clarify, I might need the current weather conditions for some arbitary point in (say) the Atlantic ocean.

Have you looked at google api?
http://www.google.com/ig/api?weather=,,,40467626,-03609910&hl=es
I think this is what you are looking for Using Google Weather API with Lat and Lon - how to format?
Edited 29th Aug 2012
As mentioned by "azgolfer" as of August 25th, 2012. Google has phased out it's API. Try http://www.wunderground.com/ instead.

Related

Matched-maturity vanilla swap in Quantlib

Firstly apologies if this has been answered elsewhere.
I am using QuantLib (via Excel) to build a "standard" bond pricing sheet: prices, yields, spline AND matched-maturity ASW.
I can price the bonds, and have successfully built a forecast (Euribor) and discount (EONIA) curve. I can use qlMakeVanillaSwap() to define a spot-start swap by tenor (eg "1y","2Y" etc) and it works fine. However I am struggling to define a "broken date" swap, ie one which starts T+2 and ends on a given date (and so usually has a short stub on the first payment), to match the bond maturity. All the examples I can find have integer year tenors.
I would be grateful if someone could point me to the right method (can be in python, C++ or Excel). Or do I have to go down the route of creating explicit fixed and floating rate schedules for the swaps?
The answer seems to be: Yes, I do have to create explicit fixed and floating rate schedules, using qlSchedule(), but it turns out to be not too onerous. NB. I am pricing a vanilla EUR ABB vs 6m Euribor swap.
As for pricing, it seems the qlMakeVanillaSwap() is doing a few helpful things in one call, but only IF your swap has a whole-period tenor (eg "1y"). I found the answer for what I wanted to do in the example sheet that came with the QuantLibXL download package.
The other thing that qlMakeVanillaSwap() is doing (in addition to creating the schedules) is setting the Pricing Engine (which is used to discount the cashflows). In the longer version you have to (a) set it yourself using qlInstrumentSetPricingEngine() and (b) pass the result of that call to the Trigger parameter of qlVanillaSwapFairRate(), to establish the calculation order.

Mapbox Geocoding API V5- Get all neighborhoods in a city

Is there a way to get all neighborhoods per city by lat and lng from mapbox API V5.
For example, if I search using the lat and lng of Long Beach.
-118.1937, 33.7701
I expect to get back all the neighborhoods, instead, I only get back one result of
"place_name: "Downtown, Long Beach, California 90802, United States""
I have changed the response limit and bound box, with no results.
Here is the mapbox playground.
https://www.mapbox.com/api-playground/#/forward-geocoding
Thanks!
Mapbox doesn't really do neighborhoods, they require some sort of search data to pull either addresses or places.
However, there are services where you can get neighborhood data. I found this Stack Overflow question to have several links (sadly, most of them outdated....), with the reference to Zillow having a lot of promise.
I'd also suggest the Census Bureau data as it may have what you are looking for, but it is what I would call 'less than user friendly' to find anything - unless you are comfortable reading government spec sort of things... :)

No Shipping Options Available - OpenCart 1.5.6

I'm attempting to set up an OpenCart store for a client.
I'm getting the following error on the shipping page.
"Warning: No Shipping options are available. Please contact us for assistance!"
Research suggests that this error happens when there is a mismatch between the weight-class for the store and for the plugin, or something similar.
I've tried every combination of configuration settings that I can think of without result.
I'm not familiar enough with OpenCart to debug this issue. Where do I need to start looking?
Firstly you have to enable the shipping status and the values from admin panel shipping tab.After that you can get it in the front end.
My troubleshooting procedure:
The store weight UOM had been set to ounces.
The Fedex plugin doesn't support ounces as a weight UOM.
Nothing works.
The store weight UOM was changed to LBS.
Nothing works.
The package size was set to FedEx 10 KG Box
The Fedex plugin can't convert from Lbs to KG on the fly.
The package size was changed to "Fedex Box", without a weight class
Some products now working, all shipping estimates are WAY high.
When changing the default UOM for the store, no existing weights are converted in to the new units, although any weights stored without a unit are now read as being in the new unit.
This meant that the fedex system was trying to pull prices for items that "weighed" hundred of ounces (which it should have been able to do, even though those weights were incorrect.)
I updated the weights on all products to be in line with their unit of measure
At this point, the plugin was working for most, but not all, products, with reasonable accuracy.
I changed the plugin settings from List Rate to Account rate.
Now everything works.
To simplify - The fedex shipping plugin in opencart 1.5.6 will only work if:
All the products in the system have their weights stored in the same UOM.
That UOM is either pounds or kilograms (not ounces!)
A geozone is set, and a zip code is supplied(zip codes are important!)
The package size matches the unit of measure for the weight (no mixing kilograms and pounds!)
The product weights are actually correct
The account in question has a rate for a package of the indicated size
Hopefully someone else will find this helpful.
Ive been through this problem as well and I haven't yet fixed it completely.
But in my particular problem, I had a syntax error in the XML retrieved by the Fedex server after the cURL request.
Printing the $response variable I could find some good hints about some of the problems, for example, commas (,) instead of dots (.) to refer to decimal numbers and decimal numbers where it was expecting an integer.
So var_dump($response) could help some people find their specific issues.

Google Places vs. Qype vs. others

at the moment I am working on a regional evaluation system.
I actually want to e.g. find out how regions are composed, let us say given
a lat long coordinate and a radius. Hereby I would really like to be able to separate by type and it is also necessary for the data to be up to date.
So which API based services do you recommend, if the following factors are important:
support for lat/long coordinates with search radius
differentiation by type of location
up to date information
As far as I know Google places and qype.com offer APIs which should be able to do so.
Is there a better option or which of the both do you recommend and why?
As far as I found out only Qype and Google Places offer the APIs.
Google offers 1000 requests per day for free while Qype only offers 200,
but one could apply for multiple keys in Qype which enables you to do more requests a day.
With Qype it is possible to check the full amount of commercial establishments in range (bounding box or radius), while google places has a restriction to 60 places per request.
That is the reason why I decided to use Qype.
About whether or not the information is up to date I did not make an evaluation,
but Qype shows reasonable results when applied to Munich.

Yahoo Maps Geocode

How Do I work around a problem with the yahoo map geocode result set? The result set being returned is wrong. The city field contains the city, region and postal code. As seen below.
Is there a way to work around this issue without breaking scalability.
-33.924320
151.187057
203 Coward St
MASCOT NSW 2020
Australia
AU
The Yahoo geoencoding returns usually an XML or a PHP serialized. By querying the encoding service I suppose you already have the address and you want to get the coordinates for your geoPoint. It is possible that you are feeding the maps engine with a wrong request.
If you think you found a bug you can send them an email, but I suggest you to check with other locations or to publish first here your code in order to spot the eventual errors.