Project Organization STAT 133 Gaston Sanchez Department of - - PowerPoint PPT Presentation

project organization
SMART_READER_LITE
LIVE PREVIEW

Project Organization STAT 133 Gaston Sanchez Department of - - PowerPoint PPT Presentation

Project Organization STAT 133 Gaston Sanchez Department of Statistics, UCBerkeley gastonsanchez.com github.com/gastonstat Course web: gastonsanchez.com/stat133 Introduction 2 Things around a Research Project Typically ... There is


slide-1
SLIDE 1

Project Organization

STAT 133 Gaston Sanchez

Department of Statistics, UC–Berkeley gastonsanchez.com github.com/gastonstat Course web: gastonsanchez.com/stat133

slide-2
SLIDE 2

Introduction

2

slide-3
SLIDE 3

Things around a Research Project

Typically ...

◮ There is some interesting problem/phenomenon ◮ Giving raise to some research questions ◮ Data from experiments, surveys, observations, processes,

etc

◮ Data cleaning, transformation, processing ◮ Exploratory Analysis (summaries, tables, plots) ◮ Study associations, relationships ◮ Perhaps some data modeling ◮ Reporting: white papers, slides, articles, etc 3

slide-4
SLIDE 4

Organizing a Project

4

slide-5
SLIDE 5

Anatomy of a Project (basic)

project

code data images report resources README

Every project has its own directory

5

slide-6
SLIDE 6

Anatomy of a Project

Project Subdirectories

◮ README file: description of the project ◮ code: functions and scripts ◮ data: where the data files will live ◮ images (or figures): images, plots, figures ◮ report: final report, slides ◮ resources: articles, references, inspiring things 6

slide-7
SLIDE 7

Anatomy of a Project (more options)

project

code rawdata data images report resources README license

  • ther

7

slide-8
SLIDE 8

Anatomy of a Project

Project Subdirectories

◮ README file: description of the project ◮ code: functions and scripts ◮ rawdata: only raw data files ◮ data: clean data for analysis ◮ images (or figures): images, plots, figures ◮ report: final report, slides ◮ resources: articles, references, inspiring things ◮ license file: maybe you need a license ◮ other file: other required file? 8

slide-9
SLIDE 9

Anatomy of a Project

code directory

All your scripts, functions, programs go here

rawdata directory

To store original data files. DON’T touch this!

data directory

To store cleaned and processed data files. (these are the ones you use for your analysis, plots, etc)

9

slide-10
SLIDE 10

Anatomy of a Project

images directory

To store all your plots, charts, graphics, illustrations, etc (ideally produced from your code)

resources directory

References, papers, docs, supporting material, etc (things that have helped with your project)

report directory

Your final report: exec summary, document, slides, poster, etc

10

slide-11
SLIDE 11

Anatomy of a Project

README file

File describing what your project is about, and other important details (how are the files organized, authors, contact, etc)—It’s an About file.

License file

Perhaps your project needs a license e.g. http://creativecommons.org/

  • ther file / extra directory

For things that don’t fit in any of the previous files/directories

11

slide-12
SLIDE 12

Project Organization

Considerations

◮ Get use to organize your projects ◮ You can develop your own system:

– naming style, file-dirs structure

◮ Back your projects up

– e.g. Dropbox, github, cloud storage

◮ Check how other people organize their projects 12

slide-13
SLIDE 13

Sharing your Projects

Consider sharing your projects

◮ Dare to share! ◮ Writing Code (scripts, functions, etc) implies a lot of work ◮ Most of the time this work never sees the “screen light” ◮ In many cases is like writing papers ◮ Opportunity to give something back (you’ve benefitted

from others’ code)

◮ Free peer review ◮ Not as bad as it may seem/sound 13

slide-14
SLIDE 14

RStudio Projects

14

slide-15
SLIDE 15

RStudio Project

◮ You can use RStudio to organize a project ◮ RStudio allows you to create Projects ◮ Can be version-controlled ◮ Facilitates working with relative paths 15

slide-16
SLIDE 16

RStudio Project

Start a New Project

16

slide-17
SLIDE 17

RStudio Project

17

slide-18
SLIDE 18

RStudio Project

18

slide-19
SLIDE 19

RStudio Project

19

slide-20
SLIDE 20

RStudio Project

20

slide-21
SLIDE 21

RStudio Project

RStudio associates an .Rproj file to your Project

21

slide-22
SLIDE 22

RStudio Project

To close the Project go to the File menu bar and click Close Project

22

slide-23
SLIDE 23

RStudio Projects

Create an RStudio Project (you can use files of HW5)

◮ Add a subdirectory for the raw data ◮ Add a directory with the clean data sets ◮ Add an R script ◮ Add an Rmd file ◮ Knit the document (either as HTML or pdf) 23

slide-24
SLIDE 24

Shell for Windows

For those of you using Windows, you’ll need to install either:

◮ Git Bash

https://msysgit.github.io/

◮ PowerShell (part of the Windows Management

Framework 4.0)

https://www.microsoft.com/en-us/download/details.aspx?id=40855 24