OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
19 stars 1 forks source link

Clarify how "Followed by" and "Wikipedia" work #756

Closed danrademacher closed 6 months ago

danrademacher commented 5 years ago

In the mock we have this: image

In the API result for https://www.openhistoricalmap.org/api/0.6/way/198099635 we have

<tag k="followed_by" v="Occidental Hotel"/>
<tag k="followed_by:source" v="wikipedia"/>

that works for simply rendering a string, but I assume the underline link in the mock implies that we link to that next item in OHM. So I think we need a followed_by_url or similar, which assumes a link to another OHM entity.

Is that what you have in mind there or might the link be offsite to Wikipedia or something else?

jeffreyameyer commented 5 years ago

Ahhh... the "preceded_by" and "followed_by" are concepts I've ripped off from Aaron Cope's Who's on First structures. More background here: https://millsfield.sfomuseum.org/blog/2018/08/28/whosonfirst/ and elsewhere.

Ideally, the followed_by and preceded_by would link first to another OHM location or entity, but in the absence of that, linking off the site could work, too. In that case, we should tag the external links with something like wikipedia, maybe just a little [image: image.png]

Would that work?

On Mon, Sep 30, 2019 at 12:59 PM Dan Rademacher notifications@github.com wrote:

Assigned OpenHistoricalMap/issues#756 https://github.com/OpenHistoricalMap/issues/issues/756 to @jeffreyameyer https://github.com/jeffreyameyer.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/OpenHistoricalMap/issues/issues/756?email_source=notifications&email_token=AALM4EU57RGCY2HT5E4DHQ3QMJLBZA5CNFSM4I376JIKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOT5VU6MA#event-2674609968, or mute the thread https://github.com/notifications/unsubscribe-auth/AALM4ERJ54PPIIOSFE3Z4E3QMJLBZANCNFSM4I376JIA .

-- Jeff Meyer 206-676-2347 osm: Open Historical Map (OHM) http://wiki.openstreetmap.org/wiki/Open_Historical_Map / my OSM user page http://www.openstreetmap.org/user/jeffmeyer t: @OpenHistMap

gregallensworth commented 5 years ago

As Dan points out, current followed_by data are merely text: the words "Occidental Hotel" or "Yesler Building / New York Mutual Life Building" Therefore, no hyperlink at all is possible since this is not a URL. If you had an idea for something which could be translated into an URL, that could work.

Some ideas off the cuff:

Similarly, is the Wikipedia link. The mockup in OpenHistoricalMap/issues#758 shows some lead-in text and a hyperlink, but of the two features I have seen which have a wikipedia set, one is a hyperlink (no lead-in text) and the other is a string that looks like maybe it was half of an URL? "en:Seattle_Hotel#The_Occidental_Hotel.2C_I_andII.281861-1889.29" and "http://en.wikipedia.org/wiki/Maine"

So again, we will be somewhat constrained by what data we really have: one is a simple URL which could easily be a link, the other will take some work to turn into an URL if this is a consistent format that we want to support, and neither has lead-in text as depicted in the mockup.

jeffreyameyer commented 5 years ago

Good idea for the URL - let's change the tag structure to followed_by:url:

For the Wikipedia stuff, there's a conflation of stuff I was doing before OSM had a good treatment of Wikipedia tags & the right way of doing it. : )

The former - e.g. the en:title_here - is the right way.

More info on the way we should encourage people to tag here: https://wiki.openstreetmap.org/wiki/Key:wikipedia

Info here on wikidata: https://wiki.openstreetmap.org/wiki/Wikidata

gregallensworth commented 5 years ago

Wikipedia URL formats Sounds good. Yesterday I implemented support for the "key" format, which expands out into a URL over at Wikipedia. As such, both of the two records I've tested which have Wikipedia links work: one being a complete typical URL, the other being a xx:PageName Wikipedia key. 👍

Still to figure out:

gregallensworth commented 5 years ago

Jeff comments at https://github.com/OpenHistoricalMap/issues/issues/758 that for the Wikipedia text lead-in, see about using the API to pull an extract or some such.

I dug about a bit and came up with this, which should be quite workable. Sadly, it searches by title and not a specific page ID/name, but for our needs we would only be using it if we had an exact URL anyway, so we should always get the first/best match.

https://en.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exsentences=2&exlimit=1&titles=Occidental_Hotel&explaintext=true&exintro=true

I have worked this in, having it fetch a 2-sentence extract and fill it in. The effect is pretty spiffy.

jeffreyameyer commented 5 years ago

That's very cool! (Sorry for the delay... thought I had responded. : ) )

What is the difference between a title and a page name?

danrademacher commented 5 years ago

To clarify this is the part we still need to resolve:

URL links for Followed By content

Should those be OHM urls or type+ID or something else?

jeffreyameyer commented 5 years ago

I think they could be pretty much any URL or text.

e.g. if there's an OHM object, then let's encourage that. If there's not, but in some description.

Would that be ok?

ghost commented 5 years ago

Okay but there aren't any permanent IDs right ? Seems like a problem. How about using relations instead

jeffreyameyer commented 5 years ago

That would be a great solution. When I said "OSM objects," I meant that to include relation IDs.

But, relations have the same ID instability issue, right? I'm thinking we'll need an upstream ID provider that other things point out sooner rather than later.

In the meantime, this is a stopgap.

On Wed, Oct 16, 2019 at 12:21 PM ferdinand0101 notifications@github.com wrote:

Okay but there aren't any permanent IDs right ? Seems like a problem. How about using relations instead

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenHistoricalMap/issues/issues/756?email_source=notifications&email_token=AALM4EX5ZAFKELO3PCC4IP3QO5STVA5CNFSM4I376JIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNUPXY#issuecomment-542853087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALM4EWJOEZVUUAVLHV2GQ3QO5STVANCNFSM4I376JIA .

-- Jeff Meyer 206-676-2347 osm: Open Historical Map (OHM) http://wiki.openstreetmap.org/wiki/Open_Historical_Map / my OSM user page http://www.openstreetmap.org/user/jeffmeyer t: @OpenHistMap

ghost commented 5 years ago

I don't think relations have id instability issues because the things they are referencing should update automatically So while the relation I'd might change its always gonna reference the same objects

1ec5 commented 6 months ago

This tag-based approach to linking OHM elements never caught on in the database and is essentially obsolete now that we have chronology relations and the start_event and end_event keys. OpenHistoricalMap/issues#748 tracks consulting chronology relations, and probably removing the unused support for followed_by.