Loading repository data…
Loading repository data…
ChenLiu-1996 / repository
A simple pip-installable Python tool to generate your HTML citation world map from your Google Scholar ID.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
🏆 The world's first free tool to visualize your Google Scholar citations on a world map.
⭐ There is NO NEED to clone or fork this repo unless you want to make custom changes.
🚀 It only takes 1 line to install and 4 lines to run!
🌐 A properly installed Chrome browser is required to run this successfully, since CAPTCHA checks will be redirected to a pop-up Chrome browser.
👉 Due to personal reasons, I am no longer able to run CitationMap for you if you run into problems. Apologies.
⚠️ I was told that recently Google Scholar has updated the traffic-blocking and made CitationMap much less reliable than before. Pull requests to fix this issue are very welcome!
I am Chen Liu, a Computer Science PhD Candidate at Yale University.
This is a simple Python tool to generate an HTML citation world map from your Google Scholar ID.
It is easy to install (available on PyPI) and easy to use (see the User Guide).
This is for users familiar with python. Otherwise, please read the User Guide.
Long story short: DO NOT CLONE OR FORK if you just want to use it! Just installing and running in a single pythin script is enough! Otherwise it will only make things complicated unless you know what you are doing.
pip install citation-map
If you want to install the latest version, run pip install citation-map --upgrade.
Please copy and paste this to an empty .py file (name it something like run.py), replace my scholar ID with yours, and run it using python run.py.
from citation_map import generate_citation_map
if __name__ == '__main__':
scholar_id = '3rDjnykAAAAJ' # This is my Google Scholar ID. Replace this with your ID.
generate_citation_map(scholar_id)
You will be given an HTML file as the output of the script.
If you open it on a browser, you will see your own version of the following citation world map.
Besides, there will be a CSV file recording citation information (citing author, citing paper, cited paper, affiliation, detailed location).
Disclaimer: It is reasonable for this tool to make some minor mistakes: missing a few citing authors, dropping a couple of pins in wrong locations, etc. If you care a lot about ensuring all citing authors' affiliations are included and accurately marked, you could try manually annotating on Google My Maps instead. This tool is meant to help people who cannot tolerate this painful process, especailly when they have a decent number of citations.
NOTE: Now you can trade off between affiliation precision and recall with the affiliation_conservative option. If set to True, we will use the Google Scholar verified official organization name from the citing authors. This is a very conservative approach, since (1) the author needs to self-report it in the affiliation panel, (2) the author needs to verify with the matching email address, and (3) the organization needs to be recorded by Google Scholar. For example, Meta (the company) is not in the list. Many thanks to Zhijian Liu for the helpful discussion.
BibTeX
@article{citationmap,
title={CitationMap: A Python Tool to Identify and Visualize Your Google Scholar Citations Around the World},
author={Liu, Chen},
journal={Authorea Preprints},
year={2024},
publisher={Authorea}
}
MLA
Liu, Chen. "CitationMap: A Python Tool to Identify and Visualize Your Google Scholar Citations Around the World." Authorea Preprints (2024).
APA
Liu, C. (2024). CitationMap: A Python Tool to Identify and Visualize Your Google Scholar Citations Around the World. Authorea Preprints.
Chicago
Liu, Chen. "CitationMap: A Python Tool to Identify and Visualize Your Google Scholar Citations Around the World." Authorea Preprints (2024).
[Asking for advice]
[Oct 14, 2025] Version 5.0 released >>> Better handling of CAPTCHA.
[Aug 2, 2024] Version 4.0 released >>> Logic update. A new input argument affiliation_conservative. If set to True, we will use a very conservative approach to identify affiliations which leads to much higher precision and lower recall. Many thanks to Zhijian Liu for the helpful discussion.
[Jul 28, 2024] Version 3.10 released >>> Logic update. Tested on a professor's profile with 10,000 citations!
[Jul 27, 2024] Version 2.0 released >>> 10x speedup with multiprocessing (1 hour to 5 minutes for my profile).
[Jul 26, 2024] Version 1.0 released >>> First working version for my profile with 100 citations.
If you are new to Python, you probably want to start with a distribution of Python that also helps with environment management (such as anaconda). Once you have set up your environment (for example, when you reach the stage of conda activate env39 in this tutorial), you can move on to the next step.
Install this tool by running the following line in your conda-accessible command line.
pip install citation-map --upgrade
Find your Google Scholar ID.
https://scholar.google.com/citations?user=GOOGLE_SCHOLAR_ID. In this case, your Google Scholar ID is just the string GOOGLE_SCHOLAR_ID.&hl=en (host language is English) or &sortby=pubdate (sort the works by date of publication).In an empty Python script, run the following.
citation_map.py which would cause circular import as this package itself shares the same name. Call it something else: e.g., run_citation_map.py, run.py, etc. See Issue #2.if __name__ == '__main__' seems necessary to avoid multiprocessing problems, and it is a good practice anyways.from citation_map import generate_citation_map
if __name__ == '__main__':
# This is my Google Scholar ID. Replace this with your ID.
scholar_id = '3rDjnykAAAAJ'
generate_citation_map(scholar_id)
Note that in Version 4.5, we support manual edit of the csv. You can run generate_citation_map first, and get the csv and HTML. Then, you can manually modify the csv content, and generate an updated HTML by running generate_citation_map again with parse_csv=True.
Note that in Version 4.0, we will cache the results before identifying affiliations. So if you want to rerun the same author from scratch, you need to delete the cache (default location is 'cache').
More input arguments are shown in the demo script.
You can take a look at the input arguments (listed below) of the function generate_citation_map in case you need those functionalities.
Parameters
----
scholar_id: str
Your Google Scholar ID.
output_path: str
(default is 'citation_map.html')
The path to the output HTML file.
csv_output_path: str
(default is 'citation_info.csv')
The path to the output csv file.
parse_csv: bool
(default is False)
If True, will directly jump to Step 5.2, using the information loaded from the csv.
cache_folder: str
(default is 'cache')
The folder to save intermediate results, after finding (author, paper) but before finding the affiliations.
This is because the user might want to try the aggressive vs. conservative approach.
Set to None if you do not want caching.
affiliation_conservative: bool
(default is False)
If true, we will use a more conservative approach to identify affiliations.
If false, we will use a more aggressive approach to identify affiliations.
num_processes: int
(default is 16)
Number of processes for parallel processing.
use_proxy: bool
(default is False)
If true, we will use a scholarly proxy.
It is necessary for some environments to avoid blocks, but it usually makes things slower.
pin_colorful: bool
(default is True)
If true, the location pins will have a variety of colors.
Otherwise, it will only have one color.
print_citing_affiliations: bool
(default is True)
If true, print the list of citing affiliations (affiliations of citing authors).