iandees / wof-editor

A simple Who's on First editor.
https://writefield.nextzen.org/
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Add concordances to forms #13

Closed nvkelso closed 4 years ago

nvkelso commented 4 years ago

Add wof:concordances (but ignore wof:concordanes_alt for now).

EG:

wof:concordances":{ "gp:id":22659979, "qs_pg:id":531894},

@stepps00 can you provide list list of common concordances prefixes, please?

stepps00 commented 4 years ago

Here are some of the more common concordance properties and the name of the concordance:

{
    "gn:id": "GeoNames",
    "wk:page": "Wikipedia",
    "wd:id": "Wikidata",
    "gp:id": "GeoPlanet",
    "qs_pg:id": "Quattroshapes Point Gazetteer",
    "loc:id": "Library of Congress",
    "fips:code": "Federal Information Processing Standards (FIPS)",
    "hasc:id": "Statoids HASC",
    "qs:id": "Quattroshapes",
    "woe:id": "Where On Earth",
    "iso:id": "International Organization for Standardization"
}
iandees commented 4 years ago

One thing to note on this is that I don't see a way to determine if a value should be an integer or a string, so I'll likely end up converting some things to strings.

nvkelso commented 4 years ago

Agree they should default to strings... because even FIPS codes look like ints but are actually strings (leading 0).

iandees commented 4 years ago

I added initial support for concordances:

image

I didn't do the filtering thing that I do for alt names and labels yet, so it currently doesn't support adding new concordances and it's showing all the concordances at once on the page. This is a little unwieldy maybe.

nvkelso commented 4 years ago

I dig it. There aren't every very many of them (while names run on and on), so I'm fine with just listing them.

Can we add ability to add a new concordance to list and call it done?

nvkelso commented 4 years ago

Can we add one-off logic for the following concordance values to force them to be ints to prevent diff noise... the others can be assumed string:

        "gn:id": {
            "type": "integer"
        },
        "gp:id": {
            "type": "integer"
        },
        "qs:id": {
            "type": "integer"
        },
        "qs_pg:id": {
            "type": "integer"
        },

See also:

iandees commented 4 years ago

You can add new concordances and they are transformed into ints if on that list.

nvkelso commented 4 years ago

Working for me:

image