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

feat(attribute-completeness): support custom attribute definition via ohsome filter #840

Open
matthiasschaub opened this issue Oct 26, 2024 · 2 comments · May be fixed by #848
Open

feat(attribute-completeness): support custom attribute definition via ohsome filter #840

matthiasschaub opened this issue Oct 26, 2024 · 2 comments · May be fixed by #848

Comments

@matthiasschaub
Copy link
Collaborator

There are many possible attributes a person could be interested in, and there will be requests by people to add their attribute to the list. Long term, it is unfeasible to maintain such a list of attributes on our end.

Instead, it should be possible to define one's own attribute as ohsome filter query. This should be an "advanced" option in addition to the already existing and predefined attributes.


The API endpoint /indicators/attribute-completeness could accept an additional parameter (e.g ohsome_query or ohsome_filter) containing a valid ohsome filter query representing an attribute (which in the end gets AND combined with the topic filter query).

Either attribute_key or ohsome_query should be given in one request.
The validation of the ohsome query should be done by the ohsome API, ergo when the actual request is done (Easier to Ask Forgiveness than Permission → Try and Except).

The indicator itself decides based on receiving either an attribute key or an ohsome query to either build the ohsome filter based upon our definition of the given attribute (as it is done right now) or to simple pass on the given ohsome filter to our ohsome query builder (ohsome/client.py::query) to combine it with the topic filter.

@matthiasschaub matthiasschaub linked a pull request Nov 18, 2024 that will close this issue
5 tasks
@mcauer
Copy link
Member

mcauer commented Nov 19, 2024

@matthiasschaub for every attributeFilter we woud need also an attributeFilterTitle which would be a user defined naming for the filter which we can also use in the result description as a replacement for the attribute names.

E.g. The bold information should be replaced with s.th. useful when queried with custom attributeFilter:

0.2% of all "building count" features (all: 3194 elements) in your area of interest have the selected additional attributes height of buildings, colour of roofs (matched: 6 elements). The attribute completeness is low (<25%).

@matthiasschaub
Copy link
Collaborator Author

@mcauer at the moment, PR #849 introduced two now parameters: attributeFilter (string) and attributeNames (list of string). Would you rather have attributeName or attributeTitle as a single string instead of a list of strings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants