Code Monkey home page Code Monkey logo

capitalin21stcenturyinr's People

Contributors

bschousek avatar dfornika avatar econaut avatar hcorrada avatar jtleek avatar mmatkinson avatar muschellij2 avatar nellore avatar ptoche avatar rmdk avatar swihart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capitalin21stcenturyinr's Issues

About organizing the code and naming conventions

Hi,

I'm in the process of creating beamer slides for Piketty's book.

https://github.com/ptoche/capitalIn21stCenturyinR

To begin with, I am going to replicate the powerpoint slides Piketty used at a Sao Paulo presentation in December 2014 (because they are the latest slides I found). I have just completed the short version. In the process, I have refactored some of the code. However, I would welcome suggestions about best practice so that my code may be subsequently merged into the main project.

  1. The data is defined in the preamble of the ".Rnw" document, which is the master file for the 'Slides' project. I have named dataframes used to produce the book figures according to the figure number in the book, e.g. df15.1 for the dataframe used to produce figure 15.1. Sometimes the data comes from a worksheet labeled TS15.1 in the original excel files, but sometimes it comes from a different sheet, because the same sheet might be used to produce several figures and/or because something is unclear in the naming scheme used by Piketty in his worksheets. For this reason, when I first load the data I name the dataframe ts15.1 and later change it to df15.1 or df15.2, etc. as the case may be.
  2. I have not used too many special functions to produce the plots because I think that to be most useful it should be reasonably easy for anyone to cut/paste the code for a single figure. There are 2 exceptions to this: a shapePalette and a colorPalette which I define in the preamble. I have also defined a black and white scheme to produce figures quite close to the original book style.
  3. In this incarnation of my code-in-progress, I am producing the graphics on the fly as the beamer is produced. In a later refactoring, it may be desirable to produce all the graphics by Chapter, as the current repository does, and simply use includegraphics in the beamer presentation, pointing to the location of the figures in the book repository.
  4. Once all the book figures have been produced in a consistent way and dataframes named in an intuitive way, e.g. df15.1, I would save the dataframes in a .rda file. And perhaps create a 'piketty' package with the stored data.

Any advice/suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.