Microsoft Word ProgrammingAssignmentTwo_Instructions.docx
1
ProgrammingAssignment2
InteractiveHistogramswithD3.js
Background
Histogramisoneofthemostusedgraphsindataanalysis.Ithelpsmetoseethedistributionofdata.
Almostallvisualizationsystemsincludehistogramtools.
Objective
Inthisassignment,youwillbuildaninteractivehistogramtool.Figure1showswhatyourhistogram
shouldlooklike:
Figure1:AnexampleofHistogram
Thehistogramshouldincludethefollowing
xaxisandtextlabels
yaxisandnumericallabels
whilespacebetweenbars
Usually,histogramtoolsareinteractive,andallowsuserstomanipulatedataorthepresentationofdata.
Inthisassignment,youarerequiredtoprovideonesimplefunction:interactivesorting.
Thegoalissimple:userscanclickthetwoendsofbothaxestosortthehistogram:
ClickinganyplacelefttotheYaxistosortthehistogramwithanascending/adescendingorder
ontheYvalue.ClickingtheleftoftheYaxisagaintoreversetheorder.
ClickinganyplacebelowtheXaxistosortthehistogramwithanascending/adescendingorder
ontheXvalue.ClickingbelowtheXaxisisreversetheorder.
TheanimatedGIFfoundhereshowswhattheexpectedresultshouldlooklike:
http://zhang.ist.psu.edu/teaching/402/Assignments/HistogramResult.gif
2
Data
Thedatausedtocreatethehistogramcanbefoundinhistogramdata.tsvdocumentunderthefolderof
\up.ist.localCoursesSpring2017IST402ProgrammingAssignmentDataSetsAssignment2_Histogram.Download
thedatafileandsaveittoyourwebspace.
Delivery
InthedropboxonCANVAS,submittheURLtothewebpageonyourwebspace(my.up.ist.psu.edu/..).
Payattentiontwothings:
MakesuretheURLworks.
YourcanworkonyourHTMLdocumentbeforethesubmissiondeadline.Afterthedeadline,DO
NOTtouchtheHTMLdocumentofyourassignmentanymore.Otherwise,thedocumentwill
haveatimestampafterthedeadline.Anysubmissionwithatimestamplaterthanthedeadline
willnotbetreatedaslatesubmission,andwillnotbeaccepted.
Gradingrubrics(10pointstotal)
Histogramwillallrequiredcomponents(6points)
Bars(3points):correctheights(1),filledcolor(1),correctpositions(1)
Spacebetweenbars(1point)
Axes(1point)andAxislabels(1point)
Interactivity(3points)
Correctsortingresults(2points,0.5each)
Correctmouseclickinglocations(1point)
SufficientcommentsforJavaScriptstatements(1point)
Bonus(1point):addingtooltiptoeachbarsothatuserscanseebothxandyvalueswhenmouseis
overabar.
Reviews
There are no reviews yet.