Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
formularin committed Feb 22, 2023
1 parent db6ce24 commit 192fd07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions rba/community_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
}


@dataclass
class Community:
precincts: frozenset
birth_time: float
death_time: float = -1


def compute_precinct_similarities(graph, verbose=False):
"""
Generates similarities between precincts. Edits graph in-place.
Expand Down
4 changes: 2 additions & 2 deletions rba/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def modify_coords(coords, bounds):
return new_coords


def visualize_partition_geopandas(partition):
def visualize_partition_geopandas(partition, *args, **kwargs):
"""Visualizes a gerrychain.Partition object using geopandas.
"""
data = {"assignment": [], "geometry": []}
Expand All @@ -113,7 +113,7 @@ def visualize_partition_geopandas(partition):

gdf = geopandas.GeoDataFrame(data)
del data
gdf.plot(column="assignment")
gdf.plot(column="assignment", *args, **kwargs)


def visualize_map(graph, output_fpath, node_coords, edge_coords, node_colors=None, edge_colors=None,
Expand Down

0 comments on commit 192fd07

Please sign in to comment.