来源信息
- 仓库
- brycewang-stanford/Auto-Empirical-Research-Skills
- 最近来源活动
- 2026年4月3日 02:07
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 3,291
- 分支
- 432
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
菜单
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills --skill bokeh-visualization-guide命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
中英双语学术降 AIGC / bilingual academic de-AIGC skill. Removes AI-generated writing signatures from empirical papers in economics, management, and the social sciences — in both English and Chinese. Covers Turnitin AI, GPTZero, Originality.ai on the English side and 知网 AMLC, 万方, 维普 on the Chinese side. Uses a six-step loop (intake → audit → claim-evidence check → differentiated rewrite → five-dimension self-score → cold-reader recheck) with two pattern libraries (22 English + 17 Chinese patterns), section-by-section strategies for empirical papers, and hard protections that keep every number, coefficient, and citation intact.
Use when a research task needs reproducible Kaggle discovery, metadata inspection, bounded public-data downloads, competition or kernel discovery, model discovery, or an explicitly approved Kaggle write/delete operation through the official CLI.
基于 SOC 职业分类
| name | bokeh-visualization-guide |
| description | Guide to Bokeh for interactive browser-based research visualizations |
| metadata | {"openclaw":{"emoji":"🎨","category":"analysis","subcategory":"dataviz","keywords":["Bokeh","interactive plots","Python visualization","web dashboards","scientific charts","data exploration"],"source":"https://github.com/bokeh/bokeh"}} |
Bokeh is a Python library for creating interactive visualizations for modern web browsers, with over 20K stars on GitHub. Developed and maintained by NumFocus, Bokeh generates standalone HTML documents or serves live interactive applications. Its architecture renders graphics in the browser using BokehJS, meaning the resulting visualizations are portable and can be shared as static HTML files without requiring Python on the viewer's end.
For researchers, Bokeh offers a unique advantage: its server-backed interactive applications allow real-time data exploration during analysis. Unlike static plotting libraries, Bokeh lets researchers build tools where they can brush-select data points, link multiple views of the same dataset, and stream live data from instruments or simulations. This makes it invaluable for exploratory data analysis in laboratory and computational research settings.
Bokeh provides multiple levels of API access. The high-level bokeh.plotting interface is comparable in convenience to matplotlib, while the low-level bokeh.models interface gives fine-grained control over every visual element. The library also integrates with HoloViews and Panel for building complex dashboards with minimal code.
# Install bokeh
# pip install bokeh
from bokeh.plotting import figure, show, output_file, output_notebook
from bokeh.models import ColumnDataSource, HoverTool
import numpy as np
import pandas as pd
# For Jupyter notebooks
output_notebook()
# For standalone HTML files
output_file("research_figure.html")
from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource, HoverTool
# Prepare data
data = pd.DataFrame({
'sample_id': [f'S{i:03d}' for i in range(100)],
'measurement_a': np.random.normal(5, 1.5, 100),
'measurement_b': np.random.normal(10, 2, 100),
'group': np.random.choice(['Control', 'Treatment A', 'Treatment B'], 100),
'pvalue': np.random.uniform(0.001, 0.1, 100)
})
source = ColumnDataSource(data)
# Color mapping by group
color_map = {'Control': '#6B7280', 'Treatment A': '#3B82F6', 'Treatment B': '#EF4444'}
data['color'] = data['group'].map(color_map)
p = figure(
title='Measurement A vs B by Treatment Group',
x_axis_label='Measurement A (units)',
y_axis_label='Measurement B (units)',
width=700, height=500,
tools='pan,wheel_zoom,box_zoom,reset,save'
)
for group, color in color_map.items():
subset = data[data['group'] == group]
p.circle(
x=, y=,
source=ColumnDataSource(subset),
color=color, size=, alpha=,
legend_label=group
)
hover = HoverTool(tooltips=[
(, ),
(, ),
(, ),
(, ),
(, )
])
p.add_tools(hover)
p.legend.location =
p.legend.click_policy =
show(p)
One of Bokeh's most powerful features for research is linked brushing, where selecting data in one plot highlights the same data points in all other linked plots.
from bokeh.layouts import gridplot
from bokeh.models import ColumnDataSource
# Shared data source enables linked selections
source = ColumnDataSource(data=dict(
x1=np.random.normal(0, 1, 500),
x2=np.random.normal(0, 1, 500),
x3=np.random.normal(0, 1, 500),
cluster=np.random.choice(['A', 'B', 'C'], 500)
))
TOOLS = "pan,wheel_zoom,box_select,lasso_select,reset"
# Create linked scatter plots
p1 = figure(title="PC1 vs PC2", tools=TOOLS, width=400, height=400)
p1.circle('x1', 'x2', source=source, alpha=0.6, size=5, color='#3B82F6',
selection_color='#EF4444', nonselection_alpha=0.1)
p2 = figure(title="PC1 vs PC3", tools=TOOLS, width=400, height=400,
x_range=p1.x_range) # Share x-axis range
p2.circle('x1', 'x3', source=source, alpha=0.6, size=5, color='#3B82F6',
selection_color='#EF4444', nonselection_alpha=0.1)
p3 = figure(title="PC2 vs PC3", tools=TOOLS, width=400, height=400,
y_range=p2.y_range) # Share y-axis range
p3.circle(, , source=source, alpha=, size=, color=,
selection_color=, nonselection_alpha=)
grid = gridplot([[p1, p2], [p3, ]])
show(grid)
from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource, Whisker
import pandas as pd
groups = ['Control', 'Low', 'Medium', 'High']
q1 = [2.1, 3.5, 5.2, 6.8]
q2 = [3.0, 4.5, 6.5, 8.0]
q3 = [3.8, 5.5, 7.8, 9.2]
lower = [1.2, 2.5, 3.8, 5.5]
upper = [4.5, 6.5, 9.0, 10.5]
source = ColumnDataSource(data=dict(
groups=groups, q1=q1, q2=q2, q3=q3, lower=lower, upper=upper
))
p = figure(
x_range=groups,
title='Biomarker Levels by Dosage Group',
y_axis_label='Concentration (ng/mL)',
width=600, height=450
)
# Boxes
p.vbar(x='groups', top='q3', bottom='q2', width=0.5, source=source,
fill_color='#3B82F6', line_color='black', fill_alpha=0.7)
p.vbar(x='groups', top='q2', bottom='q1', width=0.5, source=source,
fill_color='#93C5FD', line_color='black', fill_alpha=0.7)
p.add_layout(Whisker(source=source, base=, upper=, lower=,
level=, line_width=))
p.segment(x0=, y0=, x1=, y1=, source=source,
line_color=, line_width=)
show(p)
from bokeh.plotting import figure, show
from bokeh.models import LinearColorMapper, ColorBar, BasicTicker
from bokeh.transform import transform
genes = [f'Gene_{i}' for i in range(20)]
samples = [f'Sample_{j}' for j in range(10)]
expression = np.random.randn(20, 10)
# Flatten for Bokeh
x_vals, y_vals, values = [], [], []
for i, gene in enumerate(genes):
for j, sample in enumerate(samples):
x_vals.append(sample)
y_vals.append(gene)
values.append(expression[i, j])
source = ColumnDataSource(dict(x=x_vals, y=y_vals, values=values))
mapper = LinearColorMapper(palette="RdBu11", low=-3, high=3)
p = figure(
title="Gene Expression Heatmap",
x_range=samples, y_range=list(reversed(genes)),
width=700, height=600,
toolbar_location='right'
)
p.rect(x='x', y='y', width=1, height=1, source=source,
fill_color=transform('values', mapper), line_color=None)
color_bar = ColorBar(color_mapper=mapper, ticker=BasicTicker(desired_num_ticks=10),
label_standoff=8, width=, location=(, ))
p.add_layout(color_bar, )
p.xaxis.major_label_orientation =
show(p)
Bokeh's server mode allows researchers to build interactive tools with Python callbacks.
from bokeh.io import curdoc
from bokeh.layouts import column
from bokeh.models import Slider
from bokeh.plotting import figure
# Create a plot that updates based on slider input
p = figure(title="Signal with Adjustable Frequency", width=700, height=400)
x = np.linspace(0, 10, 500)
source = ColumnDataSource(data=dict(x=x, y=np.sin(x)))
p.line('x', 'y', source=source, line_width=2)
slider = Slider(start=0.1, end=10, value=1, step=0.1, title="Frequency")
def update(attr, old, new):
source.data = dict(x=x, y=np.sin(new * x))
slider.on_change('value', update)
curdoc().add_root(column(slider, p))
# Run with: bokeh serve --show script.py
from bokeh.io import export_png, export_svgs
# Export as PNG (requires selenium and a browser driver)
export_png(p, filename="figure.png")
# Export as SVG
p.output_backend = "svg"
export_svgs(p, filename="figure.svg")
# Embed as standalone HTML
from bokeh.embed import file_html
from bokeh.resources import CDN
html = file_html(p, CDN, "Research Figure")
with open("figure.html", "w") as f:
f.write(html)