Jump to content
TNG Community
Paul Barrett

Structured Address Entry

Recommended Posts

Paul Barrett

Calling all Mod writers - an appeal for help. ūüôā

Nicholas Noel Higton started a discussion on the TNG Facebook page about issues related to entering addresses, the outcome of which was the identification of a possible Mod.

Is there a Mod writer out there who might be prepared to take it on?

The problem is that with the address fields being unstructured free text, it's easy for people to create near duplicate addresses (because, for example one person writes "Oxfordshire" in full while another abbreviates it to "Oxon") and it's also frustrating to have to keep writing out segments of an address in full that have have been entered previously.  I spend a disproportionate amount of my time, reviewing and correcting errors in the places database.

Basically the idea is:

  • When someone click into an address field,¬† a pop up box appears in which the address is entered in a structured format with separate fields for each segment of the address.¬†
  • Each field will have a filtered search capability so that previously entered data can be reused.¬†
  • There would be some validation rules.¬† For example. as a minimum the country field is required; and if street and town are populated, county / state / province and country must be.
  • When the address is saved the four segments are concatenated together with comma and space separators, and the string is written to the address field
  • The location level is deduced from the address fields i.e. If the Town is the most detailed part of the address then the location level is set to "3"
  • Optionally, the user is then taken to the place record to geolocate it if no geolocation value is present on the record

Obviously there's a lot more design work to do but for now, the real question is "Is anyone up for it please?"

Share this post


Link to post
Share on other sites
Newfloridian

Nice idea -in theory. But I believe strewn with insurmountable obstacles and inconsistencies. Take just this one example which I have battled with since I first started my site a decade and a half ago. In the UK, how do you standardise county names? Leave alone using the three letter codes what historical name do you use? Our family has been interred for generations in a now closed cemetery in Westoe. Initially this was in County Durham; then variously South Tyneside or Tyne and Wear. Looking at historical records it could imagine that the occupants have literally changed their addresses over the centuries. Then, once you have personally settled on a solution for yourself, how do you enforce it for anyone else providing you with data.

Much as I hate to admit it, I think this is one area where a mod will be unable to help and entering addresses will remain under the control of a single hand.

Alan 

Share this post


Link to post
Share on other sites
Paul Barrett

Hi Alan

You raise a good point but one that, IMHO, needs to be separated out from the others.

The one thing that my users are good at is enforcing the rule that you use the address that is contemporary with the event.  For example, many of our rellies come from villages that were in Berkshire until the 1974 boundary changes.  So all records prior to 1974 use Berkshire as the county and all records since use Oxfordshire.  Geolocation usually works well because Google maps tends to home in on the town.  But occasionally it needs a nudge in the right direction.

The reason they are good at enforcing that rule is that they are taking the addresses from contemporary documents that use the historical name.  It is therefore easy for them to comply.

Setting that issue aside, my places database gets strewn with:

  • Near identical entries (the Oxfordshire / Oxon example above)
  • Misplaced comma/space separators (Uxbridge,Middlesex versus Uxbridge, Middlesex, or even¬†Uxbridge ,Middlesex) - it is SO easy for a mistype to cause a duplicate.
  • Missing Country
  • Incorrect Location Levels
  • Missing geolocations

The proposed mod would solve all those.  I agree it won't solve the counties issue but I think it would be wrong to say that because we can't fix that problem we can't fix the others.

Share this post


Link to post
Share on other sites
theKiwi

I think for a Mod in the manner you propose, to solve all those problems, would make it impractical to use for most people.

I don't actually do any data entry in TNG - I do it all in Reunion, and one of its features is to allow "type ahead" - just like Google does - so if I start typing

Kaia

Reunion prompts with a pop up of all the places that start with that string, and narrows the list as I continue typing (just like Google does), and allows me to select one - e.g. 

Kaiapoi, Canterbury, New Zealand 

Maybe if TNG could do that it might help, but the problem still remains that as soon as someone types in a "wrong" entry, then that wrong entry will get offered up to the next user to use too.

And I'm not sure how you can enforce the use of a Country field by software - some places can be adequately described with 2 commas as I used above, others might need 3, or even 4 commas, so you can't say the country has to come in the 4th position as there are places that don't need 4 entities, and places that might need 5 entities.

Perhaps ultimately if you want total control over this, you have to do all the data entry yourself?

