Closed jbrough closed 5 years ago
Hi Jamie,
We were wondering if there is a way to limit search results from the API to UK only results?
For example, if I add my postcode ('CM2', which I assume should be in a 3 digit format), and limited to 10 kilometres, I receive results results from all over the world for one trial.
http://35.234.148.3:8090/data/trials/uk/CM2/10/m/70/.json
If there is a way to build this in, it would probably be handy for us.
Thanks, Martin
@jbrough, could you help with this please? Thanks
Hi Martin,
Needs a full postcode or a full and valid outcode at miminum, eg
http://35.234.148.3:8090/data/trials/uk/CM23/10/m/70/.json
I don't think CM2 is a full outcode. But it's a bug that you get results if the postcode doesn't match, will fix it.
Jamie
On Wed, 6 Feb 2019, 10:46 Mr Bagglesworth <notifications@github.com wrote:
Hi Jamie,
We were wondering if there is a way to limit search results from the API to UK only results?
For example, if I add my postcode ('CM2', which I assume should be in a 3 digit format), and limited to 10 kilometres, I receive results results from all over the world for one trial.
http://35.234.148.3:8090/data/trials/uk/CM2/10/m/70/.json
If there is a way to build this in, it would probably be handy for us.
Thanks, Martin
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fac-15/Curenetics/issues/4#issuecomment-460978922, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIxETk3EAPaOEqzuNz_OPS2EybQ_efPks5vKrKAgaJpZM4ahFCl .
Note that some outcodes are first three letters:
http://35.234.148.3:8090/data/trials/uk/w1a/10/m/70/.json
But many are first 4. Providing the full postcode is safest as it will do the correct matching automatically.
Jamie
On Wed, 6 Feb 2019, 15:09 Jamie <jamie1612@gmail.com wrote:
Hi Martin,
Needs a full postcode or a full and valid outcode at miminum, eg
http://35.234.148.3:8090/data/trials/uk/CM23/10/m/70/.json
I don't think CM2 is a full outcode. But it's a bug that you get results if the postcode doesn't match, will fix it.
Jamie
On Wed, 6 Feb 2019, 10:46 Mr Bagglesworth <notifications@github.com wrote:
Hi Jamie,
We were wondering if there is a way to limit search results from the API to UK only results?
For example, if I add my postcode ('CM2', which I assume should be in a 3 digit format), and limited to 10 kilometres, I receive results results from all over the world for one trial.
http://35.234.148.3:8090/data/trials/uk/CM2/10/m/70/.json
If there is a way to build this in, it would probably be handy for us.
Thanks, Martin
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fac-15/Curenetics/issues/4#issuecomment-460978922, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIxETk3EAPaOEqzuNz_OPS2EybQ_efPks5vKrKAgaJpZM4ahFCl .
Hi Jamie,
Thanks for your response.
I have tried a few different combinations of my postcode, but with '10' entered in the url for distance of km, I keep getting San Diego as the top result for me. For example:
http://35.234.148.3:8090/data/trials/uk/cm2/10/m/70/.json
http://35.234.148.3:8090/data/trials/uk/CM27/10/m/70/.json
http://35.234.148.3:8090/data/trials/uk/cm27jp/10/m/70/.json
If we are to have the ability to limit results by kilometres (as mentioned in your comment above regarding the request url), it would be handy to not have to do any further filtering.
Thanks for your assistance, Martin
Hi Jamie. Let me know if you have further inputs to Martin's comments above. Thanks
@sesola @jbrough , We're at the process of using and displaying the data, and just wanted to make sure - is this the best data structure we could get? What we mean is this api is pretty nested, and if there's any chance of getting a flatter data structure it would help us handle search results and filter better.
Thanks Michal.
I’ve just tried to remind Jamie to help with the query.
Let me know if you need anything else
Sola
On 11 Feb 2019, at 18:16, Michal Weizman notifications@github.com wrote:
@sesola @jbrough , We're at the process of using and displaying the data, and just wanted to make sure - is this the best data structure we could get? What we mean is this api is pretty nested, and if there's any chance of getting a flatter data structure it would help us handle search results and filter better.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
we have a basic api that lets you search for all available trails with a km distance of a postcode (full or outcode):
http://35.234.148.3:8090/data/trials/uk/{postcode}/{km}/{sex}/{age}/.json
eg:
http://35.234.148.3:8090/data/trials/uk/YO18/10/m/70/.json
Initially the
size
attribute is prob the most useful - number of matching trials. We can add other UI-friendly attributes to these results like cost of travel etc.