-
-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy pathindex.Rmd
167 lines (122 loc) · 19.1 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
---
lang: "en"
title: "Hands-On Data Visualization"
subtitle: "Interactive Storytelling from Spreadsheets to Code"
author: ["Jack Dougherty", "Ilya Ilyankou"]
date: "`r Sys.Date()`"
twitter-handle: handsondataviz
knit: "bookdown::render_book"
site: bookdown::bookdown_site
documentclass: book
bibliography: dataviz.bib
citation-style: chicago-fullnote-bibliography.csl
url: 'http\://handsondataviz.github.io/'
github-repo: handsondataviz/book
description: 'Tell your story and show it with data, using free and easy-to-learn tools on the web. This introductory book teaches you how to design interactive charts and customized maps for your website, beginning with easy drag-and-drop tools, such as Google Sheets, Datawrapper, and Tableau Public. You will also gradually learn how to edit open-source code templates built with Chart.js, Highcharts, and Leaflet on GitHub. Follow along with the step-by-step tutorials, real-world examples, and online resources. This book is ideal for students, non-profit organizations, small business owners, local governments, journalists, academics, or anyone who wants to tell their story and show the data. No coding experience is required.'
cover-image: images/cover-400wide.jpg
favicon: images/favicon.png
output:
bookdown::gitbook:
dev: svglite
css: css/style.css
includes:
in_header: header-dataviz.html
before_body: header.html
after_body: footer.html
toc_depth: 2
split_by: section
number_sections: true
split_bib: false
anchor_sections: true
config:
toc:
scroll_highlight: yes
collapse: section
before: |
<li><a href="./"><strong>Hands-On Data Visualization</strong><br>by Jack Dougherty & Ilya Ilyankou</a></li>
after: |
<li style="padding: 10px 15px; font-weight: bold;">Open-access web edition</li>
<li><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a></li>
<li><a href="https://bookdown.org" target="_blank">Built with Bookdown + RStudio</a></li>
view: https://github.com/handsondataviz/book/blob/main/%s
search: yes
sharing:
twitter: yes
facebook: no
github: yes
all: no
bookdown::pdf_book:
toc_depth: 2
number_sections: true
citation_package: default
pandoc_args: [ "--csl", "chicago-fullnote-bibliography.csl" ]
bookdown::word_document2:
default
bookdown::markdown_document2:
default
---
# Preface {-}
<!-- R global options: R chunk images display without code (no echo); show PDF image over JPG/PNG when available in PDF output -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
options(knitr.graphics.auto_pdf = TRUE)
```
![Book cover: Read about the [hoatzin "reptile bird"](https://en.wikipedia.org/wiki/Hoatzin)](images/0-preface/cover-400wide.jpg)
**Last updated on: `r format (Sys.Date(), '%d %b %Y')`**.
Tell your story and show it with data, using free and easy-to-learn tools on the web. This introductory book teaches you how to design interactive charts and customized maps for your website, beginning with easy drag-and-drop tools, such as Google Sheets, Datawrapper, and Tableau Public. You'll also gradually learn how to edit open-source code templates built with Chart.js, Highcharts, and Leaflet on GitHub.
*Hands-On Data Visualization* takes you step-by-step through tutorials, real-world examples, and online resources. This book is ideal for students, educators, community activists, non-profit organizations, small business owners, local governments, journalists, researchers, or anyone who wants to take data out of spreadsheets and turn it into lively interactive stories. No coding experience is required.
![Buy the book and get a free belly scratcher!](images/0-preface/belly-scratcher.gif)
**Buy the print book** at [Amazon](https://www.amazon.com/Hands-Data-Visualization-Storytelling-Spreadsheets/dp/1492086002/) - [Barnes & Noble](https://www.barnesandnoble.com/w/hands-on-data-visualization-jack-dougherty/1137725933) - [Bookshop](https://bookshop.org/books/hands-on-data-visualization-interactive-storytelling-from-spreadsheets-to-code/9781492086000) - [Powell's](https://www.powells.com/book/hands-on-data-visualization-9781492086000) - your local bookstore.
**Or begin a 30-day free trial** to [all books and digital content on the O'Reilly online learning platform](https://learning.oreilly.com/get-learning/?code=HODV21).
Learn more about this [open-access web edition](open-access.html), based on the book manuscript we submitted to our publisher, O'Reilly Media, Inc., which we have permission to freely share under the terms of our contract. Readers may purchase the publisher's improved and copyedited version, in print or ebook editions. Figure numbering and other details vary between this open-access web edition and the publisher's editions.
<!-- <div style="text-align:center">
<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/4.0/88x31.png" />
</a></div>
<div style="text-align:left">
<strong>Hands-On Data Visualization</strong> is copyrighted
by <a href="https://handsondataviz.org/authors">Jack Dougherty and Ilya Ilyankou</a>
and distributed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons BY-NC-ND 4.0 International License</a><br>.
You may freely share this content for non-commercial purposes, with a source credit to <a href="https://HandsOnDataViz.org">http://HandsOnDataViz.org</a>. -->
<div style="text-align:left">
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><strong><a property="dct:title" rel="cc:attributionURL" href="https://handsondataviz.org">Hands-On Data Visualization</a></strong> is copyrighted by <span property="cc:attributionName">Jack Dougherty and Ilya Ilyankou</span> and distributed under a <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">Creative Commons Attribution-NonCommercial-NoDerivatives (BY-NC-ND) 4.0 International license <img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nd.svg?ref=chooser-v1" alt=""></a>.<br>You may freely share this content for non-commercial purposes, with a source credit to <a href="https://HandsOnDataViz.org">https://HandsOnDataViz.org</a>.</p>
</div>
#### Disclaimer {-}
The information is this book is provided without warranty. The authors and publisher have neither liability nor responsibility to any person or entity related to any loss or damages arising from the information contained in this book.
## Audience and Overview {- #audience-overview}
As educators, we designed this book to be accessible for new learners, to introduce key concepts in data visualization and reinforce them with hands-on examples. We assume no prior knowledge other than a basic familiarity with computers and some vague memories of secondary school mathematics. Based on feedback we've received from an earlier draft, many readers across the globe have taught themselves with this book, and others educators are already using it as a textbook to teach their students.
Our subtitle, "Interactive Storytelling from Spreadsheets to Code," reflects how the scope of the book progresses from strengthening basic skills to editing open-source code templates, while continually maintaining our focus on telling true and meaningful data stories. We explain both the *why* and the *how* of visualization, and encourage critical thinking about how data is socially constructed, and whose interests are served or ignored.
Unlike many computer books that focus on selling you a specific software application, this book introduces you to over twenty different visualization tools, all of them free and easy-to-learn. We also offer guiding principles on how to make wise choices among digital tools as they continue to evolve in the future. By working through the sample datasets and tutorials, you will create more than a dozen different interactive charts, maps, and tables, and share these data stories with other readers on the public web.
Although our introductory book is comprehensive, we do not address certain advanced topics. For example, while we discuss ways to make meaningful data comparisons, we do not delve into the field of statistical data analysis. Also, we focus primarily on software tools with a friendly graphical user interface, rather than those that require you to memorize and enter command-line instructions, such as the powerful [R statistics packages](https://www.r-project.org). Finally, while we teach readers how to modify HTML-CSS-JavaScript code templates with the Leaflet, Chart.js, and Highcharts libraries, we do not explore more advanced visualization code libraries such as [D3](https://d3js.org). Nevertheless, we believe that nearly everyone who reads this book will discover something new and valuable.
### Advice for Hands-On Learning {-}
Learn by following our step-by-step tutorials on a laptop or desktop computer with an internet connection. Most of the tools introduced in the book are web-based, and we recommend you use an up-to-date version of Firefox, Chrome, Safari, or Edge browsers. We advise against using Internet Explorer as this older browser is no longer correctly supported by many web services. A Mac or a Windows computer will allow you to complete all tutorials, but if you use a Chromebook or Linux computer, you still should be able to complete most of them, and we'll point out any limitations in specific sections. While it may be possible to complete some tutorials on a tablet or smartphone device, we do not recommend it because these smaller devices will prevent you from completing several key steps.
If you're working on a laptop, consider buying or borrowing an external mouse that plugs into your computer. We've met several people who find it much easier to click, hover, and scroll with an external mouse than a laptop's built-in trackpad. If you're new to working with computers--or teaching newer users with this book---consider starting with [basic computer and mouse tutorial skills from the Goodwill Community Foundation](https://edu.gcfglobal.org/en/subjects/basic-skills/). Also, if you're reading a digital version of this book on a laptop, consider connecting a second computer monitor, or working with a tablet or second computer alongside you. This allows you to read the book in one screen and build data visualizations in the other screen.
### Chapter Outline {-}
The chapters in this book build up toward our central goal: telling true and meaningful stories with data.
- [Introduction](introduction.html) asks why data visualization matters, and shows how charts, maps, and words can draw us further into a story or deceive us from the truth.
- [Chapter 1: Choose Tools to Tell Your Data Story](choose.html) helps you to navigate your way through the process of sketching out your story and selecting which visualization tools you need to tell it effectively.
- [Chapter 2: Strengthen Your Spreadsheet Skills](spreadsheet.html) starts with basics and moves on to ways of organizing and analyzing data with pivot tables and lookup formulas, as well as geocoding add-on tools and collecting data with online forms.
- [Chapter 3: Find and Question Your Data](find.html) offers concrete strategies for locating reliable information, while raising deeper questions about what data truly represents and whose interests it serves.
- [Chapter 4: Clean Up Messy Data](clean.html) introduces ways to spot and fix inconsistencies and duplicates with spreadsheets and more advanced tools, and also how to extra tables from digital documents.
- [Chapter 5: Make Meaningful Comparisons](comparisons.html) provides common-sense strategies to begin analyzing and normalizing your data, while watching out for biased methods.
- [Chapter 6: Chart Your Data](chart.html) teaches how to create visualizations with easy-to-learn drag-and-drop tools, and which ones work best with different data stories.
- [Chapter 7: Map Your Data](map.html) focuses on building different types of visualizations that include a spatial element, and the challenges of designing true and meaningful maps.
- [Chapter 8: Table Your Data](table.html) explains how to create interactive tables that include thumbnail visualizations called sparklines.
- [Chapter 9: Embed on the Web](embed.html) connects prior chapters by demonstrating how to copy and modify embed codes to publish your visualizations online and share your work with wider audiences.
- [Chapter 10: Edit and Host Code with GitHub](github.html) walks through the web interface for this popular platform for modifying and sharing open-source visualization code templates.
- [Chapter 11: Chart.js and Highcharts Templates](chartcode.html) brings together open-source code templates to create charts you can customize and host anywhere on the web.
- [Chapter 12: Leaflet Map Templates](leaflet.html) gathers open-source code templates to build a wider variety of maps to communicate your data story.
- [Chapter 13: Transform Your Map Data](transform.html) takes a deeper look into geospatial data and easy-to-learn tools to customize data for your maps.
- [Chapter 14: Detect Lies and Reduce Bias](detect.html) explores how to lie with charts and maps, to teach you how to do a better job of telling the truth.
- [Chapter 15: Tell and Show Your Data Story](story.html) brings together all of the prior chapters to emphasize how data visualization is not simply about numbers, but truthful narratives that persuade readers how and why your interpretation matters.
- [Appendix A: How to Fix Common Problems](fix.html) serves as a guide for when your visualization tool or code does not work, which is also a great way to learn how it works.
- [Appendix B: Publishing with Bookdown](bookdown.html) describes our workflow for creating this book using Bookdown, GitHub, and Zotero.
## Authors & Acknowledgements {- #authors}
| Authors | About Us |
| ------------ | ------------ |
| ![](images/0-preface/dougherty-jack-200.png) | Jack Dougherty is Professor of Educational Studies at Trinity College in Hartford, Connecticut. He teaches a data visualization course where students partner with community organizations to help them tell their stories online with interactive charts and maps. Trained as a historian, Jack learned data visualization to share evidence more widely about cities, suburbs, and schools over time for his *[On The Line](https://ontheline.trincoll.edu)* book. Visit [his website](https://jackdougherty.org) to email or follow him on social media. |
| ![](images/0-preface/ilyankou-ilya-200.png) | Ilya Ilyankou is a computer scientist and artist. He is currently pursuing a PhD in conversational systems (large language models) at University College London (UCL). Prior to joining UCL, Ilya spent five years in industry as a full-stack developer and data engineer. He holds a bachelor’s degree in Computer Science and Studio Arts from Trinity College, Hartford, and a master’s degree in Geospatial Information Science from the University of Leeds. Follow Ilya on [Twitter](https://twitter.com/ilyankou) or visit his [website](https://ilyankou.com/). |
### Acknowledgements {-}
In 2016, we launched an earlier draft of this book under a different title, *Data Visualization for All*, as part of an introductory course for Trinity College students and their community partners in Hartford, Connecticut to tell their organization's data stories through interactive charts and maps. Veronica X. Armendariz (Trinity Class of 2016) served as an outstanding teaching assistant and provided initial tutorials. The draft expanded in 2017 when we launched a [free online Trinity edX course](https://www.edx.org/course/data-visualization-for-all) by the same name, with our wonderful co-instructors Stacy Lam (Trinity Class of 2019) and David Tatem (Instructional Technologist), who contributed rich ideas and countless hours. To date more than 23,000 students have started the edX course, though [only a small fraction actually complete the six-week curriculum](https://jackdougherty.org/2017/11/21/tough-questions-to-ask-about-trinity-edx/). Thanks also to the Trinity Information Technology staff and friends who produced edX course videos: Angie Wolf, Sean Donnelly, Ron Perkins, Samuel Oyebefun, Phil Duffy, and Christopher Brown. Funding for students who worked on the earlier draft was generously provided by the Office of Community Learning and Information Technology Services at Trinity College.
We thank the many individuals and organizations who helped us learn many of the skills that we teach in this book, especially Alvin Chang and Andrew Ba Tran, who were previously data journalists at *The Connecticut Mirror*; Michael Howser, Steve Batt, and their colleagues at the University of Connecticut Library, Map and Geographic Information Center (MAGIC); and Jean-Pierre Haeberly, Director of Web Development at Trinity College; Also, thank you to everyone who inspired Jack to be *code-curious* at The Humanities and Technology Camp (THATCamp) events, sponsored by the Roy Rosenzweig Center for History and New Media at George Mason University, and encouraged him and his students to explore civic technology for the public good at the Transparency Camp sponsored by the Sunlight Foundation. We also appreciated opportunities to share our work-in-progress at data workshops hosted by Scott Gaul and Doug Shipman, formerly at the Hartford Foundation for Public Giving, and Michelle Riordan-Nold at the Connecticut Data Collaborative.
Guided by feedback from readers, educators, and our editors, we rewrote the entire draft in 2020 to reorganize the structure, deepen the concepts, and enhance the tutorials. We thank everyone at O'Reilly Media who worked with us to bring you this finished product, especially our outstanding developmental editor, Amelia Blevins, our meticulous copy editor, Stephanie English, our well-organized production editor, Katie Tozer, and other members of their team: Nick Adams, Jonathan Hassel, and Andy Kwan We also appreciate O'Reilly's support for three technical reviewers who provided excellent commentary that helped us to improve the manuscript: Carl Allchin, Derek Eder, and Erica Hayes. Thanks also to readers who kindly shared feedback on the draft text or code templates: Jen Andrella, Gared Bard, Alberto Cairo, Fionnuala Darby-Hudgens, Lino Galiana, Nick Klagge, Dorraj Machai, Federico Marini, Oleksandr Oksymets, Elizabeth Rose, Lisa Charlotte Rost, Xavier Ruiz, Laura Tateosian, Elizabeth von Briesen, and Colleen Wheeler.