canonical - UBC Physics & Astronomy | UBC Physics & Astronomy
UBC STAT545 2014 Cm002 deep thoughts
-
Upload
jennifer-bryan -
Category
Data & Analytics
-
view
1.700 -
download
1
description
Transcript of UBC STAT545 2014 Cm002 deep thoughts
STAT 545A Class meeting 002
Deep thoughts re: data analytic work + Getting started with R and RStudio
web companion: STAT 545 web home > Syllabus > cm002
Monday, September 8, 2014
Dr. Jennifer (Jenny) BryanDepartment of Statistics and Michael Smith LaboratoriesUniversity of British Columbia
[email protected]://github.com/jennybchttp://www.stat.ubc.ca/~jenny/@JennyBryan ← personal, professional Twitter
https://github.com/STAT545-UBChttp://stat545-ubc.github.io@STAT545 ← Twitter as lead instructor of this course
Deep
Thoughts
about data analytic work
get better at typing
tough love:
typos mattercase mattersth_is is different from th-isspaces in filenames are EVIL
want computer to do tedious work for you?then you must give precise instructions
A place for everything,everything in its place.
Benjamin Franklin
“The source code is real. The objects are realizations of the source code. Source for EVERY user modified object is placed in a particular directory or directories, for later editing and retrieval.”
-- from the Emacs Speaks Statistics (ESS) manual
source is real
write code for humans, write data for computers
Vince Buffalo
data written for humans ...
http://cdec.water.ca.gov/cgi-progs/reports/PRECIPOUT.2011
... is hard to explain to a computerhttp://nbviewer.ipython.org/github/abostroem/2014-09-10-LBL/blob/master/pandas/load_precip_data.ipynb
h/t @jiffyclub
code written (only) for computers ...
... creates misery for humans
Names matter
myabstract.docxJoe’s Filenames Use Spaces and Punctuation.xlsxfigure 1.pngfig 2.pngJW7d^(2sl@deletethisandyourcareerisoverWx2*.txt
NO
2014-06-08_abstract-for-sla.docxjoes-filenames-are-getting-better.xlsxfig01_scatterplot-talk-length-vs-interest.pngfig02_histogram-talk-attendance.png1986-01-28_raw-data-from-challenger-o-rings.txt
YES
minimize the creation of data excerpts and copies ...
... they will just confuse you later
reshape your data
where is the file or executable you need?
what is your working directory?
Oops, I see a small mistake right there.
Do you mind going back to fix that?
If the thought of re-running your analysis makes you ill ...
... you’re not doing it right
Deep
Thoughts
about data analytic work
switch to live coding ...
see web companion for indicative content:STAT 545 web home > Syllabus > cm002
Students with R/RStudio experience were encouraged to contribute something to the “Learn R” world.Suggestion: use, review, extend swirl (see next slide).
you do know that R ≠ RStudio, right?
we use RStudio because it makes us happier in our work, but notice that nothing we produce -- no code, no figures, nothing -- requires RStudio to be created, appreciated or reused
this is important
this is intentional
photos
Deep Thoughts, tree, mist, sunLoco Steve, Goldie Dawnhttp://www.flickr.com/photos/36989019@N08/5546134597/
Messy beer canshttp://www.schiesshouse.com/dontdothis.htm
Hanging beer canshttp://www.beastpieces.com/2009/07/its-superior/
Messy computer desktophttps://www.flickr.com/photos/jeanbaptisteparis/724619122/in/photolist-272S29-auRiXZ
Triflehttp://assets.cougar.nineentertainmentco.com.au/Assets/GourmetTraveller/2013/05/09/8837/1209gtpmtrifle-628.jpg
Trifle recipehttp://www.gourmettraveller.com.au/recipes/print-recipe/?id=8837
Winner of 2004 Obfuscated C code competitionhttp://m.eet.com/media/1076421/1106esdGanssle01.gif
Cheers “Where Everybody Knows Your Name”http://cheersboston.blogspot.ca
PC vs Machttp://www.frumsatire.net/2009/03/14/mac-vs-pc/
You can’t get there from herehttp://cstacalicious.ning.com/photo/liss-platt-still-from-you-can-t-get-there-from-here-2005-8?context=latest
Hand-crafted basket woven chairhttp://www.visitscotland.com/cms-images/2x1/regions/orkney/hand-crafted-furniture