Roger

Share this post


Link to post
Share on other sites
Paul Barrett

Yes, if you want a job done properly, do it yourself !! :-D

Type ahead is one of the problems, because people use the hints from their browser, and end up recreating a wrong entry that I already corrected, so then I have to correct it again.

One of the features I would like to see is that the address fields in the pop up window would disable browser prompts, just like username and password fields do in some apps.

But if the database has been corrected and only the correct versions are shown in the filtered lists then recreating a previous error should not occur.

We do all our data entry in TNG because we are several and are dispersed.  This issue drives me nuts.  I don't have the competence to write the mod though. 

It just strikes me as odd that in an app that is all about data, there is no data validation on critical fields.  Dates is another of my betes noire.A simple mistake such as entering a data as 1 May1974 instead of 1 May 1974 makes a helluva difference to the way entries are sorted

Share this post


Link to post
Share on other sites
Paul Barrett

And of course, if this was handled as a mod and not within the core, then people who are happy with the current address entry method would not be affected, and OCD-affected people like me could have it their way.

Share this post


Link to post
Share on other sites
Chris Lloyd

There is already a find icon when adding a place, address etc that mostly brings up previously entered details.

Share this post


Link to post
Share on other sites
Paul Barrett
7 hours ago, Chris Lloyd said:

There is already a find icon when adding a place, address etc that mostly brings up previously entered details.

Yep, and I am trying to educate users to search first, but since the address field comes before the search icon there is a natural tendency to start there.  Old habits die hard.

I'm also investigating a browser plugin that will disable autofill for certain pages

Share this post


Link to post
Share on other sites
XerxX
14 minutes ago, Paul Barrett said:

search first, but since the address field comes before the search icon there is a natural tendency to start there. 

Hi Paul,

I think it's actually the way it's intended:

First write a part of the address (the city name f.ex) and then click the searchicon and so receive all addresses in that (city f.ex) that's already registered.

 

At my site there are (kind-of) clear rules how to write a place: Like an address at an envelope (do you remember "envelopes" - snail-mail ;) )

Basically the order is: "House name, Address, Village, City (Parish), County (Swedish län)". If not in Sweden, end with country-name.

When my two editors accepted and now follow these rules, the TNG placesearch (I call "List places") replies were a lot clearer.

And I wrote this Searchform (I call "Fins Places" - not available for guests) that allows for searches using the parts:

findplace.gif

 

I attach the PHP script if someone is interested in it.

 

Best regards,

Erik

 

xerxxSokplats.php.zip

 

Share this post


Link to post
Share on other sites
Paul Barrett
On 11/15/2018 at 9:43 AM, XerxX said:

Hi Paul,

I think it's actually the way it's intended:

First write a part of the address (the city name f.ex) and then click the searchicon and so receive all addresses in that (city f.ex) that's already registered.

I think the autofill entries from the browser are causing confusion.  I have found a Chrome extension that allows you to disable them for all pages of TNG.  I have suggested that my editors use that, so that we cam eliminate one problem.  Then we can see how well they get on

Quote

At my site there are (kind-of) clear rules how to write a place: Like an address at an envelope (do you remember "envelopes" - snail-mail ;) )

Basically the order is: "House name, Address, Village, City (Parish), County (Swedish län)". If not in Sweden, end with country-name.

When my two editors accepted and now follow these rules, the TNG placesearch (I call "List places") replies were a lot clearer.

If non adherence to the my rules (which are essentially the same as yours) was the sole problem i could live with it.  I routinely check all places added since <date> and tweak those that aren't compliant

Quote

And I wrote this Searchform (I call "Fins Places" - not available for guests) that allows for searches using the parts:

I attach the PHP script if someone is interested in it.

Nice.  I might look at using that.  How do you enable it?

I think that all of this shows that there is a problem with ensuring data quality.  I really appreciate all the suggestions people have made.  But I also think that there is still a case for some kind of guided data entry.  Prevention not cure.  If users have to think about how they should use the functionality they are more likely to make a mistake.  "Don't make the users think" is a fundamental principle of UX design.

Share this post


Link to post
Share on other sites
XerxX

Hi Paul,

I think you should be able to simply put it INTO A FOLDER w/i TNG and open it in your browser:

www.yoursite.com/theFolder/xerxxSokplats.php

