#!/usr/bin/env python3 """Venue streams (journals / conference series) of DBLP 2018-2026 with counts, for the taxonomy mapping.""" import duckdb, sys src, out = sys.argv[1], sys.argv[2] con = duckdb.connect() con.sql(f"""copy (select stream, rec_type, count(*) n, min(year) y0, max(year) y1, any_value(journal) journal, any_value(booktitle) booktitle from read_parquet('{src}') where year between 2018 and 2026 and rec_type in ('article','inproceedings') group by 1,2 having n >= 100 order by n desc) to '{out}' (header)""") print(con.sql(f"select count(*) from read_csv_auto('{out}')").fetchall(), con.sql(f"select rec_type, count(*) from read_parquet('{src}') where year between 2018 and 2026 group by 1 order by 2 desc").fetchall())