R for the Rest of Us A Statistics Free Introduction David Keyes
R for the Rest of Us A Statistics Free Introduction David Keyes
R for the Rest of Us A Statistics Free Introduction David Keyes
R for the Rest of Us A Statistics Free Introduction David Keyes
1. Visit ebookfinal.com to download the full version and
explore more ebooks or textbooks
R for the Rest of Us A Statistics Free
Introduction David Keyes
_____ Click the link below to download _____
https://ebookfinal.com/download/r-for-the-rest-of-us-a-
statistics-free-introduction-david-keyes/
Explore and download more ebooks or textbook at ebookfinal.com
2. Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Analyzing Linguistic Data A Practical Introduction to
Statistics using R 1st Edition R. H. Baayen
https://ebookfinal.com/download/analyzing-linguistic-data-a-practical-
introduction-to-statistics-using-r-1st-edition-r-h-baayen/
BYOD for Healthcare 1st Edition Jessica Keyes
https://ebookfinal.com/download/byod-for-healthcare-1st-edition-
jessica-keyes/
Computational Statistics An Introduction to R 1st Edition
Günther Sawitzki
https://ebookfinal.com/download/computational-statistics-an-
introduction-to-r-1st-edition-gunther-sawitzki/
Order Statistics Third Edition H. A. David
https://ebookfinal.com/download/order-statistics-third-edition-h-a-
david/
3. Even You Can Learn Statistics A Guide for Everyone Who Has
Ever Been Afraid of Statistics 2nd Edition David M. Levine
https://ebookfinal.com/download/even-you-can-learn-statistics-a-guide-
for-everyone-who-has-ever-been-afraid-of-statistics-2nd-edition-david-
m-levine-2/
Even You Can Learn Statistics A Guide for Everyone Who Has
Ever Been Afraid of Statistics 2nd Edition David M. Levine
https://ebookfinal.com/download/even-you-can-learn-statistics-a-guide-
for-everyone-who-has-ever-been-afraid-of-statistics-2nd-edition-david-
m-levine/
The New Inflation The Collapse of Free Markets W. David
Slawson
https://ebookfinal.com/download/the-new-inflation-the-collapse-of-
free-markets-w-david-slawson/
Software Configuration Management Strategies and IBM R
Rational R ClearCase R A Practical Introduction 2nd
Edition David E. Bellagio
https://ebookfinal.com/download/software-configuration-management-
strategies-and-ibm-r-rational-r-clearcase-r-a-practical-
introduction-2nd-edition-david-e-bellagio/
Statistics for Engineers An Introduction 1st Edition Jim
Morrison
https://ebookfinal.com/download/statistics-for-engineers-an-
introduction-1st-edition-jim-morrison/
5. R for the Rest of Us A Statistics Free Introduction David
Keyes Digital Instant Download
Author(s): David Keyes
ISBN(s): 9781718503328, 1718503326
Edition: converted
File Details: PDF, 27.18 MB
Year: 2024
Language: english
7. CONTENTS IN DETAIL
PRAISE FOR R FOR THE REST OF US
TITLE PAGE
COPYRIGHT
DEDICATION
ABOUT THE AUTHOR AND TECHNICAL REVIEWER
ACKNOWLEDGMENTS
INTRODUCTION
Isn’t R Just for Statistical Analysis?
Who This Book Is For
About This Book
PART I: VISUALIZATIONS
1
AN R PROGRAMMING CRASH COURSE
Setting Up
Installing R and RStudio
Exploring the RStudio Interface
R Script Files
Basic R Syntax
Arithmetic Operators
Comparison Operators
Functions
8. Working with Data
Importing Data
Saving Data as Objects
Installing Packages
RStudio Projects
Data Analysis with the tidyverse
tidyverse Functions
The tidyverse Pipe
Comments
How to Get Help
Summary
Additional Resources
2
PRINCIPLES OF DATA VISUALIZATION
The Drought Visualization
The Grammar of Graphics
Working with ggplot
Mapping Data to Aesthetic Properties
Choosing the Geometric Objects
Altering Aesthetic Properties
Setting a Theme
Re-creating the Drought Visualization
Plotting One Region and Year
Changing Aesthetic Properties
Faceting the Plot
Adding Final Polishes
The Complete Visualization Code
Summary
Additional Resources
3
CUSTOM DATA VISUALIZATION THEMES
Styling a Plot with a Custom Theme
An Example Plot
The BBC’s Custom Theme
The BBC Theme Components
Function Definition
Text
Legend
Axes
Grid Lines
Background
Small Multiples
Color
Summary
9. Additional Resources
4
MAPS AND GEOSPATIAL DATA
A Brief Primer on Geospatial Data
The Geometry Type
The Dimensions
The Bounding Box
The Coordinate Reference System
The geometry Column
Re-creating the COVID-19 Map
Importing the Data
Calculating Daily COVID-19 Cases
Calculating Incidence Rates
Adding Geospatial Data
Making the Map
Making Your Own Maps
Importing Raw Data
Accessing Geospatial Data with R Functions
Using Appropriate Projections
Wrangling Geospatial Data
Summary
Additional Resources
5
DESIGNING EFFECTIVE TABLES
Creating a Data Frame
Table Design Principles
Minimize Clutter
Differentiate the Header from the Body
Align Appropriately
Use the Correct Level of Precision
Use Color Intentionally
Add a Data Visualization Where Appropriate
Summary
Additional Resources
PART II: REPORTS, PRESENTATIONS,
AND WEBSITES
6
R MARKDOWN REPORTS
Creating an R Markdown Document
10. Document Structure
The YAML Metadata
The R Code Chunks
Markdown Text
Inline R Code
Running Code Chunks Interactively
Quarto
Summary
Additional Resources
7
PARAMETERIZED REPORTING
Report Templates in R Markdown
Defining Parameters
Generating Numbers with Parameters
Including Parameters in Visualization Code
Creating an R Script
Knitting the Document with Code
Creating a Tibble with Parameter Data
Best Practices
Summary
Additional Resources
8
SLIDESHOW PRESENTATIONS
Why Use xaringan?
How xaringan Works
Creating a New Slide
Adjusting the Size of Figures
Revealing Content Incrementally
Aligning Content with Content Classes
Adding Background Images to Slides
Applying CSS to Slides
Custom CSS
Themes
The xaringanthemer Package
Summary
Additional Resources
9
WEBSITES
Creating a New distill Project
The Project Files
R Markdown Documents
The _site.yml File
11. Building the Site
Applying Custom CSS
Working with Website Content
Applying distill Layouts
Making the Content Interactive
Hosting the Website
Cloud Hosting
GitHub Hosting
Summary
Additional Resources
10
QUARTO
Creating a Quarto Document
Comparing R Markdown and Quarto
The format and execute YAML Fields
Individual Code Chunk Options
Dashes in Option Names
The Render Button
Parameterized Reporting
Making Presentations
Revealing Content Incrementally
Aligning Content and Adding Background Images
Customizing Your Slides with Themes and CSS
Making Websites
Building the Website
Setting Options
Changing the Website’s Appearance
Adjusting the Title and Navigation Bar
Creating Wider Layouts
Hosting Your Website on GitHub Pages and Quarto Pub
Summary
Additional Resources
PART III: AUTOMATION AND
COLLABORATION
11
AUTOMATICALLY ACCESSING ONLINE DATA
Importing Data from Google Sheets with googlesheets4
Connecting to Google
Reading Data from a Sheet
Using the Data in R Markdown
Importing Only Certain Columns
12. Accessing Census Data with tidycensus
Connecting to the Census Bureau with an API Key
Working with Decennial Census Data
Identifying Census Variable Values
Using Multiple Census Variables
Analyzing Census Data
Using a Summary Variable
Visualizing American Community Survey Data
Making Charts
Making Population Maps with the geometry Argument
Summary
Additional Resources
12
CREATING FUNCTIONS AND PACKAGES
Creating Your Own Functions
Writing a Simple Function
Adding Arguments
Creating a Function to Format Race and Ethnicity Data
Using ... to Pass Arguments to Another Function
Creating a Package
Starting the Package
Adding Functions with use_r()
Checking the Package with devtools
Adding Dependency Packages
Referring to Functions Correctly
Creating Documentation with Roxygen
Adding a License and Metadata
Writing Additional Functions
Installing the Package
Summary
Additional Resources
Wrapping Up
INDEX
13. PRAISE FOR
R FOR THE REST OF US
“... a fantastic and invaluable resource for anyone working
with or aspiring to work with data, regardless of their
background. Highly recommended.”
—GABRIELA DE QUEIROZ, DIRECTOR
OF AI, MICROSOFT
“Long overdue in the R ecosystem.”
—OSCAR BARUFFA, BIG BOOK OF R
“A great resource for anyone wishing to learn R ...”
—CARA THOMPSON, DATA
VISUALIZATION CONSULTANT
“David has captured some of the most compelling ways to
use R for data visualization and maps, automation,
reporting, and building websites.”
—TOM MOCK, PRODUCT MANAGER AT
POSIT
“An easy-to-read source of exciting case studies, relevant
code snippets, and helpful explanations ...”
—CÉDRIC SCHERER, DATA
VISUALIZATION AND INFORMATION
GRAPHICS DESIGNER
“Demonstrates how succinctly R can be used to rapidly
solve non-statistics problems.”
—BOB RUDIS, VP OF DATA SCIENCE,
SECURITY RESEARCH & DETECTION
ENGINEERING AT GREYNOISE
INTELLIGENCE
14. R FOR THE REST OF US
A Statistics-Free Introduction
by David Keyes
San Francisco
17. For my wife, Rachel, and my children, Leila and Elias
18. About the Author
David Keyes is the founder of R for the Rest of Us
(https://rfortherestofus.com), where he develops courses,
conducts corporate trainings, and works with organizations
to harness the power of R. While leading a team of
consultants, he has overseen the creation of many R-based
reports. As a self-taught R user with a qualitative
background, he helps people who don’t think of themselves
as R users learn to use this powerful tool.
About the Technical Reviewer
Rita Giordano is an independent data visualization
consultant and LinkedIn instructor based in the UK. She is
a physicist and has a PhD in statistics applied to structural
biology and has extensive research and data science
experience.
19. ACKNOWLEDGMENTS
This book is a testament to the many members of the R
community who share their knowledge freely and
encourage others generously. I call myself self-taught, but
really what I am is community-taught. Throughout this
book, you will read about several R users from whom I have
learned so much; still, many others go unmentioned. To
everyone who has worked to develop R, share your
knowledge about R, and make R a welcoming place, thank
you.
I’d also like to thank the team at R for the Rest of Us.
Working directly with talented R users has taught me so
much about what is possible with R.
Finally, I’d like to thank people who have provided
feedback as I’ve written this book. Technical reviewer Rita
Giordano has helped me make sure everything works and
suggested great ideas for improvement. My editor, Frances
Saux, has provided fantastic input along the way. To Bill
Pollock and the entire team at No Starch: thank you for
taking a flyer on me and my strange idea to write a book
about nonstatistical uses of a tool created for statistics.
20. INTRODUCTION
In early 2020, as the world
struggled to contain the spread
of COVID-19, one country succeeded
where others did not: New Zealand.
There are many reasons New Zealand
was able to tackle COVID-19. One was the
R programming language (yes, really).
This humble tool for data analysis helped New Zealand
fight COVID-19 by enabling a Ministry of Health team to
generate daily reports on cases throughout New Zealand.
Based on the information in these reports, officials were
able to develop policies that kept the country largely free of
COVID-19. The team was small, however, so producing the
reports every day with a tool like Excel wouldn’t have been
feasible. As team leader Chris Knox told me, “Trying to do
what we did in a point-and-click environment is not
possible.”
Instead, a few staff members wrote R code that they
could run every day to produce updated reports. These
reports did not involve any complicated statistics; they
were literally counts of COVID-19 cases. Their value came
21. from everything else that R can do: data analysis and
visualization, report creation, and workflow automation.
This book explores the many ways that people use R to
communicate and automate tasks. You’ll learn how to do
the following:
Make professional-quality data visualizations, maps, and
tables
Replace a clunky multi-tool workflow to create reports
with R Markdown
Use parameterized reporting to generate multiple
reports at once
Produce slideshow presentations and websites using R
Markdown
Automate the process of importing online data from
Google Sheets and the US Census Bureau
Create your own functions to automate tasks you do
repeatedly
Bundle your functions into a package that you can share
with others
Best of all, you’ll do all of this without performing any
statistical analysis more complex than calculating averages
Isn’t R Just for Statistical Analysis?
Many people think of R as simply a tool for hardcore
statistical analysis, but it can do much more than
manipulate numerical values. After all, every R user must
illuminate their findings and communicate their results
somehow, whether that’s via data visualizations, reports,
websites, or presentations. Also, the more you use R, the
more you’ll find yourself wanting to automate tasks you
currently do manually.
As a qualitatively trained anthropologist without a
quantitative background, I used to feel ashamed about
22. using R for my visualization and communication tasks. But
the fact is, R is good at these jobs. The ggplot2 package is
the tool of choice for many top information designers.
Users around the world have taken advantage of R’s ability
to automate reporting to make their work more efficient.
Rather than simply replacing other tools, R can perform
tasks that you’re probably already doing, like generating
reports and tables, better than your existing workflow.
23. Who This Book Is For
No matter your background, using R can transform your
work. This book is for you if you’re either a current R user
keen to explore its uses for visualization and
communication or a non-R user wondering if R is right for
you. I’ve written R for the Rest of Us so that it should make
sense whether or not you’ve ever written a line of R code.
But even if you’ve written entire R programs, the book
should help you learn plenty of new techniques to up your
game.
R is a great tool for anyone who works with data. Maybe
you’re a researcher looking for a new way to share your
results. Perhaps you’re a journalist looking to analyze
public data more efficiently. Or maybe you’re a data analyst
tired of working in expensive, proprietary tools. If you have
to work with data, you will get value from R.
About This Book
Each chapter focuses on one use of the R language and
includes examples of real R projects that employ the
techniques covered. I’ll dive into the project code, breaking
the programs down to help you understand how they work,
and suggest ways of going beyond the example. The book
has three parts, outlined here.
In Part I, you’ll learn how to use R to visualize data.
Chapter 1: An R Programming Crash Course
Introduces the RStudio programming environment and
the foundational R syntax you’ll need to understand the
rest of the book.
Chapter 2: Principles of Data Visualization Breaks
down a visualization created for Scientific American on
drought conditions in the United States. In doing so,
this chapter introduces the ggplot2 package for data
24. visualization and addresses important principles that
can help you make high-quality graphics.
Chapter 3: Custom Data Visualization Themes
Describes how journalists at the BBC made a custom
theme for the ggplot2 data visualization package. As the
chapter walks you through the package they created,
you’ll learn how to make your own theme.
Chapter 4: Maps and Geospatial Data Explores the
process of making maps in R using simple features data.
You’ll learn how to write map-making code, find
geospatial data, choose appropriate projections, and
apply data visualization principles to make your map
appealing.
Chapter 5: Designing Effective Tables Shows you
how to use the gt package to make high-quality tables in
R. With guidance from R table connoisseur Tom Mock,
you’ll learn the design principles to present your table
data effectively.
Part II focuses on using R Markdown to communicate
efficiently. You’ll learn how to incorporate visualizations
like the ones discussed in Part I into reports, slideshow
presentations, and static websites generated entirely using
R code.
Chapter 6: R Markdown Reports Introduces R
Markdown, a tool that allows you to generate a
professional report in R. This chapter covers the
structure of an R Markdown document, shows you how
to use inline code to automatically update your report’s
text when data values change, and discusses the tool’s
many export options.
Chapter 7: Parameterized Reporting Covers one of
the advantages of using R Markdown: the ability to
produce multiple reports at the same time using a
technique called parameterized reporting. You’ll see
25. how staff members at the Urban Institute used R to
generate fiscal briefs for all 50 US states. In the
process, you’ll learn how parameterized reporting
works and how you can use it.
Chapter 8: Slideshow Presentations Explains how
to use R Markdown to make slides with the xaringan
package. You’ll learn how to make your own
presentations, adjust your content to fit on a slide, and
add effects to your slideshow.
Chapter 9: Websites Shows you how to create your
own website with R Markdown and the distill package.
By examining a website about COVID-19 rates in
Westchester County, New York, you’ll see how to create
pages on your site, add interactivity through R
packages, and deploy your website in multiple ways.
Chapter 10: Quarto Explains how to use Quarto, the
next-generation version of R Markdown. You’ll learn
how to use Quarto for all of the projects you previously
used R Markdown for (reports, parameterized
reporting, slideshow presentations, and websites).
Part III focuses on ways you can use R to automate your
work and share it with others.
Chapter 11: Automatically Accessing Online Data
Explores two R packages that let you automatically
import data from the internet: googlesheets4 for working
with Google Sheets and tidycensus for working with US
Census Bureau data. You’ll learn how the packages
work and how to use them to automate the process of
accessing data.
Chapter 12: Creating Functions and Packages
Shows you how to create your own functions and
packages and share them with others, which is one of
R’s major benefits. Bundling your custom functions into
a package can enable other R users to streamline their
27. Kingman stood up. Apparently the lawyer believed that his
pronouncement would carry more weight by looming over the
smiling, easy-going faces of his parties-of-the-second-part. "I am
prepared to negotiate with your legal department; offering them, and
you, the full rights to the transmission tube. This will include full
access to any and all discoveries, improvements, and/or changes
made at any time from its discovery to the termination of this
contract, which shall be terminated only by absolute mutual
agreement between Terran Electric and Venus Equilateral.
"In return for this, Venus Equilateral will permit Terran Electric to
exploit the solar beam tube fully and freely, and exclusively—"
"Make that slightly different," said Channing. "Terran Electric's rights
shall prevail exclusively—except within the realm of space, upon
man-made celestial objects, and upon the satellites and minor
natural celestial bodies where sub-relay stations of the Interplanetary
Communications Company are established."
Kingman thought that one over. "In other words, if the transport
companies desire to use the solar beam, you will hold domain from
the time they leave an atmosphere until they again touch—"
"Let's not complicate things," smiled Don cheerfully. "I like
uncomplicated things."
Kingman smiled wryly. "I'm sure," he agreed with fine sarcasm. "But I
see your point. You intend to power the communications system with
the solar beam. That is natural. Also, you feel that a certain amount
of revenue should be coming your way. Yes, I believe that our legal
departments can agree."
"So let's not make the transport companies change masters in mid-
space," smiled Don.
"You are taking a lot on your shoulders," said Kingman. "We wouldn't
permit our technicians to dictate the terms of an agreement."
"You are not going to like Venus Equilateral at all," laughed Don. "We
wouldn't permit our legal department to dabble in things of which
they know nothing. Years ago, when the first concentric beam was
invented, which we now use to punch a hole in the Heaviside Layer,
28. communications was built about a group of engineers. We held the
three inner planets together by the seat of our pants, so to speak,
and nurtured communications from a slipshod, hope-to-God-it-gets-
through proposition to a sure thing. Funny thing, but when people
were taking their messages catch as catch can, there was no reason
for legal lights. Now that we can and do insure messages against
their loss, we find that we are often tied up with legal red tape.
"Otherwise, we wouldn't have a lawyer on the premises. They serve
their purpose, no doubt, but in this gang, the engineers tell the
attorneys how to run things. We shall continue to do so. Therefore
you are speaking with the proper parties, and once the contract is
prepared by you, we shall have an attorney run through the
whereases, wherefores, and parties of the first, second, and third
parts to see that there is no sleight of hand in the microscopic type."
"You're taking a chance," warned Kingman. "All men are not as
fundamentally honest as Terran Electric."
"Kingman," smiled Channing, "I hate to remind you of this, but who
got what just now? We wanted the transmission tube."
"I see your point. But we have a means of getting power out of the
sun."
"We have a hunk of that, too. It would probably have been a mere
matter of time before some bright bird at Terran found the thing as it
was."
"I shall see that the contract gives you domain over man-made
objects in space—including those that occasionally touch upon the
natural celestial objects. Also the necessary equipment operating
under the charter of Venus Equilateral, wherever or whenever it may
be, including any future installations."
"Fine."
"You may have trouble understanding our feelings. We are
essentially a space-born company, and as such we can have no one
at the helm who is not equipped to handle the technical details of
operations in space." Channing smiled reminiscently. "We had a so-
called efficiency expert running Venus Equilateral a couple of years
29. ago, and the fool nearly wrecked us because he didn't know that the
airplant was not a mass of highly complicated, chemical reaction
machinery instead of what it really is. Kingman, do you know what an
airplant is?"
"Frankly, no, I should imagine it is some sort of air-purifying device."
"You'll sit down hard when I tell you that the airplant is just what it is.
Martian saw grass! Brother Burbank tossed it out because he
thought it was just weeds, cluttering up the place. He was allergic to
good engineering, anyway."
"That may be good enough in space," said Kingman, "but on Terra,
we feel that our engineers are not equipped to dabble in the legal
tangles that follow when they force us to establish precedent by
inventing something that has never been covered by a previous
decision."
"O.K.," said Don. "Every man to his own scope. Write up your
contract, Kingman, and we'll all climb on the band wagon with our
illiterary X's."
In Evanston, north of Chicago, the leaves changed from their riotous
green to a somber brown, and fell to lay a blanket over the earth.
Snow covered the dead leaves, and Christmas, with its holly, went
into the past, followed closely by New Year's Eve with its hangover.
And on a roof by the shore of Lake Michigan, a group of men stood
in overcoats beside a huge machine that towered above the great
letters of the Terran Electric Company sign that could be seen all the
way from Gary, Indiana.
It was a beautiful thing, this tube; a far cry from the haywire thing that
had brought solar power to Venus Equilateral. It was mounted on
gimbals, and the metal was bright-plated and perfectly machined.
Purring motors caused the tube to rotate to follow the sun.
"Is she aligned?" asked the project engineer.
30. "Right on the button."
"Good. We can't miss with this one. There may have been
something sour with the rest, but this one ran Venus Equilateral—the
whole relay station—for ten days without interruption."
He faced the anxious men in overcoats. "Here we go," he said, and
his hand closed upon the switch that transferred the big tube from
test power to operating power.
The engineer closed the switch, and stepped over to the great,
vaned, air-cooled ammeter shunt. On a panel just beyond the shunt
the meter hung—
At Zero!
"Um," said the project engineer. "Something wrong, no doubt."
They checked every connection, every possible item in the circuit.
"Nothing wrong!"
"Oh, now look," said the project engineer. "This isn't hell, where the
equipment is always perfect except that it doesn't work."
"This is hell," announced his assistant. "The thing is perfect—except
that it doesn't work."
"It worked on Venus Equilateral."
"We've changed nothing, and we handled that gadget like it was
made of cello-gel. We're running the same kind of voltage, checked
on standard voltmeters. We're within one-tenth of one percent of the
original operating conditions. But—no power."
"Call Channing."
The beams between Terra and Venus Equilateral carried furious
messages for several hours. Channing's answer said: "I'm curious.
Am bringing the experimental ship to Terra to investigate."
The project engineer asked: "Isn't that the job they hooked up to use
the solar power for their drive?"
His assistant said: "That's it. And it worked."
31. "I know. I took a run on it!"
Channing was taking a chance, running the Relay Girl to Terra, but
he knew his ship, and he was no man to be overcautious. He drove it
to Terra at three G, and by dead reckoning, started down into Terra's
blanket of air, heading for the Terran Electric plant which was
situated on the lake shore.
Then down out of the cloudless sky came the Relay Girl in a free fall.
It screamed with the whistle of tortured air as it fell, and it caught the
attention of every man that was working at Terran Electric.
Only those on the roof saw the egg-shaped hull fall out of the sky
unchecked; landing fifteen hundred yards offshore in Lake Michigan.
The splash was terrific.
"Channing—!" said the project engineer, aghast.
"No, look there—a lifeship!"
Cautiously sliding down, a minute lifeship less than the size of a
freight car came to a landing in the Terran Electric construction yard.
Channing emerged, his face white. He bent down and kissed the
steel grille of the construction yard fervently.
Someone ran out and gave Channing a brown bottle. Don nodded,
and took a draw of monstrous proportions. He gagged, made a face,
and smiled in a very wan manner.
"Thanks," he said shakily. He took another drink, of more
gentlemanly size.
"What happened?"
"Dunno: Was coming in at three G. About four hundred miles up, the
deceleration just quit. Like that! I made it to the skeeter, here, in just
about enough time to get her away with about two miles to go.
Whoosh!"
Don dug into his pocket and found cigarettes. He lit up and drew
deeply. "Something cockeyed, here. That stoppage might make me
think that my tube failed; but—"
32. "You suspect that our tube isn't working for the same reason?"
finished the project engineer.
"Yes. I'm thinking of the trick, ultra-high powered, concentric beams
we have to use to ram a hole through the Heaviside Layer. We start
out with three million watts of sheer radio frequency and end up with
just enough to make our receivers worth listening to. Suppose this
had some sort of Heaviside Layer?"
"In which case, Terran Electric hasn't got solar power," said the
project engineer. "Tim, load this bottle into the Electric Lady, and
we'll see if we can find this barrier." To Channing, he said: "You look
as though you could stand a rest. Check into a hotel in Chicago and
we'll call you when we're ready to try it out."
Channing agreed. A shave, a bath, and a good night's sleep did
wonders for his nerves, as did a large amount of Scotch. He was at
Terran Electric in the morning, once more in command of himself.
Up into the sky went the ship that carried the solar tube. It remained
inert until the ship passed above three hundred and forty miles. Then
the ammeter needle swung over, and the huge shunt grew warm.
The tenuous atmosphere outside of the ship was unchanged, yet the
beam drew power of gigantic proportions.
They dropped again. The power ceased.
They spent hours rising and falling, charting this unknown barrier
that stopped the unknown radiation from bringing solar power right
down to earth. It was there, all right, and impervious. Above,
megawatts raced through the giant shunt. Below, not even a
microammeter could detect a trace of current.
"O.K., Don," said the project engineer. "We'll have to do some more
work on it. It's nothing of your doing."
Mark Kingman's face was green again, but he nodded in agreement.
"We seem to have a useless job here, but we'll think of something."
They studied the barrier and established its height as a constant
three hundred and thirty-nine, point seven six miles above Terra's
mythical sea level. It was almost a perfect sphere, that did not
33. change with the night and day, as did the Heaviside Layer. There
was no way to find out how thick it was, but thickness was of no
importance, since it effectively stopped the beam.
Then as Don Channing stepped aboard the Princess of the Sky to
get home again, the project engineer said: "If you don't mind, I think
we'll call that one the Channing Layer!"
"Yeah," grinned Don, pleased at the thought, "and forever afterward
it will stand as a cinder in the eye of Terran Electric."
"Oh," said the project engineer, "we'll beat the Channing Layer."
But the project engineer was a bum prophet—
Interlude:
Baffled and beaten, Mark Kingman returned to Terran Electric empty
handed. He hated science and the men who revelled in it, though he
was not above using science—and the men who revelled in it—to
further his own unscientific existence. The poetic justice that piled
blow upon blow on his unprotected head was lost on Mark Kingman
and he swore eternal vengeance.
With a say in the operations at Terran Electric, Kingman directed that
the engineers and scientists work furiously to discover something
about this strange radiation that made the energy beam possible,
that drove spacecraft across the void, and which now was drawing
power out of the sun to feed the requirements of men who owed
allegiance to Venus Equilateral.
Kingman was losing his sense of values. He accused Venus
Equilateral of trickery. Quietly, of course, for people had faith in the
operations of the relay station personnel and would stand for no
criticism. Because people found Venus Equilateral and all that went
with it both good and upstanding in the face of what Mark Kingman
believed, it infuriated him to the point of illegality.
34. And the evil fate that makes evil men appear to flourish smiled upon
Mark Kingman, while all that Channing had to fight back with was his
faith in the unchanging physical laws of science.
But Kingman thought he was smart enough to beat Venus
Equilateral at their own business!
35. BEAM PIRATE
Mark Kingman was in a fine state of nerves. He looked upon life and
the people in it as one views the dark-brown taste of a hangover. It
seemed to him at the present time that the Lord had forsaken him,
for the entire and complete success of the solar beam had been left
to Venus Equilateral by a sheer fluke of nature.
Neither he, nor anyone else, could have foreseen the Channing
Layer, that effectively blocked any attempt to pierce it with the
strange, sub-level energy spectrum over which the driver tube and
the power-transmission tube worked, representing the so-called
extremes of the spectrum.
But Venus Equilateral, for their part, was well set. Ships plied the
spaceways, using their self-contained power only during atmospheric
passage, and paid Venus Equilateral well for the privilege. The relay
station itself was powered on the solar beam. There were other relay
stations that belonged to the Interplanetary Communications
Company; Luna, Deimos and Phobos, and the six that circled Venus
in lieu of a satellite; all were powered by the solar beam. The solar
observatory on Mercury used but little power, so the needs of the
observatory became the sole income for Terran Electric's planetary
rights of the solar beam, since Mercury owned no air of its own.
Mark Kingman was beginning to feel the brunt of Channing's
statement to the effect that legal-minded men were of little
importance when it came to the technical life in space, where men's
lives and livelihood depended more on technical skill than upon the
legal pattern set for their protection in the complex society of
planetary civilization.
He swore vengeance.
So, like the man who doggedly makes the same mistake twice in a
row, Kingman was going to move Heaven, Hell, and three planets in
36. an effort to take a swing at the same jaw that had caught his fist
between its teeth before.
Out through the window of his office, he saw men toiling with the big
tube on the far roof; the self-same tube that had carried the terrific
load of Venus Equilateral for ten days without interruption and with
no apparent overload. Here on Terra, its output meter, operating
through a dummy load, showed not the slightest inclination to leave
the bottom peg and seek a home among the higher brackets.
So Kingman cursed and hated himself for having backed himself into
trouble. But Kingman was not a complete fool. He was a brilliant
attorney, and his record had placed him in the position of Chief
Attorney for Terran Electric, which was a place of no mean
importance. He had been licked on the other fellow's ground, with
the other fellow's tools.
He picked up papers that carried, side by side, the relative assets of
Venus Equilateral and Terran Electric. He studied them and thought
deeply.
To his scrutiny, the figures seemed about equal, though perhaps
Venus Equilateral was a bit ahead.
But—he had been licked on the other fellow's ground with the other
fellow's weapons. He thought that if he fought on his own ground
with his own tools he might be able to swing the deal.
Terran Electric was not without a modicum of experience in the tools
of the other fellow. Terran Electric's engineering department was
brilliant and efficient, too; at least the equal of Channing and Franks
and their gang of laughing gadgeteers. That not only gave him the
edge of having his own tools and his own ground, but a bit of the
other fellow's instruments, too. Certainly his engineering department
should be able to think of something good.
William Cartwright, business manager for Venus Equilateral,
interrupted Don and Walt in a discussion. He carried a page of stock
market quotations and a few hundred feet of ticker tape.
Channing put down his pencil and leaned back in his chair. Walt did
likewise, and said: "What's brewing?"
37. "Something I do not like."
"So?"
"The stock has been cutting didoes. We've been up and down so
much it looks like a scenic railway."
"How do we come out?"
"Even, mostly; but from my experience, I would say that some bird is
playing hooky with Venus Equilateral, Preferred. The common is
even worse."
"Look bad?"
"Not too good. It is more than possible that some guy with money
and the desire might be able to hook a large slice of V.E. Preferred. I
don't think they could get control, but they could garner a plurality
from stock outstanding on the planets. Most of the preferred stock is
in the possession of the folks out here, you know, but aside from
yourself, Walt, and a couple dozen of the executive personnel, the
stock is spread pretty thin. The common stock has a lot of itself
running around loose outside. Look!"
Cartwright began to run off the many yards of ticker tape. "Here,
some guy dumped a boatload at Canalopsis, and some other guy
glommed onto a large hunk at New York. The Northern Landing
Exchange showed a bit of irregularity during the couple of hours of
tinkering, and the irregularity was increased because some bright
guy took advantage of it and sold short." He reeled off a few yards
and then said: "Next, we have the opposite tale. Stuff was dumped at
Northern Landing, and there was a wild flurry of bulling at
Canalopsis. The Terran Exchange was just flopping up and down in
a general upheaval, with the boys selling at the top and buying at the
bottom. That makes money, you know, and if you can make the
market tick your way—I mean control enough stuff—your purchases
at the bottom send the market up a few points, and then you dump it
and it drops again. It wouldn't take more than a point or two to make
a guy rich, if you had enough stock and could continue to make the
market vacillate."
38. "That's so," agreed Don. "Look, Bill, why don't we get some of our
Terran agents to tinkering, too? Get one of our best men to try to
outguess the market. As long as it is being done systematically, he
should be able to follow the other guy's thinking. That's the best we
can do unless we go Gestapo and start listening in on all the stuff
that goes through the station here."
"Would that help?"
"Yeah, but we'd all land in the hoosegow for breaking the secrecy
legislation. You know. 'No one shall ... intercept ... transmit ...
eavesdrop upon ... any message not intended for the listener, and ...
shall not ... be party to the use of any information gained ... et
cetera.' That's us. The trouble is this lag between the worlds. They
can prearrange their bulling and bearing ahead of time and play
smart. With a little luck, they can get the three markets working just
so—going up at Northern Landing; down at Terra; and up again at
Canalopsis, just like waves in a rope. By playing fast and loose on
paper, they can really run things hell, west and crooked. Illegal,
probably, since they each no doubt will claim to have all the stock in
their possession, and yet will be able to sell and buy the same stock
at the same time in three places."
"Sounds slightly precarious to me," objected Cartwright.
"Not at all, if you figure things just right. At a given instant, Pete may
be buying at sixty-five on Venus; Joe might be selling like furious at
seventy-one on Mars; and Jimmy may be bucking him up again by
buying at sixty-five on Terra. Then the picture and the tickers catch
up with one another, and Joe will start buying again at sixty-five,
whilst Pete and Jimmy are selling at seventy-one. Once they get
their periodicity running, they're able to tinker the market for quite a
time. That's where your man comes in, Bill. Have him study the
market and step in at the right time and grab us all a few cheap
ones. Get me?"
"Sure," said Cartwright. "I get it. In that way, we'll tend to stabilize the
market, as well as getting the other guy's shares."
39. "Right. I'll leave it up to you. Handle this thing for the best interests of
all of us."
Cartwright smiled once again, and left with a thoughtful expression
on his face. Channing picked up the miniature of the power-
transmission tube and studied it as though the interruption had not
occurred. "We'll have to use about four of these per stage," he said.
"We'll have to use an input terminal tube to accept the stuff from the
previous stage, drop it across the low-resistance load, resistance
couple the stage to another output terminal tube where we can make
use of the coupling circuits without feedback. From there into the
next tube, with the high resistance load, and out of the power-putter-
outer tube across the desk to the next four-bottle stage."
"That's getting complicated," said Walt. "Four tubes per stage of
amplification."
"Sure. As the arts and sciences get more advanced, things tend to
get more complicated."
"That's essentially correct," agreed Walt with a smile. "But you're
foreguessing. We haven't even got a detector that will detect driver
radiation."
"I know, and perhaps this thing will not work. But after all, we've got
the tubes and we might just as well try them out just in case. We'll
detect driver radiation soon enough and then we might as well have
a few odd thoughts on how to amplify it for public use. Nothing could
tickle me more than to increase those three circles on our letterhead
to four. 'Planet to Planet, and Ship to Ship' is our hope. This one-way
business is not to my liking. How much easier it would have been if
I'd been able to squirt a call in to the station when I was floating out
there beyond Jupiter in that wrecked ship. That gave me to think,
Walt. Driver radiation detection is the answer."
"How so?"
"We'll use the detector to direct our radio beam, and the ship can
have a similar gadget coupled to their beam, detecting a pair of
drivers set at one hundred and eighty degrees from one another so
40. the thrust won't upset the station's celestial alignment. We can point
one of them at the ship's course, even, making it easier for them."
"Speaking of direction," said Walt thoughtfully, "have you figured why
the solar beam is always pointing behind Sol?"
"I haven't given that much thought. I've always thought that it was
due to the alignment plates not being in linear perfection so that the
power beam bends. They can make the thing turn a perfect right
angle, you know."
"Well, I've been toying with the resurrected heap you dropped into
Lake Michigan a couple of months ago, and I've got a good one for
you. You know how the beam seems to lock into place when we've
got it turned to Sol, not enough to make it certain, but more than
detectably directive?"
"Yep. We could toss out the motor control that keeps her face turned
to the sun."
"That's what I was hoping to gain—" started Walt, but he stopped as
the door opened and Arden entered, followed by a man and woman.
"Hello," said Walt in a tone of admiration.
"This is Jim Baler and his sister Christine," said Arden. "Baler, the
guy with the worried look on his face is my legally wedded souse—
no, spouse. And the guy with the boudoir gorilla gleam in his vulpine
eyes is that old vulture, Walt Franks."
Walt took the introduction in his stride and offered Christine his chair.
Arden stuck her tongue out at him, but Walt shrugged it off.
Channing shook hands with Jim Baler and then sought the "S"
drawer of his file cabinet. He found the Scotch and the soda, and
then grinned: "Should have the ice under 'I' but it's sort of perishable,
and so we keep it in the refrigerator. Arden, breach the 'G' drawer,
please, and haul out the glasses. I suppose we could refrigerate the
whole cabinet, but it wouldn't sound right if people heard that we
kept their mail on ice. Well—"
"Here's how, if we don't already know," said Walt, clinking glasses
with Christine.
41. "Walt earned that 'wolf' title honestly," laughed Arden, "he likes to
think. Frankly, he's a sheep in wolf's clothing!"
"What are his other attributes?" asked Christine.
"He invents. He scribbles a bit. He cuts doodles on tablecloths, and
he manages to get in the way all the time," said Don. "We keep him
around the place for his entertainment value."
"Why—"
"Quiet, Walter, or I shall explain the sordid details of the Walter
Franks Electron Gun."
"What was that one?" asked Christine.
"You really wouldn't want to know," Walt told her.
"Oh, but I would."
"Yeah," growled Franks, "you would!"
"Would you rather hear it from him or me?" Arden asked.
"He'll tell me," said Christine. Her voice was positive and assured.
"And that'll take care of that," said Arden. "But I think we interrupted
something. What were you saying about gaining, Walt?"
"Oh, I was saying that I was tinkering around with the Anopheles. We
hooked it up with the solar beam for power, and I got to wondering
about that discrepancy. The faster you go, the greater is the angular
displacement, and then with some measurements, I came up with a
bugger factor—"
"Whoa, goodness," laughed Christine. "What is a bugger factor?"
"You'll learn," said Arden, "that the boys out here have a language all
their own. I've heard them use that one before. The bugger factor is
a sort of multiplying, or dividing, or additive, or subtractive quantity.
You perform the mathematical operation with the bugger factor, and
your original wrong answer turns into the right answer."
"Is it accepted?"
42. "Oh, sure," answered Arden. "People don't realize it, but that string
of 4's in the derivation of Bode's law is a bugger factor."
"You," said Christine to Walt, "will also tell me what Bode's law is—
but later."
"O.K.," grinned Walt. "At any rate, I came up with a bugger factor
that gave me to think. The darned solar beam points to where Sol
actually is!"
"Whoosh!" exclaimed Channing. "You don't suppose we're tinkering
with the medium that propagates the law of gravity?"
"I don't know. I wouldn't know. Has anyone ever tried to measure the
velocity of propagation of the attraction of gravity?"
"No, and no one will until we find some way of modulating it."
Jim Baler smiled. "No wonder Barney was a little wacky when he got
home. I come out here to take a look around and maybe give a lift to
your gang on the transmission tube—and bump right into a
discussion on the possibility of modulating the law of gravity!"
"Not the law, Jim, just the force."
"Now he gets technical about it. You started out a couple of months
ago to detect driver radiation, and ended up by inventing a beam that
draws power out of the sun. Think you'll ever find the driver
radiation?"
"Probably."
"Yeah," drawled Arden. "And I'll bet a hat that when they do, they
won't have any use for it. I've seen 'em work before."
"Incidentally," said Christine, "you mentioned the Anopheles, and I
think that is the first ship I've ever heard of that hasn't a feminine
name. How come?"
"The mosquito that does the damage is the female," grinned Jim.
"The Mojave spaceyards owns a sort of tender craft. It has a couple
of big cranes on the top and a whole assortment of girders near the
bottom. It looks like, and is also called The Praying Mantis. Those
43. are also female: at least the ones that aren't afraid of their own
shadow are."
Channing said suddenly: "Walt, have you tried the propagation-time
of the solar beam on the Anopheles?"
"No. How would we go about doing that?"
"By leaving the controls set for one G, and then starting the ship by
swapping the tube energizing voltages from test power to operating
power."
"Should that tell us?"
"Sure. As we know, the amount of energy radiated from the sun
upon a spot the size of our solar tube is a matter of peanuts
compared to the stuff we must get out of it. Ergo, our beam must go
to Sol and collect the power and draw it back down the beam.
Measure the transit-time, and we'll know."
"That's an idea. I've got a micro-clock in the lab. We can measure it
to a hundred-millionth of a second. Anyone like to get shook up?"
"How?" asked Jim.
"Snapping from zero to one G all to oncet-like isn't too gentle. She'll
knock your eyes out."
"Sounds like fun. I'm elected."
"So am I," insisted Christine.
"No," said Jim. "I know what he's talking about."
"So do I," said Arden. "Don't do it."
"Well, what better have you to offer?" asked Christine unhappily.
"You and I are going down to the Mall."
Channing groaned in mock anguish. "Here goes another closet full of
female haberdashery. I'm going to close that corridor some day, or
put a ceiling on the quantity of sales, or make it illegal to sell a
woman anything unless she can prove that 'she has nothing to
wear!'"
44. "That, I'd like to see," said Walt.
"You would," snorted Arden. "Come on, Chris. Better than the best of
three worlds is available."
"That sort of leaves me all alone," said Don. "I'm going to look up
Wes Farrell and see if he's been able to make anything worth looking
at for a driver detector."
Don found Wes in the laboratory, poring over a complicated circuit.
Farrell was muttering under his breath, and probing deep into the
maze of haywire on the bench.
"Wes, when you get to talking to yourself, it's time to take a jaunt to
Joe's."
"Not right now," objected Wes. "I haven't got that hollow leg that your
gang seem to have developed. Besides, I'm on the trail of
something."
"Yes?" Channing forgot about Joe's, and was all interest.
"I got a wiggle out of the meter there a few minutes ago. I'm trying to
get another one."
"What was it like?"
"Wavered up and down like fierce for about a minute after I turned it
on. Then it died quick, and has been dead ever since."
"Could it have been anything cockeyed with the instruments?"
"Nope. I've checked every part in this circuit, and everything is as
good as it ever will be. No, something external caused that
response."
"You've tried the solar tube with a dynode of the same alloy as the
driver cathodes?"
"Uh-huh. Nothing at all. Oh, I'll take that back. I got a scratch. With a
pre-meter gain of about four hundred decibels, I read three micro-
microamperes. That was detected from a driver tube forty feet
across the room, running at full blast. I wondered for a minute
45. whether the opposing driver was doing any cancellation, and so I
took a chance and killed it for about a half second, but that wasn't it."
"Nuts. Does the stuff attenuate with distance?"
"As best as I could measure, it was something to the tune of
inversely proportional to the cube of the distance. That's not normal
for beams since it shows that the stuff isn't globularly radiated. But
the amplifier gain was hanging right on the limit of possible
amplification, and the meter was as sensitive as a meter can be
made, I think. You couldn't talk from one end of Venus Equilateral to
the other with a set like that."
"No, I guess you're right. Hey! Look!"
The meter took a sudden upswing, danced for a minute, and died
once more.
"What have you got in there? What did you change?"
"Oh, I got foolish and tried a tuned circuit across the output of one of
the miniature transmission tubes. It's far enough away from the big
beams and stuff at the north end so that none of the leakage can
cause trouble. Besides, I'm not getting anything like our beam
transmissions."
Channing laughed. "Uh-huh, looks to me like you're not getting much
of anything at all."
Farrell smiled wryly. "Yeah, that's so," he agreed. "But look, Don,
Hertz himself didn't collect a transcontinental short-wave broadcast
on his first attempt."
"If Hertz had been forced to rely upon vacuum tubes, his theories
couldn't have been formulated, I think," said Channing. "At least, not
by him. The easier frequencies and wave lengths are too long; a five
hundred meter dipole can't be set up in a small room for laboratory
tinkering. The kind of frequencies that come of dipoles a couple of
feet long, such as Hertz used, are pretty hard to work with unless
you have special tubes."
"Hertz had rotten detectors, too. But he made his experiments with
spark-gap generators, which gave sufficient high-peak transients to
46. induce spark-magnitude voltages in his receiving dipole."
"I'm not too sure of that tuned-circuit idea of yours, Wes. Go ahead
and tinker to your heart's content, but remember that I'm skeptical of
the standard resonance idea."
"Why?"
"Because we've been tinkering with driver tubes for years and years
—and we have also been gadgeting up detectors, radio hootnannies,
and stuff of the electronic spectrum all the way from direct current to
hard X-rays, and we have yet to have anything react to driver
radiation. Ergo, I'm skeptical."
The call bell rang for Channing, and he answered. It was Walt
Franks.
"Don," he said with a laugh in his voice, though it was apparent that
he felt slightly guilty about laughing, "got a 'gram from Addison, the
project engineer on the solar beam from Terran Electric. Says:
'Finally got through Channing Layer. Power by the megawatt hour in
great shape. But the atmosphere from the Channing Layer right
down to the snout of the tube is a dull red scintillation. Like the driver
tube trail—it ionizes the atmosphere into ozone. Power by the
megawatt, and ozone by the megaton.'"
"Ozone, hey? Lots of it?"
"Plenty, according to the rest of this. It looks to me like a sort of
'denatured' power system. There it is, all nice and potent, cheap, and
unlicensed. But the second swallow going down meets the first one
on the way back. Power they got—but the ozone they can't take; it's
poisonous like a nice dose of chlorine. Poor Terran Electric!"
Mark Kingman sat in the control room of a ship of space and worried.
Below the dome, Venus covered three-quarters of the sky, and it
circled slowly as the Terran Electric ship oscillated gently up and
down.
47. Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookfinal.com