-
Notifications
You must be signed in to change notification settings - Fork 12
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
Canonical sort order in the compare view #301
Comments
Now that we have descriptions of the data tables inside Django models, we can probably add a field which describes the sort order. eg. "strip all non-numbers and sort numerically" vs alphabetical. |
don't you think that a canonical order would be a less hacky solution, i.e.
we can add ordering to the model?
…On Wed, Oct 3, 2018 at 9:34 AM Greg Kempe ***@***.***> wrote:
Now that we have descriptions of the data tables inside Django models, we
can probably add a field which describes the sort order. eg. "strip all
non-numbers and sort numerically" vs alphabetical.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#301 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZrslWzqlwPXQqpmT0GYWa5913Jo9c8ks5uhGh4gaJpZM4XENgx>
.
--
Adi Eyal
Director
OpenUp
Promoting informed decision-making
phone: +27 78 014 2469
skype: adieyalcas
linkedin: http://za.linkedin.com/pub/dir/Adi/Eyal
web: http://www.openup.org.za
twitter: @soapsudtycoon
Follow us on twitter at @OpenUpSA
Sign up for Naked Data, our weekly round-up of what's happening
locally and internationally in data journalism and data visualisation.
Register here: https://openup.org.za/nakeddata.html
Also check out our data storytelling short courses:
https://openup.org.za/trainup/ <https://openup.org.za/courses.html>
|
Maybe I'm misunderstanding what you mean by canonical ordering. Assuming you mean "any ordering, as long as we have one and its consistently used", I think we need to be a bit smarter, in particular with labels that have numbers. Here's what an alphabetical ordering of this sort of dataset looks like:
I don't think it's useful to the user, it looks arbitrary. We're also at the mercy of the original source's categories -- so if they have inconsistent spacing, we'll get inconsistent results. I suggest that for each model we default to an alphabetical ordering, with an option of switching to a numerical ordering (which we can use on this dataset). Here's an example of what that could result in:
If we add any sort of server-side ordering, we'll need to adjust the API to allow the client to benefit from it (eg. by including an Currently there is no explicit ordering at all. |
https://wazimap.co.za/data/distribution/?table=ANNUALHOUSEHOLDINCOME_GENDEROFHOUSEHOLDHEAD&primary_geo_id=ward-79900061&geo_ids=ward|municipality-TSH&release=2011
Currently the values for a particular indicator are sorted by alphabetical value - this is annoying if the number is numeric, e.g. household income. There should be a canonical sort order for every indicator
The text was updated successfully, but these errors were encountered: