First of all, I’m not familiar with the Python language, so I’m going to focus on the R language.
For data handling with R and sql, you can take a look at the package RSQLite
which is particularly well done.
Whereas you do the manipulation of data and graphics on R
and the report via LaTeX
, here are some options to perform the analyses, graphs and report automatically and reproducible:
1. R and Latex integrated by a makefile
make
is a way to automate processes that you would do by hand on your system. In your example, you would codify a Makefile script to first run the R/python scribe for analysis, then run the R script to create the charts and save to a folder and then run the Latex script to create the report using the outputs of previous scripts.
Positive: complete flexibility for each step taken and good organization of each project script.
Negative: Makefile is a little hard to create and is native to the linux and iOS systems. I don’t know how it works on Windows.
2. R and Latex integrated by Sweave
Sweave
is an extension .Rnw
of knitr
which allows you to embed R code in Latex documents to generate a PDF file. In summary, you write the report in latex and for each analysis/graph, you enter the code R.
Positive: flexible and easy to use if you know Latex
Negative: I have the impression that there are few users compared to Rmarkdown
, which makes it a little harder to solve problems online.
3. R and Latex integrated by Rmarkdown
Rmarkdown
is an R package that allows you to embed R code into markdown documents. It has virtually the same approach as Sweave
, only more flexible because it allows exporting to several extensions (pdf, html, word...).
Positive: More friendly and simple to learn if you don’t know Latex. In addition to the cleaner syntax.
Negative: The report formatting is not as flexible as Latex. But the interesting thing is that you can incorporate Latex or html styles into the document.
In conclusion, I personally believe that Rmarkdown
will be the easiest and fastest way to accomplish your goals.
This question is very biased to be closed, because almost everything depends on opinions. Giving mine: Create the Graphics and save in EPS: Latex likes EPS.
– Guto
I think you can do what you want with jupyter, rmarkdown, sweave or org-mode of Emacs. Probably others I don’t know. Do a better search, see which one is best for your case and rephrase the question more specifically. As it stands, it’s very open.
– Marcos Banik
@Marcosbanik, I’m quite layman in latex, I decided to venture into it yesterday and I broke my head a lot, I needed more of an orientation and I think the question played its part. I will study more focused now with the guidelines provided here.
– macchi