title: How to mass produce reports with jupyter notebooks?
body: <p>I have a jupyter notebook that produce a report. The report is a univariate analysis of a given variable of a big database (hundreds of variables millions of lines). </p>
  
  <p>The structure of my notebook is as follow :</p>
  
  <p>report.ipynb</p>
  
  <pre><code>read database
  variable_of_interest = 'var1'
  plots &amp; html tables for 'var1'
  </code></pre>
  
  <p>I have been able to convert the notebook to a html file with nb convert from the console (but not from the notebook) and hide the code cells.</p>
  
  <p>I would be interested in mass producing this report for all my variables : 'var1' ... 'varn'. I encouter some difficulties, mainly about building a loop that would change the variable of interest in a given notebook, then run it and convert it. (My first approach was to make the notebook update the variable name each time I execute it, but i still need some sort of loop to run it multiple time, and it is not very practical to handle specific variables). </p>
  
  <p>To be more precise I need to :</p>
  
  <ul>
  <li>loop on all my variables names</li>
  <li>read the data once (or read only the variable in the loop ?)</li>
  <li>run the report for each variable (and produce plots &amp; tables)</li>
  <li>convert the report to html with the name of 'report_vari.html', maybe in a specific folder 'report'</li>
  <li>continue running the loop in case of an error in one of the report</li>
  </ul>
  
  <p>What would be the course of action to run this kind of loop, running a .py script from the console or another notebook ? What would it looks like ?</p>