Spaces:
Sleeping
Sleeping
| def link_clusters_to_timeline(results, clusters): | |
| """ | |
| Build index maps so timeline & clusters can cross-highlight | |
| """ | |
| doc_index = {} | |
| for idx, r in enumerate(results): | |
| doc_index[r["id"]] = { | |
| "index": idx, | |
| "date": r.get("date"), | |
| "cluster": r.get("cluster"), | |
| } | |
| return doc_index |