Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output generator tweaks #93

Closed
wants to merge 4 commits into from
Closed

Output generator tweaks #93

wants to merge 4 commits into from

Conversation

hkrishna
Copy link
Contributor

@hkrishna hkrishna commented Apr 6, 2015

Does adding a 'national' key to the outputSchema make sense? Here's the argument - When Pelias used as a product with a dataset thats global (meaning more than one or two countries), doesn't it not make sense to have a national segment to the output schema. This of-course can be optional if not mentioned in outputSchema.json

Note: This will cause a bunch of regressions in https://github.com/pelias/acceptance-tests
Fixes #46

@missinglink
Copy link
Member

You're proposing adding a 4th 'section' to the output text?

eg. the text property in the geojson would be in the format name, local, regional, national instead of just name, local, regional?

one thing to consider is that for mobile clients 'less is more', we introduced the admin1_abbr property for this reason; because small screens can't accommodate such long/descriptive text.

@dianashk
Copy link
Contributor

dianashk commented Apr 8, 2015

+1

It makes sense to add it. (nominatim does)

@hkrishna
Copy link
Contributor Author

hkrishna commented Apr 8, 2015

@missinglink yes, I think adding a 4th section national makes sense - I thought about mobile clients and if you mention alpha3 before admin0 in outputSchma.json, alpha3 takes precedence.

"default": {
    "local": ["local_admin", "locality", "neighborhood", "admin2"],
    "regional": ["admin1_abbr", "admin1"],
    "national": ["alpha3", "admin0"]
  }

This would yield results such as Blind Barber, East Village, NY, USA or 123 E 12th st, New York, NY, USA

@hkrishna hkrishna removed the question label Apr 8, 2015
@hkrishna hkrishna changed the title [Discussion] Output generator tweaks Output generator tweaks Apr 8, 2015
@hkrishna
Copy link
Contributor Author

hkrishna commented Apr 8, 2015

@missinglink is this good to go? You can easily turn it off by simply not mentioning the national key in the outputSchema.json file (if someone were to build a geocoder for a small city).

@missinglink
Copy link
Member

I am still 👎 on this sorry, I personally feel that the string returned is not as good as the previous iteration, based on what I see here: http://rawgit.com/pelias/demo/two-servers/index.html#loc=12,40.7255,-73.9795&q=arbil&t=fine&gb=off

  • it's less succinct & therefore more difficult to render on smaller screens, if you consider the impact to the 'mapzen open app', this will probably result in more rows going to a 2nd line of text which means less results per 'page'.
  • suffixing the output text with an alpha3 is pretty geeky and not very human, it doesn't pass the 'mum test' ie. does it make sense to a non/semi technical user?
  • I personally like the gmaps experience, eg. 'Trafalgar Square, London' gives me enough information to understand where it is by simply providing name, city.
  • For users who mostly search within their own country, suffixing the country name is somewhat redundant.

Is there a simpler, more human solution we could explore which passes the 'mum test'?

@hkrishna
Copy link
Contributor Author

hkrishna commented Apr 9, 2015

Thats fair. Yes, we can explore a simpler, more human solution that passes the mum test. I agree with your comment on whether alpha3 values makes any sense to non/semi technical users - it probably doesn't. And if we use admin0 values - it might get too wordy and long - probably wont make sense for someone who always searches within his/her country.

While we have to think about mobile/ smaller screens and account for possible rendering issues, we should also keep in mind that the clients can compile their own presentational logic based on the document properties.

Another approach to this problem is to let the user decide what version of output text they would like through the API. Perhaps an additional optional parameter lets say outputSchema.

  • &outputSchema=all (by default): will return name, local, regional, national as defined in outputSchema.json Ex: Arbil, Lye, West Midlands, GBR
  • &outputSchema=local,regional: will return name, local, regional Ex: Arbil, Lye, West Midlands

We can also push this one step further and define formats for mobile &outputSchema=mobile in a config file which will cater to smaller screens. Thoughts?

@sevko
Copy link
Contributor

sevko commented Apr 24, 2015

I like the idea of an outputSchema parameter, and especially with some out-of-the-box aliases (like mobile and all).

@sevko
Copy link
Contributor

sevko commented Apr 28, 2015

Should we close this PR in favor of another one that implements outputSchema?

@hkrishna
Copy link
Contributor Author

Closing this issue in favor of #100

@hkrishna hkrishna closed this Apr 29, 2015
@hkrishna hkrishna added on-deck and removed on-deck labels Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

outputGenerator tweaks
4 participants