以HTML报表的形式执行和呈现笔记本。
reportsrender的Python项目详细描述
从Rmarkdown或jupyter笔记本生成可复制的报告
Reportsrender允许从 jupyter笔记本和Rmarkdown文件。它利用papermill 和Rmarkdown执行笔记本并使用 Pandoc将它们转换为HTML。在
- 功能:
- 两个执行引擎:papermill和Rmarkdown。在
- 支持jupytext支持的任何格式。在
- 创建可轻松共享的自包含HTML。在
- 隐藏单元格的输入和/或输出。在
- 参数化报告
请参阅documentation了解更多详细信息!在
入门
- 使用rmarkdown引擎将rmarkdown文档执行为HTML
reportsrender --engine=rmd my_notebook.Rmd report.html
- 使用papermill执行参数化jupyter笔记本
命令行中的用法
reportsrender Execute and render a jupyter/Rmarkdown notebook. The `index` subcommand generates an index html or markdown file that links to html documents. Usage: reportsrender <notebook> <out_file> [--cpus=<cpus>] [--params=<params>] [--engine=<engine>] reportsrender index [--index=<index_file>] [--title=<title>] [--] <html_files>... reportsrender --help Arguments and options: <notebook> Input notebook to be executed. Can be any format supported by jupytext. <out_file> Output HTML file. -h --help Show this screen. --cpus=<cpus> Number of CPUs to use for Numba/Numpy/OpenBLAS/MKL [default: 1] --params=<params> space-separated list of key-value pairs that will be passed to papermill/Rmarkdown. E.g. "input_file=dir/foo.txt output_file=dir2/bar.html" --engine=<engine> Engine to execute the notebook. [default: auto] Arguments and options of the `index` subcommand: <html_files> List of HTML files that will be included in the index. The tool will generate relative links from the index file to these files. --index=<index_file> Path to the index file that will be generated. Will be overwritten if exists. Will auto-detect markdown (.md) and HTML (.html) format based on the extension. [default: index.html] --title=<title> Headline of the index. [default: Index] Possible engines are: auto Use `rmd` engine for `*.Rmd` files, papermill otherwise. rmd Use `rmarkdown` to execute the notebook. Supports R and python (through reticulate) papermill Use `papermill` to execute the notebook. Works for every kernel available in the jupyter installation.
安装
Conda(推荐):
我推荐Python和srepender都依赖于这个包 通过conda安装它。 以下命令将在 当前环境:
conda install -c conda-forge grst::reportsrender
如果您不喜欢使用conda,可以按照以下方法操作:
手动安装:
获取依赖项:
- Python
- pandoc
对于Rmarkdown渲染引擎 (如果你不去,就不需要安装它们 要使用Rmarkdown渲染引擎,请执行以下操作:
- R和以下包装:
rmarkdown reticulate
然后
从pip安装:
pip install reportsrender
或者
从github安装:
pip install flit flit installfrom github:grst/reportsrender
- 项目
标签: