Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Andrew Friedman
/
Fairly Draw Election Districts
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
644dc4f3
authored
Mar 14, 2017
by
Garrett Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
f8bbd753
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
algorithms/algorithms_new.py
algorithms/algorithms_new.py
View file @
644dc4f3
...
...
@@ -921,7 +921,6 @@ def make_gap_lower(districts_dict, all_tracts, num_districts, used_tracts,
new_gap
=
calculate_efficiency_gap_from_dict
(
districts_dict
)
# print("hit", new_gap != best_gap)
if
abs
(
new_gap
)
<=
abs
(
best_gap
):
new
=
False
best_total
=
tract_total
...
...
@@ -1110,3 +1109,6 @@ if __name__=="__main__":
#print(district_plan)
print
(
"The efficiency gap for this plan of {} is {}, which indicates that {} receive a districting advantage of {} seats."
.
format
(
sys
.
argv
[
1
],
results_gap
,
party
,
advantage
))
create_json_file
(
district_plan
,
"district_plans/"
+
sys
.
argv
[
1
])
d
=
recover_json
(
"district_plans/"
+
"Iowa"
+
".json"
)
print
(
d
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment