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

Implementing labelling disaggregation #4677

Merged
merged 23 commits into from
Dec 9, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
112f4b5
Adding labelling disaggregation to spatial_aggregate + initial test
Thingus Dec 7, 2021
4b90c62
Merge branch 'master' into labelled_aggs_and_flows
Thingus Dec 7, 2021
ffdca93
Spatial_aggregate returns labels if used
Thingus Dec 7, 2021
5e16eb8
Merge remote-tracking branch 'origin/labelled_aggs_and_flows' into la…
Thingus Dec 7, 2021
7c6b56c
Spatial_aggregate returns labels if used
Thingus Dec 7, 2021
96fa35f
Breaking labelled spatial aggregate into its own class + permitting m…
Thingus Dec 8, 2021
0d95848
Implementing specialised redaction + test
Thingus Dec 8, 2021
66be2f0
Fixing imports
Thingus Dec 8, 2021
f289b92
Validation + test
Thingus Dec 8, 2021
cddb3ee
Docs + tests + some renaming
Thingus Dec 8, 2021
1e718bb
Headers + more docs
Thingus Dec 8, 2021
dc9007a
Changelog
Thingus Dec 8, 2021
06e809d
Update flowmachine/flowmachine/features/location/labelled_spatial_agg…
Thingus Dec 8, 2021
dad684f
Update flowmachine/flowmachine/features/location/labelled_spatial_agg…
Thingus Dec 8, 2021
fc159d4
Update flowmachine/flowmachine/features/location/labelled_spatial_agg…
Thingus Dec 8, 2021
33a59fc
Changing to left join
Thingus Dec 8, 2021
8bc8835
More changes from review
Thingus Dec 8, 2021
c758cf8
Adding spatial_unit to redacted_labelled_spatial_aggregate.py
Thingus Dec 8, 2021
2d48f14
Extra tests
Thingus Dec 8, 2021
7cad644
More extra tests
Thingus Dec 8, 2021
0958ea1
ADR
Thingus Dec 8, 2021
6cff7cc
More test
Thingus Dec 8, 2021
0262577
Merge branch 'master' into labelled_aggs_and_flows
Thingus Dec 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding spatial_unit to redacted_labelled_spatial_aggregate.py
Thingus committed Dec 8, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c758cf8ccc6a29689518868a4bf43e655229d705
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ class RedactedLabelledSpatialAggregate(GeoDataMixin, Query):
labelled_spatial_aggregate: LabelledSpatialAggregate
The LabelledSpatialAggregate query to redact
redaction_threshold: int default 15
If any labels within a location reveal less than this number of subscribers, that location is dropeed
If any labels within a location reveal less than this number of subscribers, that location is dropped
"""

def __init__(
@@ -32,6 +32,7 @@ def __init__(

Thingus marked this conversation as resolved.
Show resolved Hide resolved
self.labelled_spatial_aggregate = labelled_spatial_aggregate
self.redaction_threshold = redaction_threshold
self.spatial_unit = labelled_spatial_aggregate.spatial_unit
super().__init__()

@property
@@ -43,7 +44,6 @@ def _make_query(self):
aggs = ",".join(
self.labelled_spatial_aggregate.spatial_unit.location_id_columns
)
labels = self.labelled_spatial_aggregate.out_label_columns_as_string_list
all_cols = self.labelled_spatial_aggregate.column_names_as_string_list

sql = f"""