Programming Skills for Data Science Start Writing Code to Wrangle Analyze and Visualize Data with R 1st Edition Michael Freeman - Download the ebook and start exploring right away
Programming Skills for Data Science Start Writing Code to Wrangle Analyze and Visualize Data with R 1st Edition Michael Freeman - Download the ebook and start exploring right away
com
https://ebookname.com/product/programming-skills-for-data-
science-start-writing-code-to-wrangle-analyze-and-visualize-
data-with-r-1st-edition-michael-freeman/
OR CLICK HERE
DOWLOAD EBOOK
https://ebookname.com/product/instant-data-intensive-apps-with-
pandas-how-to-manipulate-visualize-and-analyze-your-data-with-
pandas-hauck/
https://ebookname.com/product/analyzing-baseball-data-with-r-
albert/
https://ebookname.com/product/an-introduction-to-spatial-data-
science-with-geoda-volume-2-clustering-spatial-data-1st-edition-
luc-anselin/
https://ebookname.com/product/introduction-to-physical-
oceanography-2nd-edition-john-a-knauss/
Constructing Leisure Historical and Philosophical
Debates 1st Edition Karl Spracklen
https://ebookname.com/product/constructing-leisure-historical-
and-philosophical-debates-1st-edition-karl-spracklen/
https://ebookname.com/product/mcqs-in-pharmacy-practice-2nd-
edition-lilian-m-azzopardi/
https://ebookname.com/product/paradigms-of-clinical-social-work-
emphasis-on-diversity-rachelle-a-dorfman-zukerman-ph-d/
https://ebookname.com/product/god-1st-edition-andrew-radde-
gallwitz/
https://ebookname.com/product/herpes-simplex-virus-2nd-edition-
russell-j-diefenbach/
Sins Needles A Knitorious Murder Mystery Book 7 Reagan
Davis
https://ebookname.com/product/sins-needles-a-knitorious-murder-
mystery-book-7-reagan-davis/
Programming Skills
for Data Science
The Pearson Addison-Wesley
Data and Analytics Series
The series aims to tie all three of these areas together to help the reader build
end-to-end systems for fighting spam; making recommendations; building
personalization; detecting trends, patterns, or problems; and gaining insight
from the data exhaust of systems and user interactions.
b
Make sure to connect with us!
informit.com/socialconnect
Programming Skills
for Data Science
Start Writing Code to
Wrangle, Analyze, and
Visualize Data with R
Michael Freeman
Joel Ross
The authors and publisher have taken care in the preparation of this book, but make no expressed or implied
warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for
incidental or consequential damages in connection with or arising out of the use of the information or
programs contained herein.
For information about buying this title in bulk quantities, or for special sales opportunities (which may include
electronic versions; custom cover designs; and content particular to your business, training goals, marketing
focus, or branding interests), please contact our corporate sales department
at corpsales@pearsoned.com or (800) 382-3419.
For questions about sales outside the U.S., please contact intlcs@pearson.com.
All rights reserved. This publication is protected by copyright, and permission must be obtained from the
publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by
any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding
permissions, request forms and the appropriate contacts within the Pearson Education Global Rights &
Permissions Department, please visit www.pearsoned.com/permissions/.
ISBN-13: 978-0-13-513310-1
ISBN-10: 0-13-513310-6
1 18
v
v
This page intentionally left blank
Contents
Foreword xi
Preface xiii
Acknowledgments xvii
About the Authors xix
I: Getting Started 1
5 Introduction to R 53
5.1 Programming with R 53
5.2 Running R Code 54
5.3 Including Comments 58
5.4 Defining Variables 58
5.5 Getting Help 63
6 Functions 69
6.1 What Is a Function? 69
6.2 Built-in R Functions 71
6.3 Loading Functions 73
6.4 Writing Functions 75
6.5 Using Conditional Statements 79
7 Vectors 81
7.1 What Is a Vector? 81
7.2 Vectorized Operations 83
7.3 Vector Indices 88
7.4 Vector Filtering 90
7.5 Modifying Vectors 92
8 Lists 95
8.1 What Is a List? 95
8.2 Creating Lists 96
8.3 Accessing List Elements 97
8.4 Modifying Lists 100
8.5 Applying Functions to Lists with lapply() 102
Index 345
Foreword
The data science skill set is ever-expanding to include more and more of the analytics pipeline. In
addition to fitting statistical and machine learning models, data scientists are expected to ingest
data from different file formats, interact with APIs, work at the command line, manipulate data,
create plots, build dashboards, and track all their work in git. By combining all of these
components, data scientists can produce amazing results. In this text, Michael Freeman and Joel
Ross have created the definitive resource for new and aspiring data scientists to learn foundational
programming skills.
Michael and Joel are best known for leveraging visualization and front-end interfaces to compose
explanations of complex data science topics. In addition to their written work, they have created
interactive explanations of statistical methods, including a particularly clarifying and captivating
introduction to hierarchical modeling. It is this sensibility and deep commitment to demystifying
complicated topics that they bring to their new book, which teaches a plethora of data science
skills.
This tour of data science begins by setting up the local computing environment such as text editors,
RStudio, the command line, and git. This lays a solid foundation—that is far too often glossed
over—making it easier to learn core data skills. After this, those core skills are given attention,
including data manipulation, visualization, reporting, and an excellent explanation of APIs. They
even show how to use git collaboratively, something data scientists all too often neglect to integrate
into their projects.
Programming Skills for Data Science lives up to its name in teaching the foundational skills needed to
get started in data science. This book provides valuable insights for both beginners and those with
more experience who may be missing some key knowledge. Michael and Joel made full use of their
years of teaching experience to craft an engrossing tutorial.
—Jared Lander, series editor
This page intentionally left blank
Preface
Transforming data into actionable information requires the ability to clearly and reproducibly
wrangle, analyze, and visualize that data. These skills are the foundations of data science, a field that
has amplified our collective understanding of issues ranging from disease transmission to racial
inequities. Moreover, the ability to programmatically interact with data enables researchers and
professionals to quickly discover and communicate patterns in data that are often difficult to
detect. Understanding how to write code to work with data allows people to engage with
information in new ways and on larger scales.
The existence of free and open source software has made these tools accessible to anyone with
access to a computer. The purpose of this book is to teach people how to leverage programming to
ask questions of their data sets.
If you are interested in pursuing a career in data science, or if you use data on a regular basis and
want to use programming techniques to gain information from that data, then this text is for you.
xiv Preface
Book Structure
The book is divided into six sections, each of which is summarized here.
This section walks through the steps of downloading and installing necessary software for the rest
of the book. More specifically, Chapter 1 details how to install a text editor, Bash terminal, the R
interpreter, and the RStudio program. Then, Chapter 2 describes how to use the command line for
basic file system navigation.
This section walks through the technical basis of project management, including keeping track of
the version of your code and producing documentation. Chapter 3 introduces the git software to
track line-by-line code changes, as well as the corresponding popular code hosting and
collaboration service GitHub. Chapter 4 then describes how to use Markdown to produce the
well-structured and -styled documentation needed for sharing and presenting data.
This section introduces the R programming language, the primary language used throughout the
book. In doing so, it introduces the basic syntax of the language (Chapter 5), describes
fundamental programming concepts such as functions (Chapter 6), and introduces the basic data
structures of the language: vectors (Chapter 7), and lists (Chapter 8).
Because the most time-consuming part of data science is often loading, formatting, exploring, and
reshaping data, this section of the book provides a deep dive into the best ways to wrangle data in R.
After introducing techniques and concepts for understanding the structure of real-world data
(Chapter 9), the book presents the data structure most commonly used for managing data in R: the
data frame (Chapter 10). To better support working with this data, the book then describes
two packages for programmatically interacting with the data: dplyr (Chapter 11), and
tidyr (Chapter 12). The last two chapters of the section describe how to load data from
databases (Chapter 13) and web-based data services with application programming interfaces
(APIs) (Chapter 14).
This section of the book focuses on the conceptual and technical skills necessary to design and
build visualizations as part of the data science process. It begins with an overview of data
visualization principles (Chapter 15) to guide your choices in designing visualizations. Chapter 16
then describes in granular detail how to use the ggplot2 visualization package in R. Finally,
Chapter 17 explores the use of three additional R packages for producing engaging interactive
visualizations.
As in any domain, data science insights are valuable only if they can be shared with and understood
by others. The final section of the book focuses on using two different approaches to creating
interactive platforms to share your insights (directly from your R program!). Chapter 18 uses the R
Other documents randomly have
different content
"Never take chances!" the woman warned me,
"For a boy is the thing that sticks to your heart!"
But I was mad!
I had decked mine bravely;
He was moulded a man from the very start.
THE BOLSHEVIK
*****
CALVÉ IN BLUE
SIGN TO TRESPASSERS
SILVER SLIPPERS
A FABULOUS DAY
My house is arrayed
In its garlands of Christmas delight;
A red rose is this house
In its holly and soft candle light.
TO MARJORIE PICKTHALL
POETESSES
GOING NORTH
White Porches
II
Grey Willows
Then we turned north.
A railway train rushed by us;
The blue-bloused engineer
Hung from his stifling cab,
Waving a careless hand.
And in a moment we had lost
All thought of shining porches
And sleepy village streets.
This was a thinner world
Of smaller, leaner orchards;
Taller, barer houses;
Drier, keener air.
Here and there grey willows,
With an eerie whisper,
Bent above a narrow stream
That languidly slipped by.
And over us the noon-day sky
Turned brazen. Stark tree trunks
Showed where bush fires had run,
Charred columns of lost forests
Dried by the sun into fantastic shapes,
III
Bush Road
Painted Rock
STUDY IN SHADOWS
II
But just last night, before the moon was up,
Our little boat stole close against these crags
That out-rear arches and reject the dark.
Yet gradually the purple of the rock
Melted before it; and again they came
Creeping in golden dust, and greying dust,
And crowding down those giant flights of stair
That open slowly as eternity,
To hold the feet of shadows, lost in night.
III
NORTHERN GRAVEYARDS
In a comradeship increasing
Those who in their hour
Reaped a dreary harvest,
Missed a magic flower.
STONY LAKE
TRADE
SNAKE ISLAND
JUNIPER RING
WHITE SLUMBER
Who has come to that farthest island
Beyond White Gull Bay?
There is a little tent among the birches
Since yesterday.
Those birches are the palest things
Even in the morning sun!
Among them the tent has suddenly blossomed,
As the white flower of a night-blooming cereus,
Silently, deep in some forest of sleep,
Might have done.
Who are they? What dreams must be theirs,
Who have found such a magical camp unawares?
CRIMSON POOL
MIRACLES
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com