{"id":275,"date":"2018-03-30T16:18:36","date_gmt":"2018-03-30T16:18:36","guid":{"rendered":"https:\/\/blog.get-map.org\/?p=275"},"modified":"2018-03-30T16:18:36","modified_gmt":"2018-03-30T16:18:36","slug":"natural-sorting","status":"publish","type":"post","link":"https:\/\/blog.get-map.org\/index.php\/2018\/03\/30\/natural-sorting\/","title":{"rendered":"Natural sorting"},"content":{"rendered":"<p><a name=\"preamble\"><\/a> <\/p>\n<p>So far street names that start or end in a number were sorted in simple textual order, e.g. 1-10-11-&#8230;-19-2-20-21-&#8230;<\/p>\n<p>Now, with the help of the Python &#8220;natsort&#8221; package, these will be listed in &#8220;natural&#8221; order, like 1-2-&#8230;-10-11-&#8230;-19-20-21-&#8230;<\/p>\n<p>At first this only worked for ASCII \/ Latin numbers, but with two little fixes to the &#8220;natsort&#8221; package it should now work for all numeric unicode characters (tested with Persian\/Farsi so far).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far street names that start or end in a number were sorted in simple textual order, e.g. 1-10-11-&#8230;-19-2-20-21-&#8230; Now, with the help of the Python &#8220;natsort&#8221; package, these will be listed in &#8220;natural&#8221; order, like 1-2-&#8230;-10-11-&#8230;-19-20-21-&#8230; At first this only worked for ASCII \/ Latin numbers, but with two little fixes to the &#8220;natsort&#8221; &hellip; <a href=\"https:\/\/blog.get-map.org\/index.php\/2018\/03\/30\/natural-sorting\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Natural sorting&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/275"}],"collection":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":1,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/posts\/275\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.get-map.org\/index.php\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}