-
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
feat: topic specific thresholds #384
base: main
Are you sure you want to change the base?
Changes from 1 commit
a851ae9
f681323
ba8d153
ef7e42d
2460593
971705e
56cd352
5e4f53f
b9a5080
2e8f27c
e65c5a3
c017dbe
d170881
15c119a
e394ba5
f39dc42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,26 @@ Currentness: | |
result_description: | | ||
Over 50% of the $elements features ($layer_name) were edited $years. | ||
layer-thresholds: | ||
default: [ 0.2, null, 0.6, null] | ||
default: [ 2, 3, 4, 8] | ||
amenities: null | ||
building_count: null | ||
major_roads_count: null | ||
infrastructure_lines: null | ||
poi: null | ||
jrc_airport_count: null | ||
jrc_bridge_count: null | ||
jrc_cultural_heritage_site_count: null | ||
jrc_education_count: null | ||
jrc_health_count: null | ||
jrc_mass_gathering_sites_count: null | ||
jrc_power_generation_plant_count: null | ||
jrc_railway_count: null | ||
jrc_road_count: null | ||
jrc_water_treatment_plant_count: null | ||
lulc: null | ||
major_roads_count: null | ||
mapaction_lakes_count: null | ||
mapaction_major_roads_length: null | ||
mapaction_rail_length: null | ||
mapaction_rivers_length: null | ||
mapaction_settlements_count: null | ||
Comment on lines
+40
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above comment |
||
poi: null | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import logging | ||
from io import StringIO | ||
from string import Template | ||
from typing import Optional, Tuple | ||
|
||
import dateutil.parser | ||
import matplotlib.pyplot as plt | ||
|
@@ -19,7 +20,10 @@ class GhsPopComparisonRoads(BaseIndicator): | |
"""Set number of features and population into perspective.""" | ||
|
||
def __init__( | ||
self, layer: Layer, feature: Feature, thresholds: tuple = None | ||
self, | ||
layer: Layer, | ||
feature: Feature, | ||
thresholds: Optional[Tuple[float, float, float, float]] = None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this indicator its actualy a tuple of dicts (see in the layer-thresholds in the metadata: Here we also need to check the threshold function used by this indicator to use the threshold function parameter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
) -> None: | ||
super().__init__(layer=layer, feature=feature, thresholds=thresholds) | ||
# Those attributes will be set during lifecycle of the object. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,5 @@ GhsPopComparisonRoads: | |
$feature_length_per_sqkm km of roads per sqkm mapped. | ||
layer-thresholds: | ||
default: [{ a: 1000 }, null, { a: 500 }, null] | ||
major_roads_length: null | ||
jrc_road_length: null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets not include JRC layers here |
||
major_roads_length: null |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,16 @@ MappingSaturation: | |
amenities: null | ||
building_count: null | ||
infrastructure_lines: null | ||
jrc_education_count: null | ||
jrc_health_count: null | ||
jrc_mass_gathering_sites_count: null | ||
jrc_railway_length: null | ||
jrc_road_length: null | ||
Comment on lines
+23
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before |
||
lulc: null | ||
major_roads_length: null | ||
poi, thresholds: null | ||
mapaction_lakes_area: null | ||
mapaction_major_roads_length: null | ||
mapaction_rail_length: null | ||
mapaction_rivers_length: null | ||
mapaction_settlements_count: null | ||
Comment on lines
+30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before |
||
poi: null |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,12 @@ TagsRatio: | |
layer-thresholds: | ||
default: [ 0.25, null, 0.75, null] | ||
building_count: null | ||
jrc_airport_count: null | ||
jrc_bridge_count: null | ||
jrc_cultural_heritage_site_count: null | ||
jrc_education_count: null | ||
jrc_health_count: null | ||
jrc_mass_gathering_sites_count: null | ||
jrc_power_generation_plant_count: null | ||
jrc_road_length: null | ||
Comment on lines
+23
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before |
||
major_roads_length: null |
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.
I think those layers are not beein used at the moment. Lets not add them here for now.