The Data of Visualization

Slides:



Advertisements
Similar presentations
Programming Paradigms and languages
Advertisements

JavaScript, Third Edition
Computers Organization & Assembly Language
CIS Computer Programming Logic
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
Numeric Processing Chapter 6, Exploring the Digital Domain.
Input, Output, and Processing
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
Term 2, 2011 Week 5. CONTENTS Data and information Information purposes Types of data – Integer data types – Floating point numbers – Character data types.
CS161 Computer Programming Instructor: Maria Sabir Fall 2009 Lecture #1.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
1 Chapter 2: Working with Data in a Project 2.1 Introduction to Tabular Data 2.2 Accessing Local Data 2.3 Accessing Remote Data 2.4 Importing Text Files.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
File Input and Output July 2nd, Inputs and Outputs Inputs Keyboard Mouse storage(hard drive) Networks O utputs Graphs Images Videos(image stacks)
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Characters and Strings
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Computer Club Content Review Al Huda Computer Club, April 9, 2016 Farid Ahmed.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
 Human language : commonly used to express feeling and understand what other people expression.  Computer language : are a languages by which a user.
PHP using MySQL Database for Web Development (part II)
Some other query issues:
Geog. 314 Working with tables.
DATA TYPES.
EMPA Statistical Analysis
Topics Designing a Program Input, Processing, and Output
Chapter 6 JavaScript: Introduction to Scripting
Introduction to R.
LIS 384K.11 Database-Management Principles and Applications
Fundamentals & Ethics of Information Systems IS 201
Digital Electronics Jess 2008.
Scope, Objects, Strings, Numbers
Introduction to R Studio
Chapter 1 Data Storage.
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Introduction to Python
WEB PROGRAMMING JavaScript.
Use of Mathematics using Technology (Maltlab)
PHP.
Introduction to Primitive Data types
Web DB Programming: PHP
Coding Concepts (Data- Types)
Topics Designing a Program Input, Processing, and Output
Fundamentals of Python: First Programs
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Spreadsheets, Modelling & Databases
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Real-World File Structures
PHP an introduction.
ESRM 250/CFR 520 Autumn 2009 Phil Hurvitz
Introduction to C Programming
Computer Applications -Generic Elective
Programming Fundamental-1
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Introduction to Primitive Data types
Information Visualization - Week 01
Section 6 Primitive Data Types
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

The Data of Visualization

Data as … The usual sense of “data” is either a number, or a string of letters, dates, or as computer files. Let’s review/consider data … booleans (true / false, 0 / 1) integers (counting numbers, 1, 2, 3, …) float (numbers with a floating point, e.g., 3.14159) [and there are other kinds of floats in computing, called “double”, “long”] aggregates of data (e.g., x * y) alphanumerics (characters, A-Z, 0-9) bytes: characters (a single byte) or characters represented by their binary (0, 1), hexadecimal (base 16), octal (base 8) or similar ideas nominal/categorial data are usually strings (e.g., “good|bad|average”) ordinal, interval, ratio, as we find statistics … Collectively these help us determine what visualization to use and, of course, are stored in computer files. The type of data and the type of file must be considered when ingesting the data for a visualization.

Data types and vis Some data types suggest strongly what kind of representation to use; compare a table versus a chart. Compare these ways of expressing date data (e.g., in YYYY/MM/DD format). If you’re plotting data by a time frame, notice the different ways we can visualize them. Discuss. What kinds of audience, data, and tasks can be addressed by each of them?

Working with your data

1 2 3 4 Typical real-world work scenario most commonly: export the data as comma-delimited or tab-delimited text file source data: cleaned of values outside domain and range; null values,inappropriate 0 values missing text characters; convert case 3 4 script or program to convert the clean data to .json visualize!

Geographic data: example of domain-specific data types (lat, long), combining categorical data, date and time, and numeric values

Models to engage users Besides integrating and balancing data + visual languages, there is the story to be told … and as in any language reflecting on the approach helps to create the visualization as much as it does to help interpret it: Descriptive Persuasive Explanatory Exploratory Process or Predictive Data layout; Spatial layout

Data lifecycle Start with the Needs or Requirements Analysis create a logical model of the system and then The physical model [the programming and implementation] Data Acquisition Processing (data cleaning) Analysis & Data or Statistical Modeling Layout (Composition, Typography, Color, Data) Reference System (part/whole relationships; grids; keys, etc.)

Data lifecycle Projection/Distortion of the image (adjustments) Access to source data by the end-user Review the overall graphic design (ensure a harmony of the data/design for the audience, data, and task) Aggregation & Clustering, redux: allow details on-demand, clustering, expanding data thru interactive techniques, such as zooming, data brushing) Test with the End-Users: do the user-controls create a meaningful, interpretable story Deploy!

Your own skills … <?php echo “\nProcessing File\n”; $lineNo = 1; $xmlWriter = new XMLWriter(); $xmlWriter->openUri(“demo.xml”); $xmlWriter->setIndent(true) $xmlWriter->startDocument(‘1.0’,’UTF-8’); $xmlWriter->startElement(‘root’); $tsvFile = new SplFileObject(‘source.tsv’); $tsvFile->setFlags(SplFileObject::READ_CSV); $tsvFile->setCsvControl(“\t”); foreach ($tsvFile as $line => $row) { if ($line > 0) { echo “\nProcessing $lineNo:\t$row[0]”. “\t$row[1]\t$row[2]\t$row[3]\t$row[4]”; $xmlWriter->startElement(‘data’); $xmlWriter->writeElement(‘refnumber’, $row[0]); $xmlWriter->writeElement(‘location’,$row[1]); $xmlWriter->writeElement(‘name’,$row[2]); $xmlWriter->writeElement(‘age’,$row[3]); $xmlWriter->writeElement(‘other’,$row[4]); $xmlWriter->endElement(); $lineNo++; } $xmlWriter->endDocument(); echo “\nFile done.\n”; ?> On the basis of your experiences with HTML, CSS, JavaScript, and d3.js, encourage in-house testing of integrating local resources, such as local digital library collections, converting tab-separated value file (such as from a spreadsheet program) to .xml. For this example the exported tab- delimited data consists of a reference number, location, name, age, other fields. file name is tsvToXml.php

Even easier … There are a number of online conversion tools and a script to demonstrate the conversion. Python and other languages make it even easier for anyone, including non-programmers, to convert a comma-separated value file into a .json file. In the Unix terminal window, run this line of code at the $ prompt, substitution ‘demofile.csv’ with your own file name: python -c “import csv,json; print json.dumps(list(csv.reader(open(‘demofile.csv’))))” https://www.commandlinefu.com/commands/view/20528/convert-csv-to-json