-
Notifications
You must be signed in to change notification settings - Fork 2
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
auto convert old cons data to new cons data #365
auto convert old cons data to new cons data #365
Conversation
27202e4
to
e53be2b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## multiple-geometry-staging #365 +/- ##
=============================================================
- Coverage 84.51% 83.44% -1.08%
=============================================================
Files 97 100 +3
Lines 2829 2942 +113
Branches 285 300 +15
=============================================================
+ Hits 2391 2455 +64
- Misses 369 414 +45
- Partials 69 73 +4 ☔ View full report in Codecov by Sentry. |
0f63475
to
80163e0
Compare
44fa046
to
56c2e16
Compare
e53be2b
to
40908c3
Compare
56c2e16
to
31d415e
Compare
6bec7e1
to
59a6179
Compare
b257c24
to
a535563
Compare
d2df82f
to
9f7f2f2
Compare
9f7f2f2
to
7f553b3
Compare
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.
@struan I’ve attempted to tidy up the display of the "disclaimer" in the template, by moving it into the model. My instinct, though, is that the string explaining the conversion should be set by the script that actually does the conversion, rather than us having to guess which generation was converted to/from what.
In fact, perhaps DataType.auto_converted
(a BooleanField
) should actually be DataType.auto_converted_from_area_type
(a ForeignKey
to AreaType
, defaulting to None
) so that the view/template can automatically fetch the name and details of the AreaType
from which the dataset was auto-converted?
to be used if the data type has been created by an auto conversion between geometry types
ae54fdf
to
6f7948e
Compare
I've made some updates which I think answer most of your issues. I'm not totally sure about the Foreign key thing because I'm not sure what we'd do with it. |
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.
@struan I’ve committed a new page that explains the conversion process, and have linked to that from the disclaimers on the area page. Could you check the links all work fine, and then merge if you’re happy?
allows adding an explanation of how the dataset was automatically converted in order to override the default one
mostly useful in the admin interface
85de704
to
9602176
Compare
This adds a script, plus updates all the importers to automatically convert suitable datasets from the old constituency data to the upcoming ones. Essentially it does anything that is a percentage and is evenly distributed over the area or people in the area. It also adds a notice to indicate where a dataset has been automatically converted:
Fixes #360