rmarkdown
jupytext
Our great sponsors
rmarkdown | jupytext | |
---|---|---|
38 | 20 | |
2,782 | 6,379 | |
0.9% | - | |
7.6 | 8.9 | |
23 days ago | 12 days ago | |
R | Python | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rmarkdown
-
Pandoc
I'm surprised to see no one has pointed out [RMarkdown + RStudio](https://rmarkdown.rstudio.com) as one way to immediately interface with Pandoc.
I used to write papers and slides in LaTeX (using vim, because who needs render previews), then eventually switched to Pandoc (also vim). I eventually discovered RMarkdown+RStudio. I was looking for a nice way to format a simple table and discovered that rmarkdown had nice extensions of basic markdown (this was many years ago so maybe that is incorporated into vanilla markdown/pandoc).
The RMarkdown page claims:
> R Markdown supports dozens of static and dynamic output formats including HTML, PDF, MS Word, Beamer, HTML5 slides, Tufte-style handouts, books, dashboards, shiny applications, scientific articles, websites, and more.
...which I think is largely due to using pandoc as the core generator.
RStudio shows you the pandoc command it runs to generate your document, which I've used to figure out the pandoc command I want to run when I've switched to using pandoc directly.
This is a bit of a "lazy" way to interact with pandoc. Maybe the "laziest" aspect: when I get a new computer, I can install the entire stack by installing Rstudio, then opening a new rmarkdown document. Rstudio asks whether I'd like to install all the necessary libraries -- click "yes" and that's it. Maybe that sounds silly but it used to be a lot of work to manage your LaTeX install. These days I greatly favor things that save me time, which seems to get more precious every year.
-
We’re Washington Post reporters who analyzed Google’s C4 data set to see which websites AI uses to make itself sound smarter. Ask us Anything!
We used R Markdown for cleaning and analysis, creating updateable web pages we could share with everyone involved. Similarweb’s categories were useful, but too niche for us. So we spent a lot of time recategorizing and redefining the groupings. We used the token count for each website — how many words or phrases — to measure it’s importance in the overall training data.
-
Generating PDF 📄 with Python 🐍
R Markdown / Quarto https://quarto.org/ https://rmarkdown.rstudio.com/ ; can dynamically generate a document and compile it to HTML, PDF, others
-
PYTHON CHARTS: the Python data visualization site with more than 500 different charts with reproducible code and color tools
Hi! At this moment I'm not opening the source code, but I can explain you the tech used. This site is based on another site I created before named https://r-charts.com/ and it was created with blogdown (HUGO + R Markdown). Hence, each tutorials is an R markdown file. For PYTHON CHARTS, in order to run Python within an R markdown file I had to use an R package named reticulate. In addition, the template depends on shuffle.js for filtering and fuse.js for searching
-
looking for an "low dependency" or pythonesque way to generate PDF's
What you want is not Python, its R Markdown; https://rmarkdown.rstudio.com/
-
LaTex alternative/replacement written in Rust?
not sure what you mean by this exactly but in my experience its far better to use Markdown + pandoc for stuff like this. Actually I use R Markdown which can compile to either HTML or PDF from the same source document, with executable code chunks embedded (to generate the document contents) ; https://rmarkdown.rstudio.com/
-
Neovim support for editing Quarto (.qmd) files
Quarto is a relatively new Markdown-based file format. One of its main uses is writing reports that interleave text with code and results; it supports rendering with knitr (an engine widely used in the R community) as well as Jupyter (more popular with Python users). Since I work in data science, I use both languages regularly. For writing R reports, I've switched from R Markdown (Quarto's R-focused predecessor) to Quarto. I'd also like to start writing Python reports in Quarto using Neovim.
-
How do you build and send reports to your users?
If you're not already aware of and using RMarkdown, make learning it a priority. I use both R and Python extensively. Although Jupyter Notebooks have utility, RMarkdown is the superior tool for the most flexibility in reporting.
- Ask HN: Markdown/reStructuredText to write a PhD thesis in STEM fields?
-
Securing R Markdown Documents
The polished package now supports Rmarkdown documents that use the shiny runtime. This includes flexdashboard!
jupytext
- The Jupyter+Git problem is now solved
-
Do you git commit jupyter notebooks?
Jupytext (https://github.com/mwouts/jupytext) has been designed exactly for this
-
The hatred towards jupyter notebooks
jupytext is your friend.
-
Edit notebooks in Google cloud
So if you run your own jupyter server, -jupy+text can be a great workflow : it takes your notebook synchronized with other formats (python file, makdown, ...), so you can edit your py/md file with neovim, and refresh the browser to execute the notebook.
-
Rant: Jupyter notebooks are trash.
Automatically convert ipynb files to py when saving them on JupyterLab
-
JupyterLite is a JupyterLab distribution that runs in the browser
The format is only partially invented, it follows Jupytext [0], but adds support for cell metadata. There is no obvious way to get that in fenced codeblocks, especially with the ability to spread it over multiple lines so it plays well with version control.
One more consideration is that it's not "Markdown with code blocks interspersed", one might as well use plaintext or AsciiDoc.
Of course there are tradeoffs.. I wish I had more time to work on it.
[0]: https://github.com/gzuidhof/starboard-notebook/blob/master/d...
-
Many write research papers in R Markdown - What is the alternative setup in Python?
Using jupytext (allows you to open .md files as notebooks) + jupyter gives you pretty much the same experience. The main issue is that the cell's output will be discarded. To fix it, you can use ploomber to generate an output HTML, so the workflow goes like this:
-
Jupyter Notebooks.
First, the format. The ipynb format does not play nicely with git since it stores the cell's source code and output in the same file. But Jupyter has built-in mechanisms to allow other formats to look like notebooks. For example, here's a library that allows you to store notebooks on a postgres database (I know this isn't practical, but it's a great example). To give more practical advice, jupytext allows you to open .py files as notebooks. So you can develop interactively but in the backend, you're storing .py files.
-
Ask HN: Are there any good Diff tools for Jupyter Notebooks?
You can use jupytext to maintain dual .py/.ipynb representation of notebooks and keep both versions in sync:
https://github.com/mwouts/jupytext/blob/main/docs/paired-not...
It works both ways, it can update the .py file each time you save the notebook, or you can edit the .py file and have the jupytext command line tool update the .ipynb.
What are some alternatives?
Pluto.jl - 🎈 Simple reactive notebooks for Julia
jupyter - An interface to communicate with Jupyter kernels.
sagemaker-run-notebook - Tools to run Jupyter notebooks as jobs in Amazon SageMaker - ad hoc, on a schedule, or in response to events
nbdev - Create delightful software with Jupyter Notebooks
papermill - 📚 Parameterize, execute, and analyze notebooks
here_here - I love the here package. Here's why.
nbdime - Tools for diffing and merging of Jupyter notebooks.
ploomber - The fastest ⚡️ way to build data pipelines. Develop iteratively, deploy anywhere. ☁️
vim-ipython-cell - Seamlessly run Python code in IPython from Vim
tinytex - A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live
jupyterlite - Wasm powered Jupyter running in the browser 💡
mercury - Convert Jupyter Notebooks to Web Apps