0%

Book Description

Did fake Twitter accounts help sway a presidential election? What can Facebook and Reddit archives tell us about human behavior? In Mining Social Media, senior BuzzFeed reporter Lam Thuy Vo shows you how to use Python and key data analysis tools to find the stories buried in social media.

Whether you’re a professional journalist, an academic researcher, or a citizen investigator, you’ll learn how to use technical tools to collect and analyze data from social media sources to build compelling, data-driven stories.

Learn how to:

•Write Python scripts and use APIs to gather data from the social web
•Download data archives and dig through them for insights
•Inspect HTML downloaded from websites for useful content
•Format, aggregate, sort, and filter your collected data using Google Sheets
•Create data visualizations to illustrate your discoveries
•Perform advanced data analysis using Python, Jupyter Notebooks, and the pandas library
•Apply what you’ve learned to research topics on your own

Social media is filled with thousands of hidden stories just waiting to be told. Learn to use the data-sleuthing tools that professionals use to write your own data-driven stories.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. BRIEF CONTENTS
  7. CONTENTS IN DETAIL
  8. ACKNOWLEDGMENTS
  9. INTRODUCTION
    1. What Is Data Analysis?
    2. Who Is This Book For?
    3. Conventions Used in This Book
    4. What This Book Covers
    5. Downloading and Installing Python
    6. Getting Help When You’re Stuck
    7. Summary
  10. PART I: DATA MINING
  11. 1 THE PROGRAMMING LANGUAGES YOU’LL NEED TO KNOW
    1. Frontend Languages
    2. Backend Languages
    3. Summary
  12. 2 WHERE TO GET YOUR DATA
    1. What Is an API?
    2. Using an API to Get Data
    3. Answering a Research Question Using Data
    4. Summary
  13. 3 GETTING DATA WITH CODE
    1. Writing Your First Script
    2. Running a Script
    3. Planning Out a Script
    4. Libraries and pip
    5. Creating a URL-based API Call
    6. Storing Data in a Spreadsheet
    7. Running the Finished Script
    8. Dealing with API Pagination
    9. Templates: How to Make Your Code Reusable
    10. Summary
  14. 4 SCRAPING YOUR OWN FACEBOOK DATA
    1. Your Data Sources
    2. Downloading Your Facebook Data
    3. Reviewing the Data and Inspecting the Code
    4. Analyzing HTML Code to Recognize Patterns
    5. Writing Data into a Spreadsheet
    6. Running the Script
    7. Summary
  15. 5 SCRAPING A LIVE SITE
    1. Messy Data
    2. Scraping from a Live Website
    3. Summary
  16. PART II: DATA ANALYSIS
  17. 6 INTRODUCTION TO DATA ANALYSIS
    1. The Process of Data Analysis
    2. Bot Spotting
    3. Getting Started with Google Sheets
    4. Modifying and Formatting the Data
    5. Aggregating the Data
    6. Sorting and Filtering the Data
    7. Merging Data Sets
    8. Other Ways to Use Google Sheets
    9. Summary
  18. 7 VISUALIZING YOUR DATA
    1. Understanding Our Bot Through Charts
    2. Conditional Formatting
    3. Summary
  19. 8 ADVANCED TOOLS FOR DATA ANALYSIS
    1. Using Jupyter Notebook
    2. What Is pandas?
    3. Summary
  20. 9 FINDING TRENDS IN REDDIT DATA
    1. Clarifying Our Research Objective
    2. Outlining a Method
    3. Narrowing the Data’s Scope
    4. Summarizing the Data
    5. Summary
  21. 10 MEASURING THE TWITTER ACTIVITY OF POLITICAL ACTORS
    1. Getting Started
    2. Lambdas
    3. Filtering the Data Set
    4. Formatting the Data as datetimes
    5. Resampling the Data
    6. Plotting the Data
    7. Summary
  22. 11 WHERE TO GO FROM HERE
    1. Coding Styles
    2. Statistical Analysis
    3. Other Kinds of Analyses
    4. Conclusion
  23. Index
3.17.154.171