How to show all users with the last edit in area in the last n days?

I think this might be interesting if someone is trying to organize a regulars’ table or something and know they are not active in the forum or on the chat. A ready tool would be appreciated, otherwise it seems i have to look at overpass :smiley:

So, i found How to get "all users that made edits on a bbox" in overpass? - Geographic Information Systems Stack Exchange

[out:csv(::user)];
(node({{bbox}});
 way({{bbox}}););
out meta;

this one and it results in a list of the last user that edited a object for every object in that bbox. Pretty long list :smiley: So, i can work with that, but i would need the following

  • Group together each identical value, like “negreheb” is there 20 times, it should show up just once
  • Set a timefrage, for example “last N days” but a simple “<[DATE]” would work as well :slight_smile:

I tried adding the timestamp() but it seems that was wrong as it does nothing :confused: (found that one https://dev.overpass-api.de/overpass-doc/en/criteria/misc_criteria.html there)

[out:csv(::user)];
	(node({{bbox}})(if:timestamp()<"2023-01-01");
 	way({{bbox}})(if:timestamp()<"2023-01-01"););
out meta;

I hope someone can help me or give me further information so i can solve this :slight_smile:

4 Likes

I suggest this

[out:csv(user,wayCount,nodeCount,relCount;true;";")];
nwr({{bbox}})(if:timestamp()<"2023-01-01");
for ->.myset (user()){
  make stat user=myset.val,
  			wayCount=myset.count(ways),
  			nodeCount=myset.count(nodes),
  			relCount=myset.count(relations);
  out;
}

In short:

  • with nwr statement you catch in one shot all the OSM object types.
  • for cycle allows to split by a tag value, username in this case
3 Likes

You can also replace the
(if:timestamp()<"2023-01-01")
with
(newer:"{{date:1year}}")
for example.

3 Likes

Interestingly enough i get just 329 results with that variant while i get 932 with the timestamp :smiley:

1 Like

That’s because of the “<” in ’ (if:timestamp()<"2023-01-01")'.
If you want to find edits that are newer than 2023-01-01, you should use “>”.

2 Likes

wouldn’t you actually want all users who made edits in a certain area and timeframe rather than only those that are the last modifier of the objects?

You can also get this information through OSMCha, just create a filter based on location and date. You can even save it and get an RSS feed so you can see new changes in the area. Then you could exclude the regulars you know about so you just get notified about new users making changes.

2 Likes

@dieterdreist

Yeah, would be nice, but as far as i understood it, its basically the easiest or only possible way to get the last edited one.

@Graptemys
That works if i want to find new editors but it does not seem to be possible to collect various edits from one user in one neat line like the overpass-code above does. So, not the exact thing i’m looking for, but thanks for the suggestion :slight_smile:

Yeah, would be nice, but as far as i understood it, its basically the easiest or only possible way to get the last edited one.

I don’t know how to do it with overpass API (or if it is possible), but eventually it is possible, another way would be by filtering the full history planet by bbox and timeframe and extract the usernames from there

If they default set (_.) is used, a user variable isn’t required. Saves a bit of typing & makes it clearer.

[out:csv(user,wayCount,nodeCount,relCount;true;";")];
nwr({{bbox}})(if:timestamp()<"2023-01-01");
for (user()){
  make stat user=_.val,
  			wayCount=count(ways),
  			nodeCount=count(nodes),
  			relCount=count(relations);
  out;
}