Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement /contributions/latest/count #174

Closed
FabiKo117 opened this issue Apr 12, 2021 · 5 comments · Fixed by #198
Closed

implement /contributions/latest/count #174

FabiKo117 opened this issue Apr 12, 2021 · 5 comments · Fixed by #198
Assignees
Labels
comments welcome Indicates that the creator of this issue/PR is open for early review comments enhancement New feature or request
Milestone

Comments

@FabiKo117
Copy link
Contributor

Use Case Description

OQT would use this endpoint for the computation of the lastEdit indicator.

Request Description

Enlarges the /contributions data-aggregation endpoint as an addition to the already existing /contributions/latest/{geometry-type} data-extraction endpoint.

@FabiKo117 FabiKo117 added the enhancement New feature or request label Apr 12, 2021
@FabiKo117 FabiKo117 added this to the 1.5 milestone Apr 12, 2021
@tyrasd tyrasd added the waiting An issue or PR which is waiting for an upstream bugfix, further information or is somehow blocked. label May 5, 2021
@tyrasd
Copy link
Member

tyrasd commented May 5, 2021

marked as waiting because the use case description is too vague at the moment.

@bonaparten
Copy link
Contributor

bonaparten commented May 5, 2021

As supposed, they would like to speed up the count process of edited entities in a period of time

//edit @tyrasd

basically we want to know: what is the percentage of features that have been edited on the past 12 months.

@tyrasd tyrasd added comments welcome Indicates that the creator of this issue/PR is open for early review comments and removed waiting An issue or PR which is waiting for an upstream bugfix, further information or is somehow blocked. labels May 5, 2021
@tyrasd
Copy link
Member

tyrasd commented May 5, 2021

ok, this is a valid use case, thanks for clarifying. //cc @Hagellach37

What's unclear to me now is, if the resource is well placed in the /contributions/ path of the API, because the use case mentions that it's more about counting features (i.e. elements) than the contributions. I think as a new user, one would intuitively not expect to find an answer to the above mentioned question in the proposed resource. 🤔 Or am I wrong here?

Also we should now probably also think about how we could grow the API around this new endpoint in the near future: I think that it would be quite useful to extend this from simple counts to the other metrics like length or area in order to answer questions like: “what is the percentage of the road network length has been edited during the past 12 months.”. But when we provide this, it would be essential to split the output between creations/modifications and deletions, so the result structure should reflect this already with the count endpoint IMHO.

PS: now I just notice that even to answer the original question of “what is the percentage of features that have been edited on the past 12 months” it would be needed to split the result between created/modified and deleted features, since one could get results > 100% when there are many deletions in an area (e.g. when there were 2 POIs in a region, one gets deleted and the other is modified, then the result should be 100% not 200%), shouldn't it?

@bonaparten
Copy link
Contributor

bonaparten commented May 6, 2021

A different feature to offer could be to just add, for every element endpoint, a new boolean parameter a contributionType parameter that takes creation, geometryChange, tagChange and other. The solution will give back elements filtered by their contribution type. For the contributions endpoints, it should be possible to use the same parameter filtering by all values (also deletion).
But I don't know if the whole work is really necessary at this stage. Only implementing a /contributions/latest/count now doesn't invalidate the possibility to add these other features in a fast way in the future. So the point is now whether the /contributions/latest/count feature is what it is wanted.

//edited

@Hagellach37
Copy link

Hey,
let me jump in here and try to explain. At the moment we use the contributions/latest/centroid endpoint to find out which features have been modified in the past x months for a specific region. Whereas it is nice that we get all the information for these contributions and their centroids, we are actually not using much of this information. Because in the end we just count them and don't use the geometry or tags at all.

Being able to distinguish between the type of the contribution (e.g. created, deleted, modified) would be really good.

When it comes to anything else than count it gets even more difficult. Because then we need to be able to aggregate more fine grained, e.g. contributions that increase and contributions that decrease the road length etc. So I would only focus on the count for now and it is also "good enough" for the use case we have in OQT at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comments welcome Indicates that the creator of this issue/PR is open for early review comments enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants