Transcript
Page 1: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

CS100:Studio0Welcome!September4,2019

Instructions:WelcometoyourfirstCS100studio!Duringthisstudio,youwilltake

careofvariousadministrativenecessities,togetyoureadyforan

excitingandproductivesemester.Forexample,youwillbeginby

signingthecourseCollaborationPolicy.Youwillalsogetstartedwith

Markdown,atoolforcreatingdocumentsthatcanbeconvertedinto

webpages,pdfs,etc…

YouwillcompletemoststudiosinacomputerlabintheCIT,withyour

fellowclassmates.Forthisstudioonly,youcan/shoulddomostofyour

workindependently,andthenvisittheCS100TAsduringofficehoursto

introduceyourselvestothem,andgetcreditforcompletingthisstudio.

Theycanalsohelpyouwiththevariousstudiotasks,asnecessary.

TofindoutwhenTAhoursareheldeachweek,youcanchecktheTA

hourshere.Thisweek(only),theTAswillbeholdingextrahourson

Monday,soyouwillhaveplentyofopportunitiestostopby.

ObjectivesBytheendofthisstudio,youwillhave:

Page 2: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

ReadandsignedacopyofthecourseCollaborationPolicy

JoinedthecourseonPiazza

Learnedaboutpairprogramming

LearnedsomeMarkdown

Hadfunsearchingfordata

InstalledRandRStudio

CollaborationPolicyReadandsignthecoursecollaborationpolicy.

Youmustsubmitthisformtoreceivecreditforthisstudio.

PiazzaPleasesignupforourcourseonPiazza.Throughoutthesemester,you

canpostanyquestionsyouhaveaboutthecourseonPiazza,andaTA

willreply.Feelfreetogiveitatrynow:Ifyouhaveafavoritedata

visualization(orcanfindacoolonequickly),postitasanoteandtagit

studio0 .

PairprogrammingDuringfuturestudiosessions,wewillbe“pairprogramming,”meaning

thattwostudentswillbeworkingtogethertocompletethetasks.Toget

abetterunderstandingofwhattoexpect,pleasereadthispair

programmingguide.NotethatAmycompiledthisguideoveradecade

ago,whenshestartingteachingCS17/18.

Page 3: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Onceyouhavefinished,pleaseanswertheseTrueorFalsequestions.

Youcanjotyouranswersdownonapieceofpaper,ortypethemintoa

textfile.Beforeyouleavestudiotoday,youwillneedtohavethem

checkedoffbyaTA.

1. Onestudentshouldbeinchargeoftypingfortheentireduration

ofastudiosession.

2. Pairprogrammingisadivide-and-conquerstrategy,inwhich

eachstudentworksonadifferentpartoftheassignment.

3. Pairprogramminghelpsstudentslearnmoreandwritebetter

code.

4. Itisimportanttocommunicaterespectfullywhilepair

programming.

MarkdownTutorialsAllCS100documents,includingthisone,arewritteninMarkdown,a

simplelanguageforeasilygeneratingwebpages,pdfs,etc.Inafew

weeks,wewillrequirethatyourhandinsbegeneratedfromMarkdown,

specificallyRMarkdown.Toprepare,youshouldcompletelessons1-7of

thisMarkdowntutorial.

Funfindingdata!Atsomepointsoon,youwillfindyourselfsearchingfordata,sowe’re

goingtopracticenow.

Electronicdataarestoredinvariousformats,includingCSV,meaning

Page 4: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

comma-separatedvalues,andTSV,meaningtab-separatedvalues.

GooglecanhelpyousearchforCSV(orTSV)files.Yousimplyappend

thefiletypeofinteresttotheendofyourquery,asfollows:

+filetype:csv .

Forexample,searchingfor SouthAfrica+filetype:csv produces

CSVfilesmentioningSouthAfrica:

FindaCSVorTSVfileonatopicyouareinterestedin.Onceyou’ve

foundsomething,postitonPiazzaandcommentonwhyyoufindthe

