duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Expatistan: API not returning results #2017

Closed moollaza closed 9 years ago

moollaza commented 9 years ago

Seems the API is not returning results for cities?

https://duckduckgo.com/?q=cost+of+living+philadelphia Countries seem to work fine though: https://duckduckgo.com/?q=cost+of+living+Canada

@pardocz are you still mainting the API? Are you free to help with this?


IA Page: http://duck.co/ia/view/expatistan

pardocz commented 9 years ago

The API is up and returning results for most cities too:

https://duckduckgo.com/?q=cost+of+living+madrid&ia=answer

Some cities (mostly American ones) were in fact broken, but I just fixed the bug and deployed it in production. All queries should be working now.

The post-processing seems to be broken again, though (see https://github.com/duckduckgo/zeroclickinfo-spice/pull/1273). But that's a different issue.

moollaza commented 9 years ago

@pardocz thanks a lot for the quick response and fix!

Can you give an example of what you're seeing broken? It seems fine to me? https://duckduckgo.com/?q=cost+of+living+philadelphia+vs+madrid&ia=answer

pardocz commented 9 years ago

@moollaza No problem!

The comparisons display fine. It's the single city queries that display a silly answer: https://duckduckgo.com/?q=cost+of+living+philadelphia&ia=answer

moollaza commented 9 years ago

@pardocz I believe that design is intended, but we should probably show in the subtitle what the baseline is for the index!)

pardocz commented 9 years ago

Yes, showing the baseline would be great to give some context.

The API already includes a baseline text:

"Philadelphia has a cost of living index of 204 in Expatistan's scale (100 = Prague, Czech Republic)"

Maybe this can be used for the answer? Or adapted? Or if you suggest a new text, I will be happy to change it in the API.

moollaza commented 9 years ago

@pardocz I don't think the API needs to be changed. I think the IA should be updated to mention the scale. We could probably use the new moreText property to mention the scale right beside the link to Expatisan

pardocz commented 9 years ago

OK, good. Let me know if I need to do anything on my side.