Create Interactive Motion Charts Using R Package Googlevis

Total Page:16

File Type:pdf, Size:1020Kb

Create Interactive Motion Charts Using R Package Googlevis Create Interactive Motion Charts Using R Package GoogleVis Bidong Liu, Data and Analytic Solutions, Inc. Zhengyi Fang, Social & Scientific Systems, Inc. Motion Chart Show changes over time Popularized by Dr. Hans Rosling (https://www.ted.com/talks/hans_rosling_reveals_new_insights_on_poverty) (https://www.newsecuritybeat.org/2012/08/hans-rosling-religion-babies-poverty/) Motion Chart by GoogleVis An interface between R and the Google Charts API by Markus Gesmann and Diego de Castillo Demo with Medical Expenditure Panel Survey (MEPS) data Features Bubble chart, bar chart and line chart INTERACTIVE bubble chart: Five dimensions to present data (X-axis, Y-axis, Size, Color, Time) Multiple measures for each dimension Can highlight bubbles of interest Measure values can be easily observed Have trails to show changes over time Zoom in to display movements in a small range How to generate? Step 1: Prepare data #setup directory setwd("C:/Users/bliu/Desktop/R_GoogleVis") #read file into R mydata = read.csv("Cond.csv", check.names=FALSE) How to generate? (continue) Step 2: Generate motion chart #Loading package library(googleVis) #set initial state for motion chart mysettings<-' {"iconType":"BUBBLE", "yAxisOption":"4", "yLambda":1, "xAxisOption":"3", "xLambda":1,"colorOption":“6", "sizeOption":"9", "time":"1996", "duration":{"multiplier":1,"timeUnit":"Y"}, "playDuration":23955, "nonSelectedAlpha":0.2, "showTrails":false} ‘ How to generate? (continue) Motion=gvisMotionChart(mydata, idvar="Condition", timevar="Year", options=list(state=mysettings, width=800, height=400)) #display the motion chart plot(Motion) How to generate? (continue) Step 3. Publish the motion chart # generate JavaScript file which will be used for web print(Motion,"chart", file="Cond.txt") Paste the JavaScritpt file to the target website Reference Introduction to googleVis 0.6.4 https://cran.r-project.org/web/packages/googleVis/vignettes/googleVis.pdf Google Motion Charts https://developers.google.com/chart/interactive/docs/gallery/motionchart Medical Expenditure Panel Survey (MEPS) https://www.meps.ahrq.gov/mepsweb/.
Recommended publications
  • Manual Graphing Tools 2019.Pdf
    INSTITUTE Manual on V-Dem Graphing Tools March 2019 Copyright © V-Dem Institute, University of Gothenburg. All rights reserved. Manual on the V-Dem Graphing Tools The V-Dem Graphing Tools is a new platform for making data visualization intuitive, accessible and easy to use. They allow users to analyze 450+ indicators and indices of democracy on all the countries in the world from 1900 to the present day. The reliable, precise nature of the indicators as well as their lengthy historical coverage should be useful not only to scholars studying democracy, but also to governments, practitioners and NGOs. In this document you can find tips on how to use 12 different Graphing Tools. Featured Tools We recommend that you start exploring data with the variable and country graphs, interactive maps and motion chart. These simple and user-friendly interfaces allow you to explore 450 aspects of democracy for all countries in the world over the last 100 years. 1. Variable Graph: multiple countries for one index or one variable at a time 2. Country Graph: multiple variables and/or indices for one country over time 3. Interactive Maps: generates maps for any V-Dem indicator for any year 4. Motion Charts: visualizes how the relationship between two variables changes over time Charts & Comparisons Tools These brand-new tools make it possible to create even more detailed and nuanced charts, complex graphics and heat maps, thematic and regional comparisons. 5. Variable Radar Chart: multiple variables and/or indices for one country over time 6. Country Radar Chart: multiple countries for one indicator/index 7.
    [Show full text]
  • Google Chart Tools ( Allow You to Embed Many Different Kinds of Charts and Maps in Web Pages
    Turning Data into Information – Tools, Tips, and Training A Summer Series Sponsored by Erin Gore, Institutional Data Council Chair; Berkeley Policy Analysts Roundtable, Business Process Analysis Working Group (BPAWG) and Cal Assessment Network (CAN) Web Data Visualization Tools Presented by Russ Acker, Office of Planning & Analysis [email protected], 510.642.1300, skype: ucb-opa Google Chart Tools (http://code.google.com/apis/charttools/) allow you to embed many different kinds of charts and maps in web pages. This software is free and doesn’t require you to have a Google account; all you need is a website and some data. (A little HTML/JavaScript knowledge doesn’t hurt either, but you can figure it out without too much trouble.) The charts can read data that’s embedded directly in the page, retrieved from a database, or in some cases, stored in a Google Docs spreadsheet. There are two major categories within Google Chart Tools: Image charts are simple and dynamically generated, but not interactive once produced. These are basically a picture of a chart that is created on the fly each time the web page gets viewed. Interactive charts are also dynamically generated, but include interactive features, such as zooming and movement. Google currently implements many of these as Flash objects, which means those particular interactive charts won’t work on iPhones or iPads. We’ll be looking at both kinds of charts in this session. Tableau Software has a similar tool, called Tableau Public, for embedding interactive charts in web pages. It’s free, very powerful, and probably easier to implement than Google Chart Tools, but it does require the use of a Windows-only application to import data, and is not very well documented.
    [Show full text]
  • How to Use the Motion Chart: a NAEP Example
    How to Use the Motion Chart: A NAEP Example The Motion Chart provides a unique way to see data across time and by a variety of factors. The text below describes one example of how to view the results for eighth-graders in Boston and Charlotte by selecting specific settings for the X and Y axes, as well as the color and size of the circles. The example shown below is just one of many potential ways to analyze data using the Motion Chart, and therefore it is not intended to provide a broad summary of the findings that a user can explore with this tool. Analyze where districts plot for two student groups You can determine the X and Y axes by clicking on the arrows and selecting a variable (e.g., average scale scores for all students). For instance, the chart below shows the average scores in 2003 for all students on the X axis, and the average score for students eligible for the National School Lunch Program (NSLP) on the Y axis. In this example, the cursor is hovering over the circle representing Boston, showing the average scale score for all students in 2003 as 261.8 on the X axis, and the score for students eligible for the NSLP as 256.4 on the Y axis. From just a quick glance at the chart, it’s clear that the blue circle representing Charlotte has a higher average score for all students but a similar score for students eligible for the NSLP. 1 Use color and size to create context The color and size of the circles on the chart can be selected to show all the same variables that can be shown in the X and Y axes.
    [Show full text]
  • Inventing Graphing: Meta- Representational Expertise In
    JOURNAL OF MATHEMATICAL BEHAVIOR 10, 117-160 (1991) Inventing Graphing: Meta­ Representational Expertise in Children ANDREA A. mSEssA DAVID HAMMER BRUCE SHERIN University of California, Berkeley TINA KOLPAKOWSKI The Bentley School, Oakland, CA We examine a cooperative activity of a sixth-grade class. The activity took place over 5 days and focused on inventing adequate static representations of motion. In generating, critiquing, and refining numerous representations, we find indications of strong meta­ representational competence. In addition to conceptual and design competence, we focus on the structure of activities and find in them an intricate blend of (I) the children's conceptual and interactional skills, (2) their interest in, and sense of ownership over, the inventions, and (3) the teacher's initiation and organization of activities, which is deli­ cately balanced with her letting the activities evolve according to student-set directions. 1. INTRODUCTION In November 1989, 8 sixth-grade students in a school in Oakland, California invented graphing as a means of representing motion. Now, of course, we mean that they "reinvented" graphing. In fact, we know that most of them already knew at least something about graphing. But the more we look at the data, the more we are convinced that these children did genuine and important creative work and that their accomplishment warrants study as an exceptional example of student-directed learning. We would like to understand We thank the following for comments on drafts and for contributing to the ongoing discussion of inventing graphing: Steve Adams, Don Ploger, Susan Newman, Jack Smith. We are immensely grateful to the 8 sixth-grade students who did the creative work presented here.
    [Show full text]
  • Seven Things You Should Know About Data Visualization II
    7 things you should know about... Data Visualization II Scenario What is it? One requirement of Vera’s master’s program in sociol­ Data visualization is the use of tools to represent data in the form ogy is a thesis, which includes a presentation of findings of charts, maps, tag clouds, animations, or any graphical means before her peers for review, discussion, and recommen­ that make content easier to understand. The past two years has dations. In addition to her own clinical project, which seen a blossoming of visualization applications, as well as of tech­ traces correlations between environmental factors and nologies and infrastructure to support increasingly sophisticated learning disabilities in the United States, Vera gathers visual representations of data. The greatest change, however, may 12 years of data on learning disabilities from organiza­ be in access to data. Electronic sensors, for example, have made tions in the United States, Canada, New Zealand, the weather information available on a previously unimaginable scale. Netherlands, South Africa, Australia, and Great Britain. While geographic information systems (GIS) have for years allowed As she begins looking over the paper with an eye toward individuals to gather, transform, and analyze data, new tools have presentation, she becomes convinced that her statis­ 1become widely available that easily create unique mashups of dis­ tics, alone, will not clearly articulate the implications of parate sources of data, as evidenced by the increasing number of her research to an audience of listeners, so she starts applications that employ Google Earth and Google Maps. Growing looking for ways to present the information visually.
    [Show full text]
  • Dynamic Visualizations of Language Change Motion Charts on the Basis of Bivariate and Multivariate Data from Diachronic Corpora*
    Dynamic visualizations of language change Motion charts on the basis of bivariate and multivariate data from diachronic corpora* Martin Hilpert Freiburg Institute for Advanced Studies This paper uses diachronic corpus data to visualize language change in a dynam- ic fashion. Bivariate and multivariate data sets form the input for so-called mo- tion charts, i.e. series of diachronically ordered scatterplots that can be viewed in sequence. Based on data from COHA (Davies 2010), two case studies illustrate recent changes in American English. The first study visualizes change in a diachronic analysis of ambicategorical nouns and verbs such as hope or drink; the second study shows structural change in the behavior of complement-taking predicates such as expect or remember. Whereas motion charts are typically used to represent bivariate data sets, it is argued here that they are also useful for the analysis of multivariate data over time. The present paper submits multivariate diachronic data to a multi-dimensional scaling analysis. Viewing the resulting data points in separate time slices offers a holistic and intuitive representation of complex linguistic change. Keywords: motion charts, diachronic corpora, COHA, multi-dimensional scaling, bivariate data, multivariate data 1. Introduction This paper presents a way to visualize processes of language change in a dynamic fashion. For this, it uses so-called motion charts (Gesmann & de Castillo 2011), which are series of diachronically ordered scatterplots. Viewing these plots se- quentially on a computer screen creates the impression of continuous motion and allows the viewer to process complex information in an intuitive way. On printed pages, the sequential graphs can be read in the way one would read a comic strip: the frame of reference is held constant, but items within that frame change from one picture to the next.
    [Show full text]
  • 978-3-642-54344-9 48 Chapter.P
    Control Software Design of Plant Microscopic Ion Flow Detection Motion Device Lulu He, Fubin Jiang, Dazhou Zhu, Peichen Hou, Baozhu Yang, Cheng Wang, Jiuwen Zhang To cite this version: Lulu He, Fubin Jiang, Dazhou Zhu, Peichen Hou, Baozhu Yang, et al.. Control Software Design of Plant Microscopic Ion Flow Detection Motion Device. 7th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2013, Beijing, China. pp.422-433, 10.1007/978- 3-642-54344-9_48. hal-01220945 HAL Id: hal-01220945 https://hal.inria.fr/hal-01220945 Submitted on 27 Oct 2015 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License Control Software Design of Plant Microscopic Ion Flow Detection Motion Device Lulu He 1,2,a,Fubin Jiang2,b, Dazhou Zhu3,c, Peichen Hou2,d, Baozhu Yang4,e, Cheng 2,f 1,g Wang , Jiuwen Zhang 1 2 Information Science & Engineering, Lanzhou University, Lanzhou 730000, China; Beijing 3 Research Center for Information Technology in Agriculture, Beijing 100097, China ; Beijing 4 Research Center of Intelligent Equipment for Agriculture, Beijing 100097, China; Beijing PAIDE Science and Technology Development Co.,Ltd., Beijing 100097,China [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] Abstract.
    [Show full text]
  • Motion Charts: Telling Stories with Statistics October 2011
    Motion Charts: Telling Stories with Statistics October 2011 Victoria Battista, Edmond Cheng U.S. Bureau of Labor Statistics, 2 Massachusetts Avenue, NE Washington, DC 20212 Abstract In the field of statistical and computational graphics, dynamic charts bring rich data visualization to multidimensional information and make it possible to tell a story with statistics. As statistical and computational graphics have advanced, motion charts have made it possible to display multivariate data using two-dimensional bubble charts, scatter plots, and series relationships over temporal periods. This visualization of data enriches its exploration and analysis and more effectively conveys information to users. Incorporating examples from actual business and economic data series, our paper illustrates how motion charts can tell dynamic stories with data. Key Words: Visualization, motion chart, bubble graph, exploratory data analysis, statistical graphics, multidimensional data 1. Introduction A motion chart is a dynamic and interactive visualization tool for displaying complex quantitative data. Motion charts show multidimensional data on a single two dimensional plane. Dynamics refers to the animation of multiple data series over time. Interactive refers to the user-controlled features and actions when working with the visualization. Innovations in statistical and graphics computing made it possible for motion charts to become available to individuals. Motion charts gained popularity due to their use by visualization professionals, statisticians, web graphics developers, and media in presenting time-related statistical information in an interesting way. Motion charts help us to tell stories with statistics. 2. Data Visualization Advancements in technology are filling up our world with information. The number of data sets and elements within these datasets are growing larger, the frequency of data collection is increasing, and the size of databases is expanding exponentially.
    [Show full text]
  • Visualizing Data: an Interview with Anselm Spoerri
    VISUALIZING INFORMATION AND DATA Visualizing Data: An Interview with Anselm Spoerri VISUALIZING DATA STARTS WITH PUTTING THE DATA INTO A FORM YOU CAN VISUALIZE, THEN UNDERSTANDING WHO YOUR AUDIENCE IS AND WHAT THEY WANT TO KNOW. BY JOCELYN MCNAMARA, MLIS f a picture is worth a thousand and teaches students how best to visu- infographics usually are static. They words, how many data is an alize data. Earlier this year, he was hon- give you a high-level view of the key infographic worth? ored with a Professional and Scholarly salient patterns in the data that have Typically not many, says Excellence (PROSE) Award for DataVis been identified by an analyst, who Anselm Spoerri. An infographic—often Material Properties, a tool he helped then—either by using some tools or I(wrongly) used as a catch-all term for design for McGraw-Hill Education. hiring a graphic designer—comes up everything from simple bar charts to Information Outlook interviewed with a visual representation of those key complex interactive visualizations—is Spoerri about the techniques and tools results. So, from the perspective of data best used to convey a few data points for visualizing data and information and visualization as a whole, infographics that represent key patterns or trends. the biggest challenges facing informa- are what you use when you are com- Visualizations, on the other hand, pro- tion professionals who work with data. municating with a very general audi- vide context for the data and often allow ence or you just want to communicate the audience to manipulate the data The terms graphics, infographics, and highlights in a quick way.
    [Show full text]
  • UCLA Electronic Theses and Dissertations
    UCLA UCLA Electronic Theses and Dissertations Title Technology-Enhanced Statistics Education with SOCR Permalink https://escholarship.org/uc/item/4mb48660 Author Zhou, Chaojie Publication Date 2012 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California UNIVERSITY OF CALIFORNIA Los Angeles Technology-Enhanced Statistics Education with SOCR A thesis submitted in partial satisfaction of the requirements for the degree Master of Science in Statistics by Chaojie Zhou 2012 ABSTRACT OF THE THESIS Statistics Education with SOCR by Chaojie Zhou Master of Science in Statistics University of California, Los Angeles, 2012 Professor Jan De Leeuw, Co-Chair Professor Ivaylo Dinov, Co-Chair There is an ongoing need for clear and accessible statistics teaching tools for both learners and instructors. Applications, step by step tutorials, and visualizations are ex- tremely useful tools for teaching students to think scientifically, properly analyze the data, use proper techniques, and identify common errors. In this paper we will demon- strate technology-enhanced approaches for introductory statistics courses. Specifically we develop two different activities, using SOCR (Statistics Online Computational Re- source) data, tools and resources. The first activity introduces multiple linear regression using appropriate SOCR tools. In general, linear regression is used to describe a rela- tionship between one variable to one or several other variables. Linear regression is used extensively in practical applications such as prediction and measuring the strength of re- lationships between variables. Proper linear regression techniques will be demonstrated, and appropriate methods for the analysis of regression results will be discussed. The second activity demonstrates the interactive power of the SOCR Motion Charts tool.
    [Show full text]
  • 3A8d7915711a1f8926a4894da6
    This repository Search Explore Features Enterprise Blog Sign up Sign in mbostock / d3 Watch 1,604 Star 39,537 Fork 10,191 Gallery Ben Logan edited this page Jul 6, 2015 · 962 revisions Wiki ▸ Gallery Pages 70 Welcome to the D3 gallery! More examples are available on bl.ocks.org/mbostock. If Find a Page… you want to share an example and don't have your own hosting, consider using Gist and bl.ocks.org. If you want to share or view live examples try runnable.com or Home vida.io. 3.0 3.1 Visual Index API API Reference Box Plots Bubble Chart Bullet Charts Calendar View API Reference (русскоязычная версия) Api Arrays Behaviors Bundle Layout Non-contiguous Chord Diagram Dendrogram Force-Directed Cartogram Graph Chord Layout Cluster Layout CN Home Colors Core Show 55 more pages… Circle Packing Population Stacked Bars Streamgraph Pyramid Clone this wiki locally https://github.com/mbostock/d3.wiki.git Sunburst Node-Link Tree Treemap Voronoi Diagram Hierarchical Edge Voronoi Diagram Symbol Map Parallel Bundling Coordinates Scatterplot Matrix Zoomable Pack Hierarchical Bars Epicyclical Gears Layout Collision Collapsible Force Force-Directed Azimuthal Detection Layout States Projections Choropleth Collapsible Tree Zoomable Zoomable Layout Treemap Partition Layout Zoomable Area Drag and Drop Rotating Cluster Sankey Diagram Chart Collapsible Tree Layout Layout Fisheye Distortion Hive Plot Co-occurrence Motion Chart Matrix Chord Diagram Animated Béziers Zoomable Collatz Graph Sunburst Parallel Sets Word Cloud Obama's Budget Facebook IPO
    [Show full text]
  • Visual Detection of Change Points and Trends Using Animated Bubble Charts
    19 Visual Detection of Change Points and Trends Using Animated Bubble Charts Sackmone Sirisack and Anders Grimvall Linköping University, Sweden 1. Introduction The rapid growth of automatic data collection systems has increased the need for algorithms that can efficiently reveal important features of large or complex datasets. For example, it is often of great interest to examine the occurrence of abrupt changes in long bi- or multivariate time series of data. Several numerical algorithms and statistical tests have been developed to detect abrupt shifts in the mean or other parameters of uni- or multivariate distributions (Caussinus & Mestre, 2004; Hawkins, 1977, 2001; Srivastava & Worsley, 1986; Stephens, 1994). However, there is also a need for visualization techniques that can help the user identify any type of abrupt changes or trends in the collected data. More generally, techniques are needed that can simultaneously highlight important features of the data and filter out irrelevant information (Bederson & Boltman, 1999; Bundesen, 1990; Cleveland & McGill, 1984; Healey, 2000; Ware, 2004). In this chapter, we present flexible and user-friendly animations of bubble charts in which subsets of the collected data are sequentially highlighted on a static background representing all data points. The basic ideas of interactive visualization of quantitative data were presented before computer technologies were sufficiently developed to enable widespread use of such methods. In 1978, Newton introduced a form of linked brushing that allowed the user to select a subset of observations in one display and simultaneously highlight the same subset in another display. About a decade later, several ground-breaking articles were published. Asimov (1985) introduced the concept of helicopter tours for viewing high- dimensional datasets via a structured progression of 2D projections, and Becker and co- workers (1987a, b) provided a systematic framework for brushing, linking, and other forms of interactive statistical graphics.
    [Show full text]