User:Arjunaraoc/Adding Telugu place names to mandal admin centres
Last update date: 22 November 2019
Adding Telugu place names to mandal admin centres need to be done by the following steps
0.use osm-wikidata website to match as many places as possible
0.1 Add wikidata to admin_centres not having wikidata
Match based on the fist five characters to get qid. For match failures, investigate and add wikidata manually
0.2 Get map data of all mandals admin_centres without wikidata
- Query to get map data Select Export and download to JOSM
Download the data as districtwdup.osm file
Use osmcsvappender to append wikidata tags. $python osmcsvappender.pyc --cmdln "districtwdup.osm" "districtwd.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['place','*']]" "['node']" "['name:te']" "osmfullid" "True" This generates a new .osm file of name districtwdup_osmcsvappender_<run-number>.osm
Upload the result using josm.
1) Extract mandals with admin_centres not having name:te values
If you see only node number and no name, investigate in open streetmap as the node may be part of a way. Separate the node from the ways.
If you do not see Wikidata IDs for any node, add them after getting the same from wikidata.
Rerun the query after edits.
Export the data into a spreadsheet with sheetname osm
2) Extract places and their wikidata, osmlinks
- Query to get all places with wikidata, osmlinks (Change district and add the first line
PREFIX osmt: <https://wiki.openstreetmap.org/wiki/Key:>
if required before running.
Sort on osmlinks to see mostly mandal_centres.
If the wikidata itemLabel of admin centres as additional information in parenthesis, edit in wikidata to remove them and update the description as required. We use the Label for Telugu to update 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 name:te data
- In sheet name osd, populate osmfullid field as concatenaton of "n" and osmid
- In sheet name osd, populate name:te field as VLOOKUP of qid in sheet wd.
- If there are #N/A in the result investigate in Wikidata, Telugu Wikipedia, Openstreetmap to make necessary changes.
Sometimes,the wikidata used for a node might have been redirected to another, hence there won't be match. Update the wikidataid in openSteetmap.
There may be two different QIDs for same admin_centre. You need to merge them and update the final QID in OSM.
After update in openstreetmap, wait for 15 minutes (needed for sophox.org service sync), to get corrected data. 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-name-te.csv
When there are no matches(possibly from wrongly tagged wikidata in OSM, multiple entries in wikidata which need to be merged etc, no wikidata entry), investigate and update wikidata, name:te manually, suitably editing wikidata, openstreetmap as required.
4) Get map data of all mandals admin_centres without name:te
- 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-name-te.csv" "/home/arjun/Desktop/osmcsvappender/" "," '"' "[['place','*']]" "['node']" "['name:te']" "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 name:te to admin_centres #osmcsvappender" souce as "wikidata"
7. Check the update
- overpass query for all admin_centres after one minute of update. You will see mandal centres which could be less when a place is admin_centre for more than one mandal.
- WD query for mandal name, and hq in telugu after 15 minutes.
Time estimate
Can take about 5 minutes for a node based on initial work