AmericanRedCross / osm-stats

Track and analyze contributions to Missing Maps
http://missingmaps.org
BSD 3-Clause "New" or "Revised" License
26 stars 9 forks source link

Moving hashtags to dedicated changeset tag #48

Open bhousel opened 7 years ago

bhousel commented 7 years ago

related: https://github.com/openstreetmap/iD/issues/2834

Because some OSM users don't like the use of hashtags in comments, I'm planning to add another field to iD just for the hashtags. This new field will appear below the comment box, and (like the comment) will be settable via the url api. Hashtags will be saved with a new changeset tag like hashtag=#thing1;#thing2;#thing3

I think there might be a service to fetch "registered" mapathon hashtags? If so, please let me know and I'd be happy to connect iD to this service to allow users to either pick hashtags from a list, or type their own.

For a while, I'll continue to support hashtags in both the comments and this new field, so there will be time to switch over any tools like osm-stats or osm task manager. There's no rush!

dalekunce commented 7 years ago

@bhousel thanks for the heads up. The hashtags are pre-populated in iD/JOSM from the Tasking Manager 95% of the time. This would require an update to the Tasking Manager and OSM Stats.

One thing to keep in mind is that moving the hashtags to a special tag should be done in conjunction with the other editors, especially JOSM. This will prevent us from having to search in multiple places for them on the edits.

I'm ok with this change by it will require some work on our end that we didn't have in the pipeline and don't have funding for either on the tasking manager or osm-stats.

cc @kamicut @mojodna @bgirardot @smit1678

bhousel commented 7 years ago

Just wanted to followup on this - I added a hashtags field to iD.

Any hashtags detected in the comment will be automatically extracted into this new field - so there is no rush to switch over the task manager code to use it. But it can eventually allow apps like osm-stats more flexibility to perform changeset analysis, and it frees up the comment field for users to add more meaningful comments.

related issues: https://github.com/hotosm/osm-tasking-manager2/issues/703 https://github.com/openstreetmap/iD/issues/2834 https://github.com/openstreetmap/iD/pull/4223#issuecomment-322665452 https://github.com/AmericanRedCross/osm-stats/issues/48

hashtags

mojodna commented 5 years ago

osm-stats-workers (and OSMesa, for data backfills) still use the comment field for a few reasons:

  1. this is iD-only and we need to track hashtags from JOSM (etc.) edits
  2. we can control the regular expression to identify / extract tags (we've made multiple iterations to it and likely no longer match iD's; the current versions are #([^\u2000-\u206F\u2E00-\u2E7F\s\\'!"#$%()*,.\/;<=>?@\[\]^{|}~]+) (OSMesa) and (#[^\u2000-\u206F\u2E00-\u2E7F\s\\'!"#$%()*,./:;<=>?@[\]^{|}~]+)` (osm-stats-workers))
  3. data backfills run against changeset data that predates the addition of the hashtags field (or pre-dates adjustment of the regular expression to match our expectations)
mojodna commented 5 years ago

@bhousel if you do decide to exclude hashtags from the comment field, please update this issue; we'll need to update our end to read both changesets and comment for hashtags (for the ^^ reasons)

1ec5 commented 1 year ago

OSM Stats is possibly the root cause of the proliferation of hashtags in comments that causes mappers to get yelled at all the time. There’s even a proposal to automatically revert people’s changes if they only provide hashtags without anything more human-readable. OSM Stats may not be responsible for the lack of these human-readable explanations, but editors would automatically nudge mappers to provide them if the hashtags aren’t there.

It looks like this task entails simplifying the following code to read the hashtag tag instead of the comment tag and parse it as a comma-delimited list instead of trying to sniff out #hashtag syntax in freeform text:

https://github.com/AmericanRedCross/osm-stats-workers/blob/de6219edaf5b0ba80b0b71588ff4aace23d92364/src/stats.js#L213-L217

Since the osm-stats system is already storing the hashtags in a more structured field, there’s probably no need to consider backwards compatibility: you can just cut over, and the stats will continue to reflect older changesets from before the cutover.