Data Visualization (DSC 530/CIS 602-01)

Transcription

Data Visualization (DSC 530/CIS 602-01)Trees & Geospatial DataDr. David KoopD. Koop, DSC 530, Spring 2016

Arrange TablesArrange TablesExpress ValuesSeparate, Order, Align RegionsSeparateOrderAlign1 KeyList2 KeysMatrix3 KeysVolumeMany KeysRecursive SubdivisionAxis OrientationRectilinearParallelRadialLayout DensityDenseSpace-Filling[Munzner (ill. Maguire), 2014]D. Koop, DSC 530, Spring 20162

SPLOMs and Parallel CoordinatesScatterplot MatrixParallel zner (ill. Maguire), 2014]D. Koop, DSC 530, Spring 20163

The main difficulty of directly applying parallel coordntheirandmethod.extents Moreof clusters withof varyingtranslulargebandsdata setsis that thelevel of clutter present in the visuable, it is difficult toreduces the amount of useful information one can perceOverdraw in Parallelexample, Coordinatesthe display of a mass of overlapping lines precque for hierarchicalperception of relative densities present in the data set (serallelCoordinatese-map idea[24] by2: Parallelcoo2). Our approach reduces the amountFigureof clutterby imposinssimilarity measure.a 5-dimensional dataustering results, andover-plotting precludmilarity value.tions or anomalies.found in the abovedata at multiple resarchical organizationdering limitation ofof the data at differeechniques. We alsodynamically navigatitter. However, ratherdetail in the followinines, we use data agusters, and show theof varying translu-4 OverviewdinatesParallel coordinates of Detroitset: a 7-display of a Remote SensingFigurehomicide2: Paralleldatacoordinates[Fua et al.,1999]Exploratorydataanalnal data set with 13 records.a 5-dimensionalNotice that therearesetinversedatawith 16,384 records. Note eptionofanydatatrends,Koop, DSC 530, Spring 2016

Arrange Networks and TreesArrange Networks and TreesNode–Link DiagramsConnection MarksNETWORKSTREESAdjacency MatrixDerived TableNETWORKSTREESEnclosureContainment MarksNETWORKSTREES[Munzner (ill. Maguire), 2014]D. Koop, DSC 530, Spring 20165

Web Sites as Graphs (amazon.com)[M. Salathe, 2006]D. Koop, DSC 530, Spring 20166

Arc Diagram[D. Eppstein, 2013]D. Koop, DSC 530, Spring 20167

Force-Directed Layout Nodes push away from each otherbut edges are springs that pull themtogether Weakness: nondeterminism,algorithm may produce differenceresults each time it runs[M. Bostock, 2012]D. Koop, DSC 530, Spring 20168

sfdp[Hu, 2005]D. Koop, DSC 530, Spring 20169

Adjacency Matrices[McGuffin]D. Koop, DSC 530, Spring 201610

Node-Link or Adjacency Matrix? Empirical study: For most tasks, node-link is better for small graphsand adjacency better for large graphs Multi-link paths are hard with adjacency matrices Immediate connectivity or neighbors are ok, estimating size (nodes& edges also ok) People tend to be more familiar with node-link diagrams Link density is a problem with node-link but not with adjacencymatricesD. Koop, DSC 530, Spring 201611

Assignment 2 www.cis.umassd.edu/ dkoop/dsc530/assignment2.html Use D3! 2016 Campaign Finance Data- Changes from mid- to end-2015- Including SuperPAC receipts- Extra Credit: Transitions Cheating Questions?D. Koop, DSC 530, Spring 201612

Arrange Networks and TreesArrange Networks and TreesNode–Link DiagramsConnection MarksNETWORKSTREESAdjacency MatrixDerived TableNETWORKSTREESEnclosureContainment MarksNETWORKSTREES[Munzner (ill. Maguire), 2014]D. Koop, DSC 530, Spring 201613

Trees Trees are directed acyclic graphs- each edge has a direction: the origin is the parent, the destinationis the child- cannot get back to a node after leaving it A tree has a root (every other node hangs off it) Can consider enclosure in trees using parent-child relationshipsD. Koop, DSC 530, Spring 201614

