This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to Get User Contribution Stats By Area

1

I'm interested of getting user contribution statistics for a particular region. For example, like it is done on http://osm.svimik.com/.

I looked through related questions, but all seems to be about contributions for particular user.

It looks like that using newer keyword for Overpass API should almost do the trick:

node
  (newer:"2017-10-24T07:00:00Z")     // adjust date as needed
  ({{bbox}})->.newnodes;

// Output
.newnodes out meta;

But how to tell the API to look for changes only for particular country? It is connected with area keyword, but it's not clear how to use it (the Overpass API is tricky). Also it is not clear, how to detect what was really done in resulting data:

 <node id="33191091" lat="54.6025991" lon="25.3133923" version="8" timestamp="2017-10-25T10:45:54Z" changeset="53232321" uid="60129" user="..."/>
  <node id="34224031" lat="54.6878381" lon="25.4908757" version="5" timestamp="2017-10-25T17:00:45Z" changeset="53240840" uid="60129" user="..."/>

It's only a list of nodes (and tags sometimes) and it's not clear if those nodes (tags, etc.) were just created, or edited, or moved.

On the whole, does anybody have a good example for something similar or a good explanation of how to use such queries. Also these queries are performance-consuming for the server, so probably I need to manage to run them locally somehow.

asked 25 Oct '17, 21:19

Sergey%20Karavay's gravatar image

Sergey Karavay
539182134
accept rate: 0%


One Answer:

2

An example of how to search in a given country: http://overpass-turbo.eu/s/sBo

To discover what was changed, you'll probably want to use Achavi or similar on individual changesets (for geometries at least).

answered 26 Oct '17, 00:52

Hjart's gravatar image

Hjart
3.0k42656
accept rate: 18%

edited 26 Oct '17, 01:00

Thanks! Seems to be a good direction to start.

(26 Oct '17, 16:41) Sergey Karavay

Source code available on GitHub .