Buy One, Get One 50% Off Our Monthly Picks!
Shop Now
ISBN-10:
1138726915
ISBN-13:
9781138726918
Pub. Date:
12/26/2018
Publisher:
Taylor & Francis
ISBN-10:
1138726915
ISBN-13:
9781138726918
Pub. Date:
12/26/2018
Publisher:
Taylor & Francis
Practical R for Mass Communication and Journalism / Edition 1

Practical R for Mass Communication and Journalism / Edition 1

by Sharon Machlis Sharon Machlis
Current price is , Original price is $62.95. You

Temporarily Out of Stock Online

Please check back later for updated availability.


Overview

Do you want to use R to tell stories? This book was written for you—whether you already know some R or have never coded before.

Most R texts focus only on programming or statistical theory. Practical R for Mass Communication and Journalism gives you ideas, tools, and techniques for incorporating data and visualizations into your narratives.

You’ll see step by step how to:

  • Analyze airport flight delays, restaurant inspections, and election results
  • Map bank locations, median incomes, and new voting districts
  • Compare campaign contributions to final election results
  • Extract data from PDFs
  • Whip messy data into shape for analysis
  • Scrape data from a website
  • Create graphics ranging from simple, static charts to interactive visualizations for the Web

If you work or plan to work in a newsroom, government office, non-profit policy organization, or PR office, Practical R for Mass Communication and Journalism will help you use R in your world.

This book has a companion website with code, links to additional resources, and searchable tables by function and task.

Sharon Machlis is the author of Computerworld’s Beginner’s Guide to R, host of InfoWorld’s Do More With R video screencast series, admin for the R for Journalists Google Group, and is well known among Twitter users who follow the #rstats hashtag. She is Director of Editorial Data and Analytics at IDG Communications (parent company of Computerworld, InfoWorld, PC World and Macworld, among others) and a frequent speaker at data journalism and R conferences.



Related collections and offers

Product Details

ISBN-13: 9781138726918
Publisher: Taylor & Francis
Publication date: 12/26/2018
Series: Chapman & Hall/CRC The R Series
Edition description: New Edition
Pages: 246
Product dimensions: 8.25(w) x 11.00(h) x (d)

About the Author

Sharon Machlis is the author of Computerworld’s Beginner’s Guide to R, host of InfoWorld’s Do More With R video screencast series, admin for the R for Journalists Google Group, and is well known among Twitter users who follow the #rstats hashtag. She is Director of Editorial Data and Analytics at IDG Communications (parent company of Computerworld, InfoWorld, PC World and Macworld, among others) and a frequent speaker at data journalism and R conferences.

Table of Contents

Introduction

Why programming?

Why R?

