User:Arjunaraoc/Adding Telugu names to Sub Districts
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
- Wikidata Query(modify district name) Query to get all places with wikidata, osmlinks(if available) (Change district and add the first line
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
- In sheet name osd, populate osmfullid field as concatenaton of "r" and osmid
- 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.
- If there are #N/A in the result investigate in Wikidata, Openstreetmap to make necessary changes.
- 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
- Query to get map data Select Export and download to JOSM
- In JOSM save the data as district.osm file
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
- Query to get proposed Telugu names under field name_te (We use tewikipage label info and select the text before "_మండలం" as the proposed telugu name)
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
- Query to get map data Select Export and download to JOSM
- In JOSM save the data as district.osm file
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"