It's more or less self-contained. There will of course be things to consider: The $text[' ']s for example.

Also: The search uses the place-levels for the places to sort them. You can go here: https://xerxx.se/getperson.php?personID=I36&amp;tree=tredNr2

Turn on English (flag top left) and then open the map. The pin-legend will show you my levels 1 - 10 plus un-defined (0) in English.

Check for this in the code: $admtext['level1']

That's Swedish texts for the levels. I'm not sure why they are there... Long time ago and my American users know Swedish and haven't complained. Yet ;)

 

If a Placename starts with an Address, it's at level 1.

If a Placename starts with a City, it's at level 3. Etc.

 

Also look for this switch: switch ($lanLand) {

It's both the different parts of Sweden and Countries.

 

The page has never been intended to be a mod so it's coded in "Swedish" (variablenames, functionnames...) - sorry for that. But it's way too much for me to "translate".

You should be safe, though, deleting all remarks. I see there are some; both "plain" remarks and remarked changes. Getting rid of those may make the code a bit more clear.

 

Good luck!

Erik

Share this post


Link to post
Share on other sites
Paul Barrett

Thanks Eric.  I will take a look

Share this post


Link to post
Share on other sites
XerxX

Paul, I see that I forgot to say things about the SWITCH above that names the parts of Sweden and Countries:

 

They are the LAST part of the name.

"Sweden" is never the last part in a Swedish name.

A country name is always the last part of a foreign name.

A search text is never used for the last part: It's selected in the dropdown.

For example if you enter "Germany" and search for it, it will not be found even if it's also selected in the dropdown.

To find all German places you can use the wild-card *

Add this to the above :)

/Erik

Share this post


Link to post
Share on other sites
Paul Barrett
On 11/15/2018 at 9:43 AM, XerxX said:

 

findplace.gif

Erik

Is there a language text file to go with this please.  I was looking to tweak some of the strings in this screen shot e.g. "Anywhere in any name-part"

Regards

Share this post


Link to post
Share on other sites
XerxX

Sure :oops:
 

// Texter till xerxxSokplats.php

if ($textpart == "xerxxSokplats") {

$text['hittaPalfa'] = "alphabetically";
$text['hittaPas'] = "All Sorts of places";
$text['hittaPbos'] = "Villages / Areas / Districts";
$text['hittaPbosPga'] = "Villages / Areas / Districts + H/A";
$text['hittaPed'] = "Un-defined places";
$text['hittaPefasp'] = "Not for "All Sorts of places"";
$text['hittaPeftPlats'] = "by place (Addr, Village, Town... <span class='small'>Only "All Sorts..."</span>)";
$text['hittaPeller'] = "or";
$text['hittaPepf'] = "Not <b>+</b>query";
$text['hittaPf'] = "Church communities";
$text['hittaPga'] = "Houses / Addresses";
$text['hittaPhittaPlatser'] = "Find Places";
$text['hittaPi'] = "in";
$text['hittaPiSverige'] = "in Sweden";
$text['hittaPkb'] = "Cemeteries";
$text['hittaPmex'] = "but exclude";
$text['hittaPos'] = "Cities / Towns";
$text['hittaPosPbosPga'] = "Cities / Towns + V/A/D + H/A";
$text['hittaPplatsenFinns'] = "The place is located";
$text['hittaPll'] = "County / Country";
$text['hittaPsbann'] = "as the <b>S</b>tart of any name-part";
$text['hittaPsehn'] = "as a <b>C</b>omplete name-part";
$text['hittaPsm'] = "Search using";
$text['hittaPsn'] = "last name-part";
$text['hittaPsoe'] = "as above, <b>or</b>";
$text['hittaPsok'] = "Search";
$text['hittaPsokBland'] = "Search in";
$text['hittaPsortRes'] = "<b>Sort</b> the result";
$text['hittaPssann'] = "as the <b>E</b>nd of any name-part";
$text['hittaPsut'] = "Search Without Text";
$text['hittaPutanfor'] = "outside";
$text['hittaPutomlands'] = "abroad";
$text['hittaPvshinn'] = "<b>A</b>nywhere in any name-part";
$text['hittaPvshinn2'] = "anywhere in any name-part";

$text['hittaPlandlista'] = "Select Country";
$text['hittaPlanlista'] = "Select County";

}

 

/Erik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×