SPB Git

spb/wp44_uqo

Public
740 B · 10 lines python
1#!/usr/bin/env python32"""Venue streams (journals / conference series) of DBLP 2018-2026 with counts, for the taxonomy mapping."""3import duckdb, sys4src, out = sys.argv[1], sys.argv[2]5con = duckdb.connect()6con.sql(f"""copy (select stream, rec_type, count(*) n, min(year) y0, max(year) y1, any_value(journal) journal, any_value(booktitle) booktitle7  from read_parquet('{src}') where year between 2018 and 2026 and rec_type in ('article','inproceedings')8  group by 1,2 having n >= 100 order by n desc) to '{out}' (header)""")9print(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())10
Files · d3fe2e0df5d6260ffa0da1360f47e64389a05629
Menu

Theme