Talk:Key:ref:US:MA:SARIS

From OpenStreetMap Wiki
Jump to navigation Jump to search

Python code for sorting Level0 output

My process for populating these involves exporting an Overpass query of all the un-identified waterways starting with a given letter to Level0, then sorting the output by name, and manually typing in the matching (unique) codes, then pasting the result back into Level0 and saving it. This is the Python one-liner I use to do the sorting:

open('/home/jesse/foo4_sorted', 'w').write('\n\n'.join(sorted(open("/home/jesse/foo4").read().split('\n\n'), key=lambda x:re.findall("name = .*\n", x))))

Mainly putting this here for my own reference, but it might be helpful to others, too. JesseFW (talk) 18:01, 26 November 2021 (UTC)

Progress

I've gone thru all the codes in the Hoosic River basin (11), and either added them, or added notes with the code noting that they are still needed. I plan to just keep working my way thru the document. JesseFW (talk) 22:59, 26 August 2024 (UTC)

Now got river basins 12 and 13 done. (They are very small, and nearly fully done already). JesseFW (talk) 23:32, 26 August 2024 (UTC)

Slowly working thru the MANY streams in the Housatonic basin. Currently just before 21 03950. JesseFW (talk) 00:24, 7 September 2024 (UTC)