Why do you even need districts? Just split based on the total percentages of voters.
If you are voting for the mayor of a city, just count every single vote of the citizens. Why do you first need to split up the people into arbitrary groups, and then count the group outcomes?