wiki-query
PApaperclipai/paperclip101k近 7 天新增 2,948 个 star
Analyze citation networks, compute bibliometric indicators, and identify research fronts. Use when: user asks about citation patterns, h-index, co-authorship networks, research trends, or bibliometric analysis. NOT for: literature searching (use literature-search) or writing papers (use paper-writing).
Analyze citation networks, compute bibliometric indicators, and identify research fronts using Semantic Scholar, OpenAlex, and CrossRef data.
import numpy as np
def h_index(citations: list[int]) -> int:
"""Compute h-index from a list of citation counts."""
sorted_c = sorted(citations, reverse=True)
h = 0
for i, c in enumerate(sorted_c):
if c >= i + 1:
h = i + 1
else:
break
return h
def g_index(citations: list[int]) -> int:
"""Compute g-index: largest g such that top g papers have >= g^2 citations."""
sorted_c = sorted(citations, reverse=True)
cumsum = np.cumsum(sorted_c)
g = 0
for i in range(len(sorted_c)):
if cumsum[i] >= (i + 1) ** 2:
g = i + 1
return g
def i10_index(citations: list[int]) -> int:
"""Number of papers with 10+ citations."""
return sum(1 for c in citations if c >= 10)
import networkx as nx
def build_citation_graph(papers: list[dict]) -> nx.DiGraph:
"""
Build a directed citation graph.
Each paper dict should have 'paperId', 'title', 'citations', 'references'.
Edge direction: citing -> cited.
"""
G = nx.DiGraph()
for p in papers:
G.add_node(p['paperId'], title=p['title'],
year=p.get('year'), citations=p.get('citationCount', 0))
for ref in p.get('references', []):
if ref.get('paperId'):
G.add_edge(p['paperId'], ref['paperId'])
for cit in p.get('citations', []):
if cit.get('paperId'):
G.add_edge(cit['paperId'], p['paperId'])
return G
def analyze_citation_network(G: nx.DiGraph) -> dict:
"""Compute key citation network metrics."""
results = {}
results['num_papers'] = G.number_of_nodes()
results['num_citations'] = G.number_of_edges()
results['density'] = nx.density(G)
# Most cited (highest in-degree)
in_deg = dict(G.in_degree())
results['most_cited'] = sorted(in_deg.items(), key=lambda x: -x[1])[:10]
# PageRank (identifies influential papers beyond raw citations)
pr = nx.pagerank(G)
results['pagerank_top'] = sorted(pr.items(), key=lambda x: -x[1])[:10]
# Betweenness centrality (bridge papers connecting subfields)
bc = nx.betweenness_centrality(G)
results['bridge_papers'] = sorted(bc.items(), key=lambda x: -x[1])[:10]
return results
def build_coauthor_graph(papers: list[dict]) -> nx.Graph:
"""Build undirected co-authorship graph."""
G = nx.Graph()
for p in papers:
authors = [a['name'] for a in p.get('authors', []) if a.get('name')]
for i, a1 in enumerate(authors):
G.add_node(a1)
for a2 in authors[i+1:]:
if G.has_edge(a1, a2):
G[a1][a2]['weight'] += 1
else:
G.add_edge(a1, a2, weight=1)
return G
def find_communities(G: nx.Graph) -> list:
"""Detect research communities via Louvain."""
from networkx.algorithms.community import louvain_communities
return louvain_communities(G, resolution=1.0)
import matplotlib.pyplot as plt
def plot_citation_trend(papers: list[dict], output_path: str):
"""Plot citation counts over publication years."""
years = [p['year'] for p in papers if p.get('year')]
fig, ax = plt.subplots(figsize=(8, 4))
ax.hist(years, bins=range(min(years), max(years)+2), edgecolor='black')
ax.set_xlabel('Publication Year')
ax.set_ylabel('Number of Papers')
ax.set_title('Publication Trend')
fig.tight_layout()
fig.savefig(output_path, dpi=300)
print(f"Saved: {output_path}")
| Source | Endpoint | Free? | Rate Limit |
|---|---|---|---|
| Semantic Scholar | /paper/{id}/citations, /paper/{id}/references | Yes | 100/5min (no key) |
| OpenAlex | /works?cited_by={id}, /works?cites={id} | Yes | 100k/day |
| CrossRef | /works/{doi} (reference list) | Yes | Polite pool |
PApaperclipai/paperclip101k近 7 天新增 2,948 个 star
NEnexu-io/open-design101k近 7 天新增 1,126 个 star
BYbytedance/deer-flow84k近 7 天新增 368 个 star
BYbytedance/deer-flow84k近 7 天新增 368 个 star
COcoreyhaines31/marketingskills54k近 7 天新增 958 个 star
IMImbad0202/academic-research-skills52k近 7 天新增 972 个 star