Skip to main content

Summarize CSV publication and citation data by column.

Project description

📊 CSV Citation Counter

This Python script processes one or more CSV files to summarize publication and citation data by a chosen column — such as journal names, author names, or institutions.

It supports:

  • ✅ Counting how many times each entry appears (e.g., number of articles per journal)
  • ✅ Summing citations per entry using a "Cited by" column
  • ✅ Calculating average and max citations per entry
  • ✅ Sorting results by:
    • Number of articles [articles]
    • Total citations [total]
    • Average citations per article [avg]
  • ✅ Handling multi-entry fields (e.g., multiple authors separated by ; )
  • ✅ Writing clean summaries to a human-readable summary.txt

📦 Requirements

No external libraries required — works with standard Python 3.


🚀 How to Run the Script

You can run the script in two ways:


✅ Option 1: Command Line Arguments

python script.py \
  --files data/file1.csv data/file2.csv \
  --column "Authors" \
  --split "; " \
  --sortby avg

✅ Option 2: Interactive Mode

You'll be prompted to:

Enter file paths or folders:

Input one path per line (CSV file or folder)

Hit Enter on an empty line when you're done

All .csv files in a folder will be included

Column name to analyze (e.g., Journal, Authors)

Delimiter (optional) if each csv entry has multiple elements (such as authors):

Leave blank for single-entry fields

Make sure to add a space (like "; ") if necessary.

Sort method (optional):

articles → by number of articles (default)

total → by total citations

avg → by average citations per article

Output

The summary is recorded to a summary.txt in the same directory where this script was run. Blank lines separated groups with differnet values for the sort attribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csv_citation_counter-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csv_citation_counter-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file csv_citation_counter-0.1.0.tar.gz.

File metadata

  • Download URL: csv_citation_counter-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for csv_citation_counter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a18c9fe5f02e2754d20e1c2cfed4f604a11f57fb4fb80ce3a5726b9495a736a
MD5 4c861b27b7b1ba1a1df9cac4158da82a
BLAKE2b-256 35df2822e890d77cce72cbe983add244fc875822f8d1ff5d271ff65b67ec0ea3

See more details on using hashes here.

File details

Details for the file csv_citation_counter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for csv_citation_counter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3d794f3e5eb027ebc1577441744951a9da15ba731b0dab025f4203c250829b3
MD5 6c27d346e49ac19d992c8f74b0d7380c
BLAKE2b-256 b792994810de6b7e0108e1e52e5db547d7feaffabf5d937279e0e533200f61c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page