fair comparison of them. Space-efficiency might be described in termsof area, aspect ratio, label size, or other measures. However, there is noaccepted standard set of metrics for evaluating the space-efficiency oftree representations, and it is unclear what approach would be generalenough to be applied to all the forms in Figure 1.article shows ththat there is moTreemaps arbecause they hwhat we call acated more or lpopulation, or ntitioning can beindeed desirablFigure 2 showstioning of area,borders of nodeFurthermorethe relative sizeeffect is that laare more intererelative sizes, aeach leaf nodeof nodes. (Althaugmented to nterms of label sable, but evenbels, suggestinrepresentation mClearly, it wtinguish2010]the fou[McGuffin and Robert,tive scalabilityFig.Spring1. Several15D. Koop, DSC 530,2016basic kinds of tree representations, here each showing metric of spaceTree Visualizations

Node-Link DiagramIEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. SE-7, NO. 2, MARCH 1981 Trees are graphs223Tidier Drawings of TreesEDWARD M. REINGOLD AND JOHN S. TILFORD but we have more structure Horizontal or verticalAbstract-Various algorithms have been proposed for producing tidydrawings of trees-drawings that are aesthetically pleasing and use minimum drawing space. We show that these algorithms contain somedifficulties that lead to aesthetically unpleasing, wider than necessarydrawings. We then present a new algorithm with comparable time andstorage requirements that produces tidier drawings. Generalizationsto forests and m-ary trees are discussed, as are some problems in discretization when alphanumeric output devices are used. Idea 1: partition space for eachnode via recursion Idea 2: “Tidy” Drawing- Wetherell & Shannon: Don’t wastespace (overlapping parent nodesINTRODUCTIONis ok)IN a recent article [6], Wetherell and Shannon presented algoIndex Terns-Data structures, trees, tree structures.rithms for producing "tidy" drawings of trees-drawingsandspaceTilford:- Reingoldas possible Keepthat use as littlewhile satisfying certainaesthetics. The basic task is the assignment of x and y cosymmetry,looka straightforwardwhichsimilarordinates to eachsubtreesnode of a tree, afterplotting or printing routine generates a drawing of the tree.Wetherell and Shannon give three aesthetics in an attempt todefine a "tidy" drawing of a binary tree.Aesthetic 1: Nodes at the same level of the tree should liealong a straight line, and the straight lines defining the levelsshould be parallel.A left sonAestheticshould be positioned to the left ofD. Koop, DSC530,2:Spring2016Fig. 1. Final positioning of example tree as drawn by Algorithm WS.of the next available position on each level with an arrayNEXT POS, indexed by level, in which each value is set to twoAlg.,ReingoldandTilford,1981]than thegreater [WScoordinateof the lastnodeassigned onthecorresponding level.If a provisional position is less than the next available posi- 16tion on that level, the node is given the next available position,

Reingold-Tilford Algorithm Recurse on left and right subtrees224IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. SE-7, NO. 2, MARCH 1981 Shift subtree over as long as itdoesn’t overlap Place parent centered above thesubtrees Originally, only binary trees,extended by WalkerFig. 4. A tree and its mirror image positioned by Algorithm WS.Fig. 2. Example tree as drawn by Algorithm TR.[Reingold and Tilford, 1981]D. Koop, DSC 530, Spring 201617

Icicle Plot Line marks Vertical position shows depth Horizontal position shows links andsibling order Scalability: 1 pixel leaves, butharder to label[Bostock, 2011]D. Koop, DSC 530, Spring 201618

Radial Node-Link Use polar coordinates instead of xorwhereDi Fsp ilD la teCo ate ys rAr lor sra sTiysSc meSale caTyp leQuantit RootSScaleeQua ativeS calecnOrdintileScaalealSc lealeLogLinearSScalecaleIScaleMapscaerylequeod appNiHeaHe accnboiFutiD. Koop, DSC 530, Spring 2016teernv roers xtC ertrte Te nvve ited LCo rter rneCoelimphM onv verteD ra taC onG a NCIDSOJrr ntne Eveoinsit tioan siTr raneenT we rsTe rt l d anvaFie hemoc at ScD ata Set ceD ata ourD ataS bleD ataTa ilD taUtDaeSpritDirtySpriteLine hysicsIForceNBoPart dyForceSimuicleSp latioSprring ningForceAAnggregateAri dExpA thresB ve mesioC in rag ticnCo omaryE eCo m pa xpD u p ris reat n os o sseU t ite n ionExtilpressionadded ragan e t tav un ncco istid ivdr eqtofn trag tengfct io Itein s nifst res sioisaDi xp resltE xplte xEmainFnm odIf A alIs rm leLit atch ummuqM axim dsne tM thonomeinimumor erbyM tord eNorangOr ryselectQue ceettePal tteSizeePalelettep aeSha PPalettlortrixaCoM trixrse IMaatrixaSpeMnsDeeaxissStringtsSta rtSo speShapertyPro alettenp atio sent athOri M mathyoxPr ate elue edic abl apaIV IPr alu he eAxisGridLiAxisAxesimatealizLSe To atio eglec olt nE enidpDation Ev ventaEEv ent tTreeeB ven ntSctuilaledeB Tr rNo reindineeEd deS nde gevenDa geSpprite rta ritsDatSpriteteaListDataTdatSeleooltipCoaPanZ ctionConntroloomC trolontrolHove trolListlControlClickControlAnchorControlpeEd IRRendge en erArrRenddereerow ere rTyp rchicalC ctureMergeEdg lusteregraphBetweeLinkD nuEasStpann tPathF siningT sre ein unc gAspIScterp tionSectRPa he ola equatioArBrPa ra du teeaanknce Col yIntll lSerD or erS c us el ableIntateInInterppolatoTr eq hed eMa erpo terp olat ran ue uleoroN tr lsi nc rtio eO um ixIn ato latorP bj be te rnReointectIn rInterpolacta Int ter rpo torng erp pol latoleI ola ato rnte tor rrpolator Benefit: space usage, dAreaLayouOprSequencisetRandomLayoutyout OperatoOperatorL LinkTLa uttionayouttaliza torudTreeLVisu operaIndente reeLayo ckin ayouelaLbrPelealCircle CircgeRoutouttorayEdera erdled AxisLOprltIefilBunabe ereaL bel rdAr lLa eleercke R a d i a L a brodStailte rnceityF iltenibil eF terVis nc Filtioeorista reeerhD eTist ang mod rdap eync de rGr FishR IteeE nco de rnd ndSiz eE co de rnge geap E co deyShpert En nco onLe LeEti noor tio nPrlorist tor tioCoeD is torey D DislshFicafoBi Same layout algorithms work(e.g. Reingold-Tilford)[Bostock, 2012]19

ayoutLayutayoeeLouteTrLay ttedyo uirecLaeDingckramPaeLaylaeTPropreeFertilteEn yEco ncrde odr erDisBifoc FishlIcicndCiAx Intuitive navigationcForDecleCir Reading labels?reeLayRadialTNode Icicle plot in a radial suaD. Koop, DSC 530, Spring ingsisaxSh a p eltro lon ntroCopioltnCTo romGethsMaDacoDLisata[Heer et al., 2012]20

Nested Circles Looks more like cluster diagram,but shows hierarchyTransi TweenEasingColor SizPa Sha Containment shown by the layeringof semi-transparent circlesFunctPara TrP ISSchedSequeTransitioPo ObInterpArr Da Nu MatRec olorsSpaCompGr SimulaSp I DrSpr ParIMa DenStringsJSOC IDDaGraphMDDDat DatEnco ColSh SiPropLabeleSta RadiTextSpLi RectShort LinkDTreeMaDendSpa BetwMaxFloAgglAspecHiera MCommNodeLinIcicRadialTCirclePVisualizPanZHoveAncI Co ContExpClicISc ScLi Ro ScalQuaLog OrdiLayoutIndBundRa Pie AxisLCircleSelectBifoOpeOpeIO SorFishOperOper Gra VisiQuanStackeAxisDat SeVi ToDistoFisTimeSForceDCarte AxAALege LegendQueryFlarDatLegendExprn l ds a osuoem wag vmcm xs and s iml g fi rDirtySDeli Labeling becomes more difficultMatc CompExprNo LiVaRa M MFnXoStriCSAg AvDi Or An BinDate Va IsA IfAritStatsOr IVHe FibonaI IFil PropeDataDraTooltiShaEdgeR I ADataListTreeBuEdg TreeNodeSpritDataSpScaleBi[Bostock, 2012]D. Koop, DSC 530, Spring 201621

Indented Outline Like a filesystem tree Use horizontal position to showdepth, vertical positions showsibling/orderD. Koop, DSC 530, Spring 201622

leLineSprite nsitioner SelectionEvent LegendRangeDataEventDirtySprite ce nsitionInterpolatorClickControl tOr And ExpressionRangeVariance IsASortDatesArraysIfColors EdgeSprite TreeFisheyeTreeFilter ut cciHeapArithmeticDataUtil DataSourceStringUtilDataSprite endrogramLayoutPaletteselect xorwherecountstddevadd eq div ltupdatenotShapePalettesumColorPaletteorderbyfn neq gt lte gteminormaxComparisonisa subandSizePaletteaveragemul iff stStringsDataIcicleTreeLayout emap[Bostock, 2012]click or option-click to descend or ascendSizeD. Koop, DSC 530, Spring 201623

Treemap Containment marks instead of connection marks At each step, orientation of division (horiz/vert) changes Encodes some attribute of the items as the size of the rectangles Not as easy to see the intermediate rectangles Scalability: millions of leaf nodes and links possible Canonical example: Disk inventoryD. Koop, DSC 530, Spring 201624

Disk Inventory[Disk Inventory X: http://www.derlien.com]D. Koop, DSC 530, Spring 201625

each cross section y C. Subdivision along the y-axis isdone similarly, here the ridge 1z that is added is:Improving Treemaps (Cushion)1z(x, y) 4hy2y1y1 )(y2(yy).(3)valuefor h foreach level of the tree gives a selftosamefindthehierarchy Leaves are ok, but it can be difficult Thesimilar surface. A decreasing value for h is useful to emphasize the global structure of the tree. A convenient solution isto use:hi f i h(4) Encode this as shading information More effective to understand hierarchywhere his the actual value of h at level i , and f a scale factor between 0 and 1.Figure 4. Binary subdivision of intervalD.intervals. Next, we repeat this step recursively. To each newsub-interval we add a bump again, with the same shape buthalf of the size of the previous one. If we do this for threelevels, the results are eight segments and the top-most curvein figure 4. If we interpret this curve as a side view of a bentstrip, and render it as viewed from above, the bumps transform into a sequence of ridges. The separate segments areclearly visible, each is bounded by the sharp discontinuitiesin the shading. Furthermore, also the binary tree structure isclearly visible, because the depth of the valleys between thesegments is proportional to the distance between segmentsin the Figuretree.4. Binary subdivision of intervalWe can generalize this idea to the two-dimensional case.Suppose that the x-axis is horizontal, the y-axis is vertical,intervals.Next,we pointsrepeat towardsthis steptherecursively.newand that thez-axisviewer. IfToweeachsubdisub-intervalwe addinathebumpagain, withthe ridgessame shapevide the rectanglex-direction,we addalignedbutwithoftheandvice versasubdivisionin thehalfthey-direction,sizeof thepreviousone. forIf wedo this forthreeKoop,DSC530,Spring2016y-direction.As aareresult,cushionsareandgenerated:The sumlevels,the resultseightsegmentsthe top-mostcurveieach cross section y C. Subdivision along the y-axis isdone similarly, here the ridge 1z that is added is:1z(x, y) 4hy2y1(yy1 )(y2y).(3)The same value for h for each level of the tree gives a selfsimilar surface. A decreasing value for h is useful to emphasize the global structure of the tree. A convenient solution isto use:hi f i h(4)where h i is the actual value of h at level i , and f a scale factor between 0 and 1.Figure 5. Cushion treemap, h 0.5, f 1[van ofWijkand vande model,Wetering,For the shadingthe geometrya simplei.e. diffuse reflection, suffices [5]. The normal follows from: [1, 0, @z/@ x] [0, 1, @z/@y]1999]26

Improving Treemaps (Squarified) Switching from horizontal to vertical cuts may be ok for nicelybehaved trees, but can lead to bad aspect ratios Problem: harder to compare sizes, more difficult to select/mouseover the rectangles Solution: Choose divisions (x/y) based on the width/height of regionin order to maintain good aspect ratios- use left and right side- process large rectangles first Ordering not preserved which may cause issues if the data isupdatedD. Koop, DSC 530, Spring 201627

Squarification Algorithm46666step 18/3step 266664step 469/42step 766325/18224step 9D. Koop, DSC 530, Spring 20163/24step 5325/18step 104/16step 643 29/2224step 86349/2766step 3664663144/5022 14325/9Fig. 4. Subdivision algorithm[Brus et al., 1999]28

Squarified Treemaps(a) File system(b) OrganizationFig. 5. Squarified treemaps(a) File system(b) OrganizationFig. 6. Squarified cushion treemapsD. Koop, DSC 530,figure 7(a). This method has some disadvantages. Extra screen-space is used, and furSpring2016thermore,it gives rise to maze-like images, which can be puzzling for the viewer.[Brus et al., 1999]29

Compound Networks Add a hierarchy to the network (e.g. from clustering) GrouseFlocks: uses nested circles with colorsIEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. XX, NO. X, 200XGraph Hierarchy 1Graph Hierarchy 22Graph Hierarchy 3(a) Input Graph(b) Graph HierarchiesFig. 3. Multiple graph hierarchies superimposed on the same graph. In (a), we see the input graph without any hierarchies superimposed on top of it. In (b),we have a table of three of the many possible hierarchies which can be superimposed on (a). The first row of the table shows the three graph hierarchies. Thesecond row of the table shows these graph hierarchies superimposed on the same base graph. As a graph hierarchy defines the types of abstractions whichcan be visualized by cuts, a single graph hierarchy is not suitable for all interesting views of the graph data.[Archambault et al., 2008]D. Koop, DSC 530, Spring 201630

Geometry Shape information that is notdetermined by an attributeGeometry (Spatial) Data is often derived from realworld positions- Medical scansPosition- Earth boundaries We use the geometry because weare familiar with the existing layoutTablesNetworks &TreesFieldsItemsItems (nodes)GridsAttributesLinksAttributesD. Koop, DSC 530, Spring 2016Positions[Munzner (ill. Maguire), 2014]GeometryClusters,Sets, ListsItemsItemsPositionsAttributes31

Geographic Data Spatial data Cartography: the science of drawing maps- Lots of history and well-established procedures- May also have non-spatial attributes associated with items- Thematic cartography: integrate these non-spatial attributes (e.g.population, life expectancy, etc.) Goals:- Respect cartographic principles- Understand data with geographic references with the visualizationprinciplesD. Koop, DSC 530, Spring 201632

Search TasksTarget knownTarget ateExplore[Munzner (ill. Maguire), 2014]D. Koop, DSC 530, Spring 201633

LookupD. Koop, DSC 530, Spring 201634

Route MapsRendering Effective Route Maps: Improving Usability Through GeneralizationManeesh AgrawalaChris StolteStanford UniversityFigure 1: Three route maps for the same route rendered by (left) a standard computer-mapping system, (middle) a person, and (right) LineDrive, our route map rendering system.The standard computer-generated map is difficult to use because its large, constant scale factor causes the short roads to vanish and because it is cluttered with extraneous details suchas city names, parks, and roads that are far away from the route. Both the handdrawn map and the LineDrive map exaggerate the lengths of the short roads to ensure their visibilitywhile maintainaing a simple, clean design that emphasizes the most essential information for following the route. Note that the handdrawn map was created without seeing either thestandard computer-generated map or the LineDrive map.(Handdrawn map courtesy of Mia Trachinger.)AbstractRoute maps, which depict a path from one location to another, haveemerged as one of the most popular applications on the Web. CurD. rentKoop,DSC 530, routeSpringcomputer-generatedmaps,2016however, are often very diffi-clarity of the map and to emphasize the most important informa[Agrawala& Stolte,2001]tion [16, 21]. This type of generalization,performedeither consciously or sub-consciously, is prevalent both in quickly sketchedmaps and in professionally designed route maps that appear in print35advertisements, invitations, and subway schedules [25, 13].

LocateD. Koop, DSC 530, Spring 201636

Adding Data Discrete: a value is associated with a specific position- Size- Color Hue- Charts Continuous: each spatial position has a value (fields)- Heatmap- IsolinesD. Koop, DSC 530, Spring 201637

Discrete Categorical Attribute: Shape[Acadia NP, National Park Service]D. Koop, DSC 530, Spring 201638

Discrete Categorical Attribute: Shape[Acadia NP, National Park Service]D. Koop, DSC 530, Spring 201638

Discrete Quantitative Attribute: Color SaturationD. Koop, DSC 530, Spring 201639

Discrete Quantitative Attribute: SizeD. Koop, DSC 530, Spring 201640

Discrete Quantitative Attributes: Bar Chart[http://mis4gis.com/hgistr.org/]D. Koop, DSC 530, Spring 201641

Continuous Quantitative Attribute: Color ing-users/]D. Koop, DSC 530, Spring 201642

Time as the mage-in-japan.html]D. Koop, DSC 530, Spring 201643

Isolines[USGS via Wikipedia]D. Koop, DSC 530, Spring 201644

Isolines Scalar fields:- value at each location- sampled on grids Isolines use derived data from the scalar field- Interpret field as representing continuous values- Derived data is geometry: new lines that represent the sameattribute value Scalability: dozens of levels Other encodings?D. Koop, DSC 530, Spring 201645

ChoroplethsD. Koop, DSC 530, Spring 201646

of the data at different levels of abstraction and provide tools for dynamically navigating and filtering the hierarchy, as described in detail in the following sections. 4 Overview of Hierarchical Parallel Coor-dinates Exploratory data analysis is the summarization, display and manip-ulation of data to make it more comprehensible to human minds,