Most of the whosonfirst scripts are written in either Python or Go. As I knew a little Python and no Go whatsoever, Python it was. With some trial and a lot of error I was able to write a script that dumped out all of the properties in all of the whosonfirst-data repo together with their corresponding data types. I was then able to compare this against the list of what data types the properties should be according to the definitions in the whosonfirst-properties repo, which helpfully has one JSON definition per property.
Independent news email
In most cases the whosonfirst-properties definitions agreed with the data types in the WOF documents. I could then write another script to fix these inconsistencies. Now to validate that everything was consistent. Tim Bray has this helpful advice …. Most obvious: There are multiple pieces of software out there that claim to implement JSON Schema, and their behavior is really inconsistent, in my experience. Now to actually validate it and the WOF data itself.
But by using an iterative process of checking the WOF documents, taking the validation failures, re-editing the WOF documents and the schema and checking everything against the applicable property definitions I finally had a version of whosonfirst-data that validated cleanly and consistently. To paraphrase Douglas Adams …. Bigger than the biggest thing ever and then some. But more about the properties object in a moment. The second suboptimal thing was that the validation script is slow. Despite being written in asynchronous Node due to ajv being a Node library , the iteration over each candidate WOF document is sequential.
The third and final less than ideal thing is that I had ended up with two distinct and functionally identical sources of truth of what should be in a WOF document. This had to change.
But there was also another source of truth for what should live in the properties object, defined on a per-property basis in the whosonfirst-properties repo. I could have left this as is for the time being but something that Aaron wrote in a recent post struck me …. Long reads.
Lib Dems. US Politics. Theresa May. Jeremy Corbyn. Robert Fisk. Mark Steel. Janet Street-Porter. John Rentoul. Chuka Ummuna.
Shappi Khorsandi. Gina Miller.
- Spirits of the Season (Saranormal).
- Professionalization, Leadership and Management in the Early Years (Critical Issues in the Early Years)!
- Lee Van Cleef: A Biographical, Film and Television Reference.
- Recht als soziales Phänomen (German Edition).
- TOAD IN TOWN-Moving and Changing, New Experiences Childrens Picture Book (Life Skills Childrens eBooks Fully Illustrated Version 16).
Our view. Sign the petition. Spread the word. Steve Coogan. Rugby union. Motor racing. US sports. Rugby League. Geoffrey Macnab. Tech news. Tech culture. News videos. Explainer videos.
Who’s Who of Career Step Students: High School Seniors - Career Step Blog
Sport videos. Money transfers. Health insurance. Money Deals. The Independent Books. Voucher Codes. Minds Articles. Subscription offers. Subscription sign in. Read latest edition.
UK Edition. US Edition. Log in using your social network account. Please enter a valid password.
RESET YOUR PASSWORD
Keep me logged in. Try Independent Minds free for 1 month See the options. You can form your own view. Subscribe now. Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. I would like to receive morning headlines Monday - Friday plus breaking news alerts by email.
Update newsletter preferences. Comments Share your thoughts and debate the big issues. Join the discussion. Please be respectful when making a comment and adhere to our Community Guidelines.