-
Notifications
You must be signed in to change notification settings - Fork 7
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
Reworked and renamed LastEdit indicator to Currentness #178
Conversation
In the current implementation here the indicator has a parameter, which allows to set a time range for the calculation. Currently the tests for test_api_indicator.py fail because of this implementation. To resolve this the parameter must also be set for all get/post/fetch functions of api.py. Do we want that or should the default value (last 10 years from current date) always apply? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work 👍
Apart from the suggestions/questions I have some general remarks:
- Before you do something else, have a look at the comments to the calculation and preprocessing of the indicator. Some suggestions might change other parts of your code as well.
- All descriptions in the
metadata.yaml
have to be applied to the new indicator. - Some work should be put into the test. It's still called
TestIndicatorLastEdit
. You could think if it makes sense to check the actual results of your indicator. But this isn't a necessity, just worth thinking about. - Why did you implement the parameter only into the CLI and not the API?
- Tests for the new parameter are missing.
- Changelog entry for the new parameter is missing.
- Please check your indicator with the API and especially the website (e.g. by temporarily adding it to a report).
- The output description needs to be aligned.
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
Sorry, missed that question before reviewing. Is there some kind of reasoning behind the last 10 years? Why not use all of the available data? Or 1 year? We could use a default time range like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional remarks, additionally to the not yet solved ones from the last review.
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/metadata.yaml
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
Be aware that there it is very likely that many map features are outdated. | ||
You should carefully check this before using the data as it indicates bad | ||
data quality in respect to currentness. | ||
yellow: | | ||
Some map features could be outdated in this regions, since only a smaller | ||
fraction has been updated in the past year. | ||
More than half of the $elements edited elements were last edited between one and four years ago. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use numbers or words for numbers, not both. Example:
On the MapAction Lakes Count over 50% of the 3.0 edited elements were last edited in the last 7 years. More than half of the $elements edited elements were last edited between one and four years ago. This refers to medium data quality in respect to currentness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally it wouldn't say were edited in the last 1 years but were edited in the last year.
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
workers/ohsome_quality_analyst/indicators/currentness/indicator.py
Outdated
Show resolved
Hide resolved
* Reworked and renamed LastEdit indicator to Currentness * fix tests * remove time_range parameter; add new calculation * fix CLI * fix tests * implement feedback * fix plot for website * change plot to match the mapping saturation plot * add comments
Description
Reworked and renamed the LastEdit indicator to Currentness. It now returns a histogram with the distribution of the latest contributions to an element for the whole timerange. New tresholds are defined.
Corresponding issue
Closes #
New or changed dependencies
Checklist
main
(e.g. throughgit rebase main
)Please check all finished tasks. If some tasks do not apply to your PR, please cross their text out (by using
~...~
) and remove their checkboxes.