refactored the code and added figures

1. kept data in long form with names ‘variable’ and ‘value’, as much as
possible
2. moved several figure options into the chunk_set at the start of the
document
3. introduced the use of \includeonlyframes to select the slides to
display
4. added figures
5. cleaned up some of the code to make it shorter