NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

What is the number of users, nodes, ways and relations in OSM till November 2017 for India region?

asked 07 Nov '17, 05:05

jasmeet_kaur's gravatar image

jasmeet_kaur
26557
accept rate: 0%


Nodes, ways, and relations are relatively easy to count, you can simply use the India file from here http://download.geofabrik.de/asia/india.html and count the elements. Either use a sophisticated, osmium-based statistics program or simply

bzcat india-latest.osm.bz2 |
grep -E "<(node|way|relation)" |
cut -d\  -f1 | sort | uniq -c

Users are more difficult to count because the current data file does not list all users who are in India or whose centre of activity is India - it lists all users who are the last person to have edited an object in India, which likely includes tons of "drive-by mappers" and bots, and excludes those whose contributions have meanwhile been modified by others. Hence you will want to look at the history file for India for a more thorough analysis. It also depends on whether you only want to count active users or all users, and what your definition of an active user is!

Here are some ready-made pages with information about India:

permanent link

answered 07 Nov '17, 07:40

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Unfortunately the Mapbox site doesn't have new data after 2016.

(21 Jan '21, 10:13) Richlv

Since the above was written, a new command-line tool has made OSM data wrangling a bit easier for non-programmers. The osmium command-line program can convert an OSM PBF data file into an ASCII data format called "OPL" (short for object-per-line, meaning it has one line per OSM object). Once converted into this OPL format, standard command line tools can be used to process the data. For example, for a top-20 list of all users editing India, get the India history file from https://osm-internal.download.geofabrik.de/asia/india-internal.osh.pbf and then (all on one line):

osmium cat india-internal.osh.pbf -fopl | 
   cut -d\  -f7 | cut -c2- | sort | uniq -c |
   sort -rn | head -20

Insert "grep" commands at liberty to count just edits in certain years, and so on.

If you are comfortable with Python or C++, you can also use the pyosmium bindings to read the original .osm.pbf with Python, or libosmium to do so in C++.

permanent link

answered 21 Jan '21, 10:39

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×5

question asked: 07 Nov '17, 05:05

question was seen: 3,881 times

last updated: 21 Jan '21, 10:39

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum