Commit d6652bb1 authored by scmalte's avatar scmalte

aggr.py: started working on script that combines cluster and code-export data...

aggr.py: started working on script that combines cluster and code-export data to produce final report
parent 76420566
import logging
import csv
import pandas as pd
from .utils import logging as logutils
DEFAULT_CLUSTERS_SUMMARY_CSV_FILE="clusters.csv"
DEFAULT_CX_COURSE_STUDENTS_CSV_FILE="cx_students.csv"
def main(
clusters_summary_csv_file=DEFAULT_CLUSTERS_SUMMARY_CSV_FILE,
cx_course_students_csv_file=DEFAULT_CX_COURSE_STUDENTS_CSV_FILE):
clusters_csv = pd.read_csv(clusters_summary_csv_file)
students_csv = pd.read_csv(cx_course_students_csv_file)
clusters = clusters_csv.groupby("cluster_id")
for name, cluster in clusters:
ids = pd.concat([cluster["id1"], cluster["id2"]], ignore_index=False)
# print(cluster[["id1", "id2"]].unique())
print(ids.unique())
# for wtf in clusters[["id1", "id2"]]:
# print(wtf)
# for cluster in clusters.groups:
# print(cluster)
# for cluster in clusters.groupby("cluster_id"):
# print(cluster["id1"])
if __name__ == "__main__":
main()
......@@ -22,6 +22,7 @@ setup(
'dataclass-csv',
'pydot',
'networkx',
'pandas',
'Jinja2'
],
# scripts=['bin/mossutils-moss'],
......@@ -29,7 +30,8 @@ setup(
"console_scripts": [
'mu-moss = mossutils.moss:main',
'mu-revise = mossutils.revise:main',
'mu-cluster = mossutils.cluster:main'
'mu-cluster = mossutils.cluster:main',
'mu-aggr = mossutils.aggr:main'
]
},
zip_safe=False)
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 to comment