Transcription of Introduction to Data Science Using R - darinchristensen.com
1 Introduction to data Science Using RVersion: April 4, 2018 Prof. Darin Christensen116341 Public Information Class Location & Schedule: Public Affairs2250; TR,5-6:15p Section Location & Schedule: Public Affairs4357; W,3-3:50p Office Hours: W,8:00-10:30a; F, by appointment. Course Website: Prerequisites: OverviewThere is a growing demand that public policy be data -driven. TheWhite House, to take a prominent example, appointed its first-everChief data Scientist in2015. While ten weeks isn t enough time toprepare you for that job, this class introduces you to a set of commonsteps that data scientists use to transform a spreadsheet into a usefuldescription or illustration.
2 We cover acquiring, cleaning, merging,managing, summarizing, and visualizing quantitative you re interested in effective datavisualization consider taking sArguing with tasks can be accomplished Using different software, this coursedemonstrates how to use R, a free and popular statistical GoalsThere are several goals for this course. By the end of the quarter, youshould be able to:1. Write down a recipe ( , a set of ordered steps) for transforming adataset into a table or figure that describes a pattern;2. Identify and apply functions/packages in R for accomplishing thesteps of this recipe;33 You won t be expected to memorizeevery R function, but rather identifysources for useful code snippets andunderstand how to adapt those Combine data from multiple (unrelated) sources; and4.
3 Apply best practices in writing code, including Using clear namingconventions, commenting steps, and avoiding repetition. Theseconventions help ensure that code is error-free and legible to ourcolleagues and future N T R O D U C T I O N T O D ATA S C I E N C E U S I N G R2An important disclaimer: like any new language, R is challeng-ing to learn, and you ll spend time fighting with the program. Inthose darker moments, try to remember two things. First, you arenot alone; your peers and I can both relate and also offer help whenyou re hitting a , remember that the first goal of this4 Our Piazza message board is a greatplace to post coding questions and getquick has nothing to do with R.
4 Writing down the recipe that trans-forms data into insights requires careful, ordered reasoning ( , algorithmic thinking ), not a specific piece of Participation(10%): There are several ways to participate in andoutside of class. I encourage you to raise questions and makecomments during our class meetings. In addition, I will rewardstudents for assisting peers during in-class group work, as well asposting questions or responses to our Piazza discussion board. Weekly Problem Sets(30%): These assignments serve two pur-poses. First, they allow you to apply the reasoning and codingskills we cover in class. Second, some problems will help you getstarted on your final project.
5 While there will not be much read-ing, you will need to set aside time for problem problem sets must be completed in R Markdown (discussedbelow). These assignments will be evaluated according to thefollowing scale:55I will post detailed solutions onlinebut cannot grade every problem. Pleasecome to office hours or schedule anappointment if you have any questions. X: complete X : submitted, but incomplete 0 : not submitted or less than half complete Midterm Exam(35%): The midterm exam offers an opportunityto assess your progress on the first two learning goals. As such,part of the exam will test your problem solving skills; anothercomponent will ask you to write R mid-term will be conducted during class time.
6 However, you can takethe exam from the location of your choice. You will need R to complete theexam. Final Project / Hackathon(25%): As a group of up to four stu-dents, you will write a quantitative report based on one of thedatasets listed below. As with other hackathons, this is a friendlycompetition between groups to squeeze insights out of the project will allow you to practice the real-world tasks of ma-nipulating, and analyzing quantitative data and clearly conveyingI N T R O D U C T I O N T O D ATA S C I E N C E U S I N G R3your approach and results. In addition to the written report, youwill (time permitting) briefly present your findings during the lastweek of class.
7 More detail about the format and rubric for the finalproject will be SubmissionsI don t want you to fall behind, so I will not accept late homeworkassignments. However, I understand that there are forces beyondyour control, so I will drop your lowest homework projects will be docked a letter grade for every day that theyare late. For example, an A project submitted in the first24hoursafter the deadline will receive an B. If that same project is submitted24to48hours after the deadline, the grade drops to a AccommodationsAcademic Accommodations. Students needing academic accommo-dations based on a disability should contact the Center for AccessibleEducation (CAE).
8 When possible, students should contact the CAEwithin the first two weeks of the term as reasonable notice is neededto coordinate accommodations. For more information IntegrityPlease review UCLA s rules related to academic integrity. If you refeeling overwhelmed or are unsure about the collaboration policy,please speak with me; don t risk violating the honor code. Unfortu-nately, past MPP students have been investigated and punished bythe Office of the Dean of Policy: Problem Sets: You can work with peers (in groups of four or less).However, you must write every line of code and text that appearsin any assignment that you submit.
9 In short, never copy code oruse other students words to describe your approach or results. Midterm Exam: This is an individual assessment that helps usidentify any knowledge gaps. I want to know what you know, sothere s no collaboration. Final Project: You will work with a partner on your final are responsible for ensuring that no written work is copied orsummarized from other sources without appropriate N T R O D U C T I O N T O D ATA S C I E N C E U S I N G HealthLet Public Policy s Student Affairs Officer (SAO) Annie Kim know ifyou are having academic or personal problems that affect your abilityto participate fully in your education.
10 If you feel comfortable, let meknow as Counseling and Psychological Services offers services andprograms in a confidential environment to promote mental healthand Bruin Resource Center s (BRC) Undocumented Student Programoffers caring and personalized support to undergraduate and gradu-ate undocumented if you are not undocumented, you may be able to get legalhelp for a family member. The USP office provides immigration legalservices to students and their family members through a partnershipwith the UC Undocumented Legal Services will need to acquire some softwarebeforethe first day of class: You will need to download and install R from this website: Use RStudio, which can be downloaded here: RStudio provides a nice in-terface for writing and executing R code and composing R Mark-down documents.