datainteresting.(Asabove,tagyourpost studio0 .)Wearealwayson

thehuntforinterestingdata,soyouneverknow…yourfilemight

reappearlateronascoursematerial!

Page 5: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

SoftwareInstallationsonaLaptopAllofthenecessarysoftwareforthecoursecanbeaccessedon

computersintheCIT.(Inadditiontotheroomswherewewillbeholding

studio—CIT201andCIT167,a.k.a.theMSLab—youmayalsousethe

computersintheSunlab,whichisthelargeroomfullofcomputerson

thefirstflooroftheCIT.)Youmayalsochoosetoworkonyour

assignmentsusingapersonallaptop.Toinstallthenecessarysoftware

onalaptop,pleasefollowtheinstructionsbelow.

Atthestartofthecourse,we’llbeusingGoogleSheets.Sheetscomes

withyourBrownGoogleaccount,soyoushouldbeabletoaccessit

directlyfromyourGoogleDrive.Visitdrive.google.com,andclickon

New ,andselect GoogleSheets .

Afewweeksintothecourse,wewilladdtwofurthertoolstoourtoolkit:

R,aprogramminglanguagetailoredtostatisticsandvisualizations,and

RStudio,adevelopmentenvironmentforRprograms.Toinstallthis

software,followtheseinstructions:

SettingupR:1. TodownloadR,visitthislink

Page 6: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

2. IfyouareusingaWindowscomputerdownloadRforWindows,

ifyouareusingaMacdownloadRfor(Mac)OSX.

Windows:Clickon installRforthefirsttime ,andthenfollowthe

downloadinstructions:

Mac:TherearemultipleRpackagesforMacs,dependingonyourinstallation

Page 7: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

(OSX10.11(ElCapitan)andhigher,MacOSX10.9(Mavericks),etc.).

SelectthecorrectRpackageforyoursystem,andthenfollowthe

downloadinstructions:

OnceyouhavedownloadedR,youcanmoveontoinstallingRStudio.

SettingupRStudio:InCS100,weuseRStudiotowriteRprograms—alsocalledscripts—and

toviewtheiroutput(often,datavisualizations).RStudioisanIDEforR.

IDEstandsfor"integrateddevelopmentenvironment,”whichisan

applicationthatfacilitateswritingandexecutingofcode.

GototheRStudiowebsite.Scrolldownasnecessaryuntilyoucanclick

Page 8: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

on“DownloadRStudioDesktop”.Thislinkwilltakeyoutoatableof

differentproducts.YoushoulddownloadthefirstRStudioDesktop

product,becauseitisfree!

Onceyouclickonthedownloadlink,the .exe fileforRStudioshould

begindownloading.Clickthedownloaded .exe fileandfollowthe

directionsontheRStudiosetupguide.

Clicknexttocontinuewhentheinstallwizardopens.

Page 9: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Clicknexttoacceptthedefaultinstalllocation.

Page 10: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

Laststep!Click Install toacceptthedefaultstartmenufolderand

installRStudio!

Click Finish toclosethewizard.

OnceRStudioisinstalled,openituptomakesureitwascorrectly

installed.Youshouldseeafewpanelsonyourscreen.Theoneonthe

bottomleftiscalledtheconsole.IfyoutypeRcodeintotheconsole,

andthenhitenter,RStudiowillrunyourcode,anddisplaytheresults.

Asasimpletest,enterthislineofcodeintotheconsole,andseewhat

happens:

Page 11: CS100: Studio 0 - Brown Universitycs.brown.edu/courses/cs100/studios/studio0.pdf · 2019. 9. 6. · CS100: Studio 0 Welcome! September 4, 2019 Instructions: Welcome to your first

print("Welcometotheworldofdata!")

EndofStudioCongratulations!You’vecompletedyourfirstCS100studio.Youarenow

ingoodshapetocompletefuture,moreinteresting,assignments.

PleasegotoTAhourssothataTAcancheckyourwork.Youmustget

checkedofftogetcreditforcompletingthisstudio.


Recommended