Commit 3fad05c2 by Anne Rogers

fun

parent 95670f2c
Showing with 4 additions and 10 deletions
......@@ -1005,7 +1005,7 @@ if __name__=="__main__":
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])
if num_args > 1:
if num_args > 2:
double_word = {"West_Virginia": "West Virginia",
"South_Carolina": "South Carolina",
"North_Dakota": "North_Dakota",
......@@ -1025,16 +1025,10 @@ if __name__=="__main__":
state = sys.argv[1]
initial_percent_of_people=60
goal=5
special_name=''
better=False
district_plan = completed_result(state, initial_percent_of_people=60, goal=5,special_name='', better=False)
district_plan = completed_result(state)
results_gap = calculate_efficiency_gap_from_dict(district_plan)
tracts, districts = set_tracts(state=sys.argv[1])
if results_gap < 0:
party = "Democrats"
else:
......@@ -1045,7 +1039,7 @@ if __name__=="__main__":
# print(results_gap)
#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))
print("The efficiency gap of {} indicates that {} with receive a districting advantage of {} seats.".format(results_gap, party, advantage))
create_json_file(district_plan,"district_plans/" + sys.argv[1])
d = recover_json("district_plans/" + "Iowa" + ".json")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment