data frame syntax, 122
function syntax, 69
key-value pair syntax, 191
"
(double quotes), character data syntax, 61
'
(single quotes), character data syntax, 61
..
(double dot), moving up directory, 14
.
(single dot), referencing current folder, 14
directing output, 20
pipe table, 48
!
(exclamation point), Markdown image syntax, 47
accessing data frames, 122
accessing list elements, 97–98
%>%
(pipe operator), dplyr
package, 141–142
function syntax, 70
Markdown hyperlink syntax, 46
loading entire table from database, 173
using wildcards with files, 17–18
?
(question mark), query parameter syntax, 184
accessing data frames, 122–123
comparing single- and double-bracket notation, 101
Markdown hyperlink syntax, 46
retrieving value from vector, 88
[[]]
(double-bracket notation)
selecting data of interest for application, 312
code chunk syntax, 279
key-value pair syntax, 191
render function syntax, 308
<-
(assignment operator), 59, 92
>>
directing output, 20
>
directing output, 20
~
(tilde), home directory shorthand, 10, 15
for CSV data, 125
finding R
and RScript
, 57
for images, 48
URLs and, 47
example finding Cuban food in Seattle, 196–197
registering with web services, 186–188
add
(git
). See also Staging Area
add and commit changes, 38–39, 322, 327–328, 333, 337
adding files to repository, 32–33
unadd
, 35
aes()
function, for aesthetic mappings, 237
adding titles and labels to charts, 246
aesthetic mappings, 234, 237–238
proportional representation of data and, 212–213
statistical transformation of data, 255
Analysis. See Data analysis
capabilities of version control systems, 28
anscombe
data set, in R
, 208
Anscombe’s Quartet, 208
example finding Cuban food in Seattle, 196–197
registering with web services, 186–188
APIs (application programming interfaces). See also Web APIs
defined, 181
in plotly
package, 258
Application servers, developing, 306–309
Shiny app example applying to fatal police shootings, 311–318
structure in Shiny framework, 295–299
Apps, publishing Shiny, 309–311
Area encoding, visualizing hierarchical data, 218
commands and, 13
creating data frames, 120
creating lists, 96
debugging functions, 78
function parts, 76
syntax of, 16
vectorized functions and, 87
dplyr
core functions, 131, 137–138
summarizing information using dplyr
functions, 313
AS
keyword, renaming columns, 173
assigning values to variables, 59
modifying vectors, 92
preview rendering support, 49–50
writing code, 3
Authentication, API authentication service, 187
facets and, 245
position adjustments, 240
proportional representation of data, 211–213
visualizing data with single variable, 210–211
Bash shell. See also Git Bash
commands, 13
executing code, 4
ls
command, 13
Bins, breaking data into different variables, 142
BitBucket, comparing with GitHub, 29
Blockquotes, markdown options, 48
Blocks, markdown formatting syntax, 47
Bokeh package, 261
Books, resources for learning R
, 65
Boolean. See Logical (boolean)
Box plots, 210
double. See [[]]
(double-bracket notation)
retrieving value from vector using bracket notation, 88
single. See []
(single-bracket notation)
resolving merge conflicts, 327–328
tracking code versions with, 319–320
using in feature branch workflows, 333–335
using in forking workflows, 335–339
working with feature branches, 329–331
c()
function, creating vectors, 81–82
Case sensitivity, variable names, 58
Categorical data. See Nominal (categorical) data
Causality, assessing statistical relationships, 341
cd
, change directory command, 12–13
creating centralized repository, 331–333
overview of, 331
working with feature branches, 333–335
lists and, 95
overview of, 61
vectorized functions and, 87
Charts, 229. See also by individual types of graphs
for dplyr
, 148
for ggplot2
, 255
for GitHub, 43
for markdown, 48
for R
functions, 71
switching between branches, 321–324
working with feature branches, 329–330
working with feature branches in centralized workflow, 335
Checkpoints. See Commit
overview of, 248
breaking data into different variables, 142
inline code and, 280
Circle packing, visualizing hierarchical data, 218–219
collaboration using forking workflow, 336
creating centralized repository, 332
forks, 337
merging branches and, 328
understanding/using git
commands, 43
inline code, 280
syntax-colored code blocks, 48
tracking versions with branches, 319–320
Visual Studio Code (VS Code), 7, 49
writing, 3
centralized workflow for, 331
creating centralized repository, 331–333
interactive web applications and. See Shiny framework
merging branches, 324–325, 328–329
reports. See R Markdown
resolving merge conflicts, 327–328
tracking code versions, 319–320
working with branches, 320–324
working with feature branches, 329–331, 333–335
working with forking workflows, 335–339
collect()
, manipulating table data, 177–178
creating vectors, 82
specifying range of vector index, 90
adding to Leaflet map, 270
effective for data visualization, 222–226
color palettes, 242
examples, 289
colorFactor()
, Leaflet maps, 270
changing to/from rows using tidyr
, 157–159
dplyr arrange()
operation, 137–138
dplyr filter()
operation, 135
dplyr mutate()
operation, 136
Columns (fields), in relational databases, 168
Comma-separated value data. See CSV (comma-separated value) data
cloning repository, 37
commit
history, 320
directing/redirecting output, 20
executing code, 4
interacting with databases, 31
listing files, 13
overview of, 9
working with, 4
Command prompt. See Command line
executing code, 4
working with, 5
Command shell (terminal). See Command line
Commands. See also by individual types
issuing, 13
list of advanced, 18
list of basic, 15
R
language, 58
syntax for code comments, 10
add and commit changes, 33, 38–39, 327–328, 337
creating centralized repository, 333
git
core concepts, 28
history, 40
reverting to earlier versions, 40–42
tracking code versions, 319–320
understanding/using git
commands, 43
working with branches, 320–324
working with feature branches, 330–331, 334
resources for learning R
, 66–67
sources of data, 109
Comparison operators, logical values and, 62
Compiled languages, 53
Comprehensive R
Archive (CRAN), 6
Concurrency, capabilities of version control systems, 28
config
, configuring git
for first-time use, 30
Console, RStudio, 55
building Shiny application, 313
content elements in designing UIs, 299
extracting from HTTP request, 200
static content in Shiny framework, 300–301
content()
, extracting content from HTTP request, 200
Continuous color scales, 225–226
choosing effective colors for data visualization, 223
selecting visual layouts, 209–210
visualization with multiple variables, 213–216
visualizing with single variable, 210
developing application servers, 307
in Shiny framework, 295
user interactions in Shiny apps, 301–303
coord_flip()
example, 244
types of coordinate systems for geometric objects, 243–244
coord_flip()
example, 244
creating choropleth maps, 249–250
creating dot distribution maps, 252
Grammar of Graphics, 232
types for geometric objects, 243–244
cor()
, correlation function in R
, 161
count()
, summarizing information, 313
Courses, resources for learning R
, 65–66
CRAN (Comprehensive R
Archive), 6
CSS language, 342
CSV (comma-separated value) data
loading data sets from .csv file, 167
read.csv()
, 161
viewing working directory, 125–126
ctrl+c, stopping or canceling program or command, 19
d3.js JavaScript library, 343
acquiring domain knowledge, 112–113
analyzing. See Data analysis
dplyr
example analyzing flight data, 148–153
dplyr
grammar for manipulating, 131–132
interactive presentation, 293
interpreting, 112
overview of, 107
ratio data, 111
reusable functions in managing, 70
transforming into information, 341
understanding data schemas, 113–116
visualization of. See Data visualization
working with CSV data, 124–125
wrangling, 106
generating data, 108
reusable functions, 70
tidyr
package. See tidyr
package
describing structure of, 121–122
viewing working directory, 125–126
working with CSV data, 124–125
data()
function, viewing available data sets, 124–125
Data-ink ratio, aesthetics of graphics, 229
two-dimensional, 122
factors, 120
lists and, 95
selecting visual layouts, 209–210
vectorized functions and, 87
vectorized operations and, 83
choosing effective colors, 222–226
choosing effective graphical encodings, 220–222
ggplot2
. See ggplot2
package
leveraging preattentive attributes, 226–227
with multiple variables, 213–217
reusable functions, 70
selecting visual layouts, 209–210
tidyr
package. See tidyr
package
Data visualization, interactive
example exploring changes to Seattle, 266–272
designing relational, 144
overview of relational, 167–169
setting up relational, 169–171
DataCamp, resources for learning R
, 66
dbConnect()
, accessing SQLite, 176–177
dbListTables()
, listing database tables, 177
dbplyr
package, accessing databases, 174
Debugging functions, 78. See also Error handling
accessing command line and, 10
changing from command line, 12–13
printing working directory, 11
tree structure of, 12
turning into a repository, 31
viewing working directory, 125–126
Distributions, of x and y values (statistics), 208–209
of commands, 16
getting help via, 64
resources for learning R
, 66
Shiny layouts, 304
creating, 275
knitting, 278
Domain, interpreting data by, 112–113
Dot distribution maps, 248, 251–252
Double-bracket notation. See [[]]
(double-bracket notation)
analyzing data frames, 142–144
analyzing flight data, 148–153
converting dplyr
functions into SQL statements, 178
example mapping evictions in San Francisco, 252
example report on life expectancy, 289
grammar for data manipulation, 131–132
group_by()
, 244
orienting data frames for plotting, 239
overview of, 131
performing sequential operations, 139–141
Dynamic inputs, Shiny framework, 301–303
Dynamic outputs, Shiny framework, 303–304
Dynamically typed languages, 60
aesthetic graphics, 229
aesthetic mappings, 237
choosing effective graphical encodings, 220–222
Environment pane, RStudio, 55
debugging functions, 78
reading error messages, 63
Ethical responsibilities, 343
Excel, working with CSV data, 124
disconnecting from remote computer, 22
stopping or canceling program or running command, 19
Expressions, multiple operators in, 61
Grammar of Graphics, 232
creating data frames, 120
in centralized workflow, 333–335
Fields (columns), in relational databases, 168
figure()
, creating Bokeh plots, 262–263
listing, 13
fill()
, aesthetic layouts, 238–240
dplyr
core functions, 131, 135–136
example report on life expectancy, 289
manipulating table data, 177–178
joins, 148
example finding Cuban food in Seattle, 200, 202
for
loops, 87
Foreign keys, in relational databases, 168–169
feature branches in, 331, 333–335
table, 157
text, 46
Formulas, 245
defined, 293
Shiny framework. See Shiny framework
fromJSON()
, converting JSON string to list, 193–194, 200
full_join()
, 148
function
keyword, 76
for aesthetic mappings (aes()
), 237–238
converting dplyr
functions into SQL statements, 178
correlation function (cor()
), 161
creating lists, 96
debugging, 78. See also Error handling
developing application servers, 307–309
geometry. See geom_
functions
inspecting data frames, 121–122
nested statements within, 140–141
referencing database table, 177
in Shiny layouts, 305
tidyr
functions for changing columns to/from rows, 157–159
viewing available data sets (data()
), 124–125
overview of, 132
summarizing information using, 313
applying to educational statistics, 161–163
combining with spread()
, 159
tidyr
function for changing columns to rows, 157–158
adding titles and labels to charts, 247–248
aesthetic mappings and, 237–238
creating choropleth maps, 249–250
creating dot distribution maps, 252
example mapping evictions in San Francisco, 253–256
rendering plots, 284
specifying geometric objects, 234
specifying geometries, 235–237
statistical transformation of data, 237
ggplot2
layers, 232
specifying geometric objects, 234–235
specifying with ggplot2
package, 235–237
example finding Cuban food in Seattle, 197–198, 202
getwd()
, viewing working directory, 125
example finding Cuban food in Seattle, 200–203
example mapping evictions in San Francisco, 253
map tiles, 252
example mapping evictions in San Francisco, 256
dot distribution maps, 252
example finding Cuban food in Seattle, 200
example mapping evictions in San Francisco, 252–256
facets, 244–245 Grammar of Graphics, 231–232
labels and annotations, 246–248
map types, 248
rendering plots, 284
specifying geometries, 235–237
static plot of iris data set, 257–258
statistical transformation of data, 255
styling with scales, 240–242 tidyr
example, 160–161
ggplotly()
, 259
ggrepel
package, preventing labels from overlapping, 247–248
accessing project history, 40–42
branching model. See Branches
checking repository status, 31–33
installing, 5
leveraging using GitHub, 6
local git
process, 35
project setup and configuration, 30
tracking changes, 32
version control, 4
Git Bash. See also Bash shell
commands used by, 13
executing code using Bash shell, 4–5
ls
command, 13
tab-completion support, 15
Git Flow model, 335
accessing project history, 40–42
creating centralized repository, 331–333
creating GitHub account, 6
forking/cloning repos on GitHub, 36–38
managing code with, 3
overview of, 29
pushing/pulling repos on GitHub, 38–40
sharing reports as website, 285–286
storing projects on, 36
.gitignore
, ignoring files, 42–44
GitLab, comparing with GitHub, 29
Google Docs, version control systems compared with, 28
Google, getting help via, 63
Google Sheets, working with CSV data, 124
Government publications, sources of data, 108
Grammar of Data Manipulation (Wickham), 131
Graphics. See also by individual types of graphs; Data visualization
choosing effective graphical encodings, 220–222
with ggplot2
. See ggplot2
package Grammar of Graphics, 231–232
leveraging preattentive attributes, 226–227
selecting visual layouts, 209–210
visualizing hierarchical data, 217–220
analyzing data frames by group, 142–144
facets and, 244
statistical transformation of data, 255
summarizing information using, 313
GROUP_BY
clause, SQL SELECT
, 174
Heatmaps. See also Choropleth maps
data visualization with multiple variables, 215, 217
example mapping evictions in San Francisco, 256
RStudio, 55
Hierarchical data, visualization of, 217–220
data visualization with multiple variables, 216
expressive displays, 229
visualizing data with single variable, 210
HSL Calculator, 223
HSL (hue-saturation-lightness) color model, 222–223
HTML (Hypertext Markup Language)
markup languages, 45
sharing reports as website, 284–286
web development language, 342
HTTP (HyperText Transfer Protocol)
example finding Cuban food in Seattle, 196–200
response header and body, 190
web services and, 181
choosing effective colors for data visualization, 222
multi-hue color scales, 225
Hue-saturation-lightness (HSL) color model, 222–223
Icons, types of interfaces, 9
IDE (integrated development environment), 54
if_else
, conditional statements, 79–80
for getting subsets of vectors, 88–89
init (git)
, turning a directory into a git
repository, 31
Inline code, in R Markdown, 280
SELECT
, 174
dynamic inputs with Shiny framework, 301–303
functions and, 69
Integer data type, 63
Integrated development environment (IDE), 54
interactive data visualization. See Data visualization, interactive
interactive web applications. See Shiny framework
command line as, 9
defined, 181
user. See UIs (user interfaces)
web APIs. See Web APIs
Interpreted languages, 53
Interval data, measuring data, 111
iris
data set, interactive plots in, 257–258
Italics, text formatting, 45–46
dplyr
core functions, 131
JOIN
clause, SQL SELECT
, 174–175
Journalism, sources of data, 109
JSON (JavaScript Object Notation)
list of lists structure in, 97
kable()
, knitr
package, 283–284, 291
JSON (JavaScript Object Notation), 191
query parameters and, 184
tidyr
data tables, 157
creating R Markdown documents, 275
Knitting documents, 278
aesthetics of graphics, 230
labs()
, adding titles and labels to charts, 246
lapply()
, applying functions to lists, 102–103
Layers, ggplot2
package, 232
designing UIs, 299
example exploring changes to Seattle, 268
labels and annotations, 246–248 plotly
package, 260–261
Lazy evaluation, in dplyr
package, 178
creating Leaflet map, 264
example exploring changes to Seattle, 269
creating interactive plots, 264–266
example exploring changes to Seattle, 269–271
installing and loading, 263
Shiny app example applying to fatal police shootings, 312–313
Learn Git Branching, 339
SELECT
, 174
example of join operation, 145–146
adding to Leaflet map, 270–271
aesthetics of graphics, 230
length()
function, determining number of elements in a vector, 82
Libraries. See Packages
library()
, referencing external packages, 311
Lightness, choosing effective colors for data visualization, 223
command-line tools on, 5
installing git
, 5
list()
function, creating lists, 96
applying functions to, 102–103
converting JSON string to list, 193–194
double-bracket notation, 101
JSON structures compared with, 192–193
listing files from command line, 13
modifying, 100
overview of, 95
rendering Markdown lists, 282–283
log
, viewing commit history, 40
debugging functions, 78
vector filtering by values, 90–91
Loops, vectorized functions and, 87
list folder contents, 13
using with remote computer, 22
-m
option, adding messages to commit
command, 34
Mac OSs. See also Terminal (Mac)
command-line tools on, 4
installing git
, 5
Machine learning, making predictions, 342
Mackinlay’s Expressiveness Criteria, 227–229
man
, looking up commands in manual, 16–17
adding to Leaflet map, 264
ggmap
package, 252
dot distribution maps, 251–252
example mapping evictions in San Francisco, 252–256
interactive, 263
types of, 248
overview of, 45
rendering strings, 281
static content elements of UIs, 300–301
tables, 48
text formatting and blocks, 46
Markdown Reader, 49
Markers, adding to Leaflet map, 264
Markup languages, 45
applying to vectors, 83
assigning values to variables, 59
using on numeric data types, 60
vectorized functions and, 86–87
Matrix, two-dimensional data structures in
R
, 122
.md
file extension, for markdown files, 48
Menus, types of interfaces, 9
forking/cloning repository on GitHub, 337–338
resolving merge conflicts, 327–328
working with feature branches, 330, 334–335
Merging, git
core concepts, 29
Microsoft Excel, 124
Microsoft Windows. See Windows OSs
mkdir
, documentation of commands, 16–17
Moral responsibility, 343
dplyr
core functions, 131, 136–137
example finding Cuban food in Seattle, 202
example report on life expectancy, 289–290
Mutating joins, 148
MySQL, 171
compared with NULL
, 100
logical values and, 89
modifying vectors and, 92
Named lists, creating data frames, 120
names()
function, creating lists and, 96
Negative index, vector indices, 89
Nested objects, JSON support, 192
Nested statements, within other functions, 140–141
Nested structures, visualizing hierarchical data, 217–220
News, sources of data, 109
choosing effective colors for data visualization, 223
data visualization with multiple variables, 215
measuring data, 110
proportional representation of data and, 212
selecting visual layouts and, 209–210
visualizing single variable, 210
Non-standard evaluation (NSE), dplyr
, 133
NULL
value, modifying lists and, 100
Numbers, working with CSV data, 124
OAuth, API authentication service, 187
Observations, data structures, 111–112
SELECT
, 174
Online communities, sources of data, 109
R
language as, 53
OpenStreetMap, 264
Operationalization, using data to answer questions, 116–118
Optional arguments, functions and, 72
Options (flags), argument syntax, 16
OPTIONS
, HTTP verbs, 188
ORDER_BY
clause, SQL SELECT
, 174
selecting visual layouts and, 209–210
Orientation, tidyr
data tables, 157
Out-of-bounds indices, vector indices, 89
SELECT
, 174
Outliers, visualizing data with single variable, 210
directing/redirecting, 20
functions and, 69
reactive, 295
Bokeh, 261
dplyr
. See dplyr
package
ggmap
. See ggmap
package
ggplot2
. See ggplot2
package
knitr
. See knitr
package
leaflet
. See leaflet
package
referencing external, 311
rmarkdown
, 275
RStudio, 55
tidyr
. See tidyr
package
Panning, interactive data visualization, 257
query parameters, 184–186, 202
debugging functions, 78
to functions, 70
PATCH
, HTTP verbs, 188
finding, 57
on remote computers, 22
specifying from command line, 14–15
viewing working directory, 125
pipe operator (%>%
), dplyr
package, 141–142
pipe table, 48
creating plots, 260
example exploring changes to Seattle, 268
creating interactive plots, 259–261
example exploring changes to Seattle, 268
loading, 258
ggplot2
package. See ggplot2
package
plotly
package. See plotly
package
rendering in R Markdown, 284
RStudio, 55
Pointers, types of interfaces, 9
Popups, adding interactivity to Leaflet map, 266
Powershell, Windows Management Framework, 5
Preattentive processing, in data visualization, 226–227
Predictions, 342
Preview Markdown rendering, 49
Primary keys, in relational databases, 168–169
print()
, analyzing flight data, 152
Probability, 342. See also Statistics Problem domain, interpreting data by domain, 112–113
Programming/programming languages
compiled languages, 53
data wrangling, 106
dynamically vs. statically typed languages, 60
interpreted languages, 53
markup languages, 45
R
language. See R
language
S
language, 53
SQL. See SQL (Structured Query Language)
statically typed, 60
statistical languages, 53
Proportional representation, visualizing data with single variable, 211–212
publishing apps, Shiny framework, 309–311
creating centralized repository, 333
merging from GitHub, 328
understanding/using git
commands, 43
working with feature branches, 335
creating centralized repository, 333
understanding/using git
commands, 43
working with feature branches, 333–335
pwd
, print working directory, 11, 22
Python, 342
qmplot()
, creating background maps, 253–254
example finding Cuban food in Seattle, 202
quit (q)
, stopping or canceling program or running command, 19
R for Everyone, 341
accessing Web APIs, 189–190 anscombe
data set in, 208
comments, 58
as dynamically typed language, 60
functions in Shiny layouts, 305
interactive data visualization. See Data visualization, interactive learning, 64–67
overview of, 4
running R
code from command line, 56–57
running R
code using RStudio, 54–56
two-dimensional data structures, 122
web application framework. See Shiny framework
example report on life expectancy, 287–292
inline code and, 280
knitting documents, 278
rendering plots, 284
setting up reports, 275
static content elements of UIs, 300–301
Ratio data, measuring, 111
creating interactive plots, 262–263
installing and loading, 261–262
RDMS (relational database management system), 169. See also Relational databases
dynamic outputs with Shiny framework, 303–304
render functions and, 308
in Shiny framework, 295
Reactivity, in Shiny framework, 295
creating choropleth maps, 250
example mapping evictions in San Francisco, 253
in R
, 161
Recycling operation, vectors, 84–85
Redirects, output, 20
designing, 144
logical values and, 62
vector filtering with, 91
assessing in statistical learning, 341–342
between x and y values (statistics), 208–209
images, 48
specifying paths, 14
URLs, 47
viewing working directory, 125–126
git
core concepts, 29
repositories as remotes, 36
Remote computers, accessing, 20–21
developing application servers, 307–309
Reports, 275. See also R Markdown
creating centralized repository, 331–333
forking/cloning on GitHub, 36–38, 336–337 git
core concepts, 28
linking online to local, 36
pushing/pulling on GitHub, 38–40
viewing current branch, 320–321
REpresentational State Transfer. See REST (REpresentational State Transfer)
Required arguments, functions and, 72
Research, sources of data, 109
commit
history, 42
Response body, HTTP requests, 190
Response header, HTTP requests, 190
REST (REpresentational State Transfer)
responding to HTTP requests, 189
web APIs, 182
web services and, 181
function parts, 77
capabilities of version control systems, 28
reverting to earlier versions, 40–42
revert
, reverting to earlier versions, 40–42
SELECT
, 174
rmarkdown
package, creating R Markdown documents, 275
round()
function, vectorized functions and, 86–87
changing from columns to/from, 157–159
filter()
operation, 135
Rows (records), in relational databases, 168
RScript
, running scripts from command line, 57
changing working directory, 125
creating list elements, 97
debugging functions, 78
downloading, 8
getting help via RStudio community, 64
ggplot2
graphics in RStudio window, 233
knitting documents, 278
writing code with, 3
rworldmap
, example report on life expectancy, 289, 291
sapply
(), applying functions to lists, 103
Saturation, choosing effective colors for data visualization, 222
Scalable vector graphics (SVGs), 266
Scatterplot matrix, 213
Anscombe’s Quartet, 209
data visualization with multiple variables, 213–217
ggplot2
example, 233
Scientific research, sources of data, 109
programming with R
language, 53–54
running from command line, 57
running using RStudio, 54
dplyr
core functions, 131, 133–134
example report on life expectancy, 289–290
manipulating table data, 177–178
ON
clause, 174
ORDER_BY
and GROUP_BY
clauses, 174
Sensors, generating data, 107
seq()
function, creating vectors and, 82–83
Sequences, performing sequential operations, 139–141
application structure in Shiny framework, 296
building Shiny application, 313–318
defined, 294
developing application servers, 306–309
division of responsibility in Shiny apps, 298–299
Shapefiles, creating choropleth maps, 248–249
Shapes, adding to Leaflet map, 264
Sharing. See Collaboration
application structure, 295–299
designing user interfaces, 299
developing application servers, 306–309
example applying to fatal police shootings, 311–318
publishing Shiny apps, 309–311
shinyapp.io
, hosting Shiny apps, 309–310
Sidebar, in Shiny example, 316
Single-bracket notation. See []
(single-bracket notation)
Slideshows, 275
variable names, 58
writing functions, 76
Snapshots. See Commit
source()
, loading and running API keys, 188
applying to educational statistics, 164–165
changing rows to columns, 158–159
Spreadsheets, working with CSV data, 124
SQL (Structured Query Language)
converting dplyr
functions into SQL equivalents, 178
ORDER_BY
and GROUP_BY
clauses, 174
resources for learning, 171
SELECT
statement in, 172
ssh
, accessing remote computers, 21–22
Stacked bar charts, 211–213, 239
StackOverflow, getting help via, 64
Staging area, adding files, 33. See also add
(git
)
building Shiny application, 313
Statically typed language, 60
assessing relationships, 341–342
making predictions, 342
overview of, 341
applying tidyr
to educational statistics, 160–165
statistical transformation of data, 237, 255
checking project status, 323
checking repository status, 31–33
pushing branches to GitHub, 329
resolving merge conflicts, 327–328
understanding/using git
commands, 43
character data types, 61
rendering in R Markdown, 281–282
Style, vs. syntax, 59
Sublime Text, selecting text editor, 7
Subplots, facets and, 244
summarize()
, dplyr
core functions, 131, 138–139
Surveys, generating data, 107
SVGs (scalable vector graphics), 266
debugging functions, 78
vs. style, 59
Syntax-colored code blocks, markdown options, 48
Tab-completion, command shells supporting, 15
building Shiny application, 314–318
creating data frames, 120
data structures, 111–112 JOIN
clause, 174
markdown, 48
referencing database table, 177
in relational databases, 168
tidyr
, 157
Tagged elements, in lists, 95–96
tbl()
, referencing database table, 177
Terminal (command shell). See Command line
Terminal (Linux), 5
connecting to remote server, 21
executing code, 4 ls
command, 13
manuals (man
pages), 17
setting up, 4
tab-completion support, 15
Text blocks, markdown, 46
Text formatting, 46
theme()
, creating choropleth maps, 251
applying to educational statistics, 160–165
changing from columns to/from rows, 157–159
example mapping evictions in San Francisco, 252
orienting data frames for plotting, 239
reshaping data sets, 165
defining variables, 58 dplyr
package, 132
writing functions, 76
Tutorials, for learning R
, 65–66
application structure in Shiny framework, 295–296
building Shiny application, 313–318
defined, 294
designing, 299
division of responsibility in Shiny apps, 298–299
Unit of analysis, grouping for redefining, 144
Unordered lists, rendering Markdown lists, 282–283
URIs (Uniform Resource Identifiers)
example finding Cuban food in Seattle, 202
URLs (Uniform Resource Locators), 182, 286
User interfaces. See UIs (user interfaces)
Users, accessing command line, 10
tidyr
cells representing, 155
vectors as one-dimensional collections of, 81
breaking data into, 142
creating intermediary variables for use in analysis, 139
data visualization with multiple, 213–217
data visualization with single, 210–213
storing Shiny layouts in, 305
tidyr
columns representing, 155
VCS (version control system), 28
creating data frames, 120
lists and, 95
overview of, 81
performing operations on, 83–84
dplyr
package, 131
accessing project history, 40–42
checking repository status, 31–33
command line in, 9
forking/cloning repos and, 36–38
GitHub for, 29
local git
process, 35
overview of, 27
project setup and configuration, 30
pushing/pulling repos and, 38–40
storing projects on GitHub, 36
Version control system (VCS), 28
Videos, resources for learning R
, 65
data visualization with multiple variables, 215
data visualization with single variable, 210
Visual channels, aesthetic mappings and, 237
Visual storytelling with D3, 343
Visualization. See Data visualization
preview rendering support, 49
selecting text editor, 7
access tokens (API keys), 186–188, 196–197
example locating Cuban food in Seattle, 197–203
RESTful requests, 182
defined, 293
interactive. See Shiny framework
Web browsers, Shiny framework as interface, 293–294
Web servers, 182. See also Servers
Web services. See also Web APIs
overview of, 181
Webpage, URL for, 286
creating using R Markdown, 275
publishing Shiny apps, 309–311
sharing R Markdown reports, 284–286
Widgets. See Control widgets
Wildcards, command line, 17–18
Windows, icons, menus, and pointers (WIMP), 9
Windows Management Framework, 5
installing git
, 5
Windows, types of interfaces, 9
centralized, 331
creating centralized repository, 331–333
tracking code versions with branches, 319–320
working with feature branch workflows, 333–335
working with forking workflows, 335–339
Xcode command line developer tools, 5
Zooming, interactive data visualization, 257
3.131.13.194