Is this book for you?


  1. Get Started With R in a Few Easy Steps
  2. What we’ll cover

    Download R and RStudio

    A brief introduction to RStudio

    Try out the console

    Install packages

    Additional infrastructure

    Getting help with packages and functions

    RStudio keyboard shortcuts

    Additional files available online

    Wrap-Up

    Additional resources

  3. See How Much You Can Do in a Few Lines of Code
  4. Packages needed this chapter

    What we’ll cover

    Simple stock market graphing

    Download and graph a city’s median income

    So many packages!

    Running functions without loading packages

    Comparing one city’s data to the US median

    Run a remote script to make an interactive map

    Bonus map: Mapping income data

    Wrap-Up

    Additional resources

  5. Import Data into R
  6. What we’ll cover

    Packages needed this chapter

    The magic of rio

    Import data from packages

    What’s a data frame? And what can you do with one?

    Easy sample data

    Exporting data

    Additional resources

  7. Basic Data Exploration
  8. Project: Weather data

    What we’ll cover

    Packages needed this chapter

    Download this book’s files

    Data summaries

    Data ‘interviews’

    Slicing and dicing your data set

    More sub setting with dplyr

    Wrap-Up

    Additional resources

  9. Beginning data visualization
  10. Project: More weather data

    What we’ll cover: How to

    Packages needed this chapter

    Answer questions with graphics

    Easy visualizations in or lines of code

    Some basic graphs

    The full power of ggplot

    Basic ggplot customizations

    Code snippets to the rescue

    Presentation-quality graphics

    Comment your code

    Wrap-up

    Additional resources

  11. Two or more data sets
  12. Project: Multiple files of US airline on-time data

    What we’ll cover

    Packages needed this chapter

    Add one table to the bottom of another

    What’s a list, and how do operate on one?

    lapply

    here () you are!

    Wrap-up

    Exercise Answer

    Additional resources

  13. Analyze data by groups
  14. Project: Airline on-time data analysis (cont)

    What we’ll cover

    Packages needed this chapter

    Lookup tables

    Beware of missing values

    Bar graph of raw data

    Wrap up

    Additional resources

  15. Graphing by Group
  16. Project: Visualizing airline on-time data

    What we’ll cover

    Packages needed this chapter

    Facets

    Housing prices by state

    Geofacets

    Customizing colors

    Color palettes

    Other packages that extend ggplot functionality

    Wrap-up

    Additional Resources

    Exercise answer

  17. Write your own R functions
  18. What we’ll cover

    Packages needed this chapter

    Function basics

    seq()

    If-then-else

    if statements for vectors

    A taste of testing

    Next steps for your functions

    More Resources

    Exercise Answer

    Exercise Answer

    Exercise

  19. Maps in R
  20. Map projects this chapter

    Skills we’ll cover

    Importing shape files into R

    Import data for mapping

    An even easier way to pull US Census data

    Interactive maps with tmap

    Importing and joining data

    Leaflet and points on a map

    geocoding and R’s paste () function

    Time to geocode with R (or maybe without)

    Mapping points with leaflet

    Points and polygons on a single map

    Mapping new political boundaries with leaflet

    Inspiration: Washington Post investigation

    Wrap-up

    Additional resources

  21. Putting it all Together: R on Election Day
  22. Project: Election data

    What we’ll cover

    Packages needed this chapter

    Election Day preparation

    Visualizing election results

    Graph for a smaller set of results

    plotly

    Other interactive alternatives

    Wrap-up

    (Non-election) inspiration

    Additional resources

  23. Date calculations
  24. Project: New York City restaurant inspections

    What we’ll cover

    Packages needed this chapter

    Get started with dates in R

    Get NYC inspection data

    Wrap-up

    Inspiration

    Additional resources

  25. Help! My data’s in the wrong format!
  26. Project: Election results in a PDF

    What we’ll cover

    Packages needed this chapter

    Human vs machine optimizing

    The raw data

    Extracting data from PDFs

    Tidying the data

    Reshaping the data

    ‘Long’ data back to ‘wide’

    Winners and runners-up

    Wrap-up

    Additional resource

    Using tabulizer to unlock the City Council data

  27. Integrate R With Your Storytelling Using R Markdown
  28. Project: Mixing text and R code about that snow data

    What we’ll cover

    Packages needed this chapter

    R Markdown basics

    Create an R Markdown document

    R Markdown text syntax

    R code chunks

    Adding R code to run

    Add an R-generated graph

    Setting option options

    Mixing R within text

    Even more options

    Repeatability with R Markdown parameters

    Wrap-up

    Additional resources

  29. Simple Web scraping
  30. Project: Download RStudio PDF cheat sheets

    What we’ll cover

    Packages needed this chapter

    Step: Follow the rules with robotstxt

    Step: Get a list of links

    Step: Download files

    Wrap-Up

    Additional resources

  31. An R project from start to finish

Project: Local political contribution and election data

What we’ll cover

Packages needed this chapter

Get the data, make it ready for analysis

Standardizing multiple versions of the same name

Making data frames

Analyzing and graphing the results

Visualizing results

Consider R Markdown

Additional resources

Additional resources

More functions, packages and tools worth a look

Stories done with R

Tutorials

Social media, communities, and Web resources

Appendix A Online: How do I

Appendix B Online: Functions

Appendix C Online: Packages

Customer Reviews