Skip to content

Commit

Permalink
Allow printing all flow path counts to compare to cc7 app.
Browse files Browse the repository at this point in the history
  • Loading branch information
sligocki committed Aug 28, 2024
1 parent 59ed514 commit 1dac44a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flow_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ def main():
help="Cuttoff for including connection in DOT.")
parser.add_argument("--highlight-after-num", type=int,
help="Highlight profiles created after a specified profile number.")
parser.add_argument("--print-all", action="store_true")
parser.add_argument("--version", help="Data version (defaults to most recent).")
args = parser.parse_args()

utils.log("Loading connections")
db = data_reader.Database(args.version)
if not args.max_dist:
if args.max_dist:
args.distr_dist = max(args.max_dist, args.distr_dist)
else:
db.load_connections()
args.max_dist = math.inf

Expand Down Expand Up @@ -167,6 +170,11 @@ def node_attr_func(node):
print(n, " ".join(f"{round(x):7_d}" for x in np.quantile(distr, [0.0, 0.1, 0.25, 0.5, 0.75, 0.9, 1.0])))
# print(f"{n:3d} {distr[0]:_d} {distr[len(distr)//2]:_d} {distr[-1]:_d}")

if args.print_all:
utils.log("All Flow Counts")
for num_flows, person in ordered_people:
print(f"{dists[person]:2d} {num_flows:5d} {try_decode_wikitree_id(db, person)}")

utils.log("Done")


Expand Down

0 comments on commit 1dac44a

Please sign in to comment.