User:Arjunaraoc/Adding Telugu names to Sub Districts

From OpenStreetMap Wiki
Jump to navigation Jump to search

Adding Telugu place names to Sub Districts need to be done by the following steps. This makes use of Wikidata IDs to match data in Wikidata with OSM

1) Extract Sub Districts mandals

If you do not see WikidataID, add wikidata ID by getting the data from [https://w.wiki/BTc Wikidata Query(modify district name)

Rerun the query after edits.

Export the data into a spreadsheet with sheetname osm

2) Extract mandal names in Telugu

PREFIX osmt: <https://wiki.openstreetmap.org/wiki/Key:>

if required before running.

If the wikidata labels contain additional disambiguation informaton, remove them and update that info in description field. we use the Telugu label for populating name:te in OSM

After any changes, obtain the osm, wd ids again from queries.

Export the data into a spreadsheet with sheetname wd

3) Create the required Wikidata ID csv file for update

  1. In sheet name osd, populate osmfullid field as concatenaton of "r" and osmid
  2. In sheet name osd, populate wikidata field as VLOOKUP of first five characters of name, with the first five characters of the English label field of wikidata in sheet wd. As wikidata itemLabels have suffixes like 'mandal', we restrict the match to the first five character subset of names.
  1. If there are #N/A in the result investigate in Wikidata, Openstreetmap to make necessary changes.
  2. Sort the data label wise, and see if the wikidata's are duplicated, if the first five characters are same. Correct as required.

If it is overpass turbo, wait for a minute or so to get corrected data.

Select the columns osmfullid and name:te and paste in a new spreadsheet. Export the spreadsheet as district-wd.csv


4) Get map data of all mandals


5) Run osmcsvappender as follows python osmcsvappender.pyc --cmdln "district.osm" "district-wd.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['admin_level','6']]" "['relation']" "['wikidata']" "osmfullid" "True"

This generates a new .osm file of name district_osmcsvappender_<run-number>.osm


6. Update the changed data into OSM

Open the district_osmcsvappender_<run-number>.osm in JOSM.

Verify some sample changes. If found to be fine, upload the data with comment "added wikidata to Sub districts #osmcsvappender" source as "wikidata"

7. Check the update

Click on the history of OSM edits by visiting http://openstreetmap.org

8. Update Sub Districts with Telugu Names

get the data

If the Tewiki pages have disambiguation information before "_మండలం", move those pages to a proper name where disambiguation information follows it.

Download the data and update the column header text as name:te (from name_te) and save as district-te-name.csv

get the map data

Then run the osmcsvappender as follows python osmcsvappender.pyc --cmdln "district.osm" "district-te-name.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['admin_level','6']]" "['relation']" "['name:te']" "osmfullid" "True" Open the district_osmcsvappender_<run-number>.osm in JOSM.

Verify some sample changes. If found to be fine, upload the data with comment "added name:te to Sub districts #osmcsvappender" source as "wikidata"


Example Result