ebook img

Doing Computational Social Science A Practical Introduction PDF

897 Pages·2022·13.189 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Doing Computational Social Science A Practical Introduction

DOING COMPUTATIONAL SOCIAL SCIENCE DOING COMPUTATIONAL SOCIAL SCIENCE A Practical Introduction John Mclevey Los Angeles London New Delhi Singapore Washington DC Melbourne SAGE Publications Ltd 1 Oliver’s Yard 55 City Road London EC1Y 1SP SAGE Publications Inc. 2455 Teller Road Thousand Oaks, California 91320 SAGE Publications India Pvt Ltd B 1/I 1 Mohan Cooperative Industrial Area Mathura Road New Delhi 110 044 SAGE Publications Asia-Pacific Pte Ltd 3 Church Street #10-04 Samsung Hub Singapore 049483 © John McLevey 2022 Apart from any fair dealing for the purposes of research, private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act, 1988, this publication may not be reproduced, stored or transmitted in any form, or by any means, without the prior permission in writing of the publisher, or in the case of reprographic reproduction, in accordance with the terms of licences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publisher. Editor: Jai Seaman Assistant editor: Charlotte Bush Production editor: Ian Antcliff Copyeditor: QuADS Prepress Pvt Ltd Proofreader: Neville Hankins Indexer: David Rudeforth Marketing manager: Ben Griffin-Sherwood Cover design: Shaun Mercier Typeset by: C&M Digitals (P) Ltd, Chennai, India Printed in the UK Library of Congress Control Number: 2021937242 British Library Cataloguing in Publication data A catalogue record for this book is available from the British Library ISBN 978-1-5264-6819-2 ISBN 978-1-5264-6818-5 (pbk) At SAGE we take sustainability seriously. Most of our products are printed in the UK using responsibly sourced papers and boards. When we print overseas we ensure sustainable papers are used as measured by the PREPS grading system. We undertake an annual audit to monitor our sustainability. CONTENTS Discover Your Online Resources! Acknowledgements About the Author Introduction: Learning to Do Computational Social Science 0.1 Who Is This Book For? 0.2 Roadmap 0.3 Datasets Used in This Book 0.4 Learning Materials 0.5 Conclusion Part I Foundations 1 Setting Up Your Open Source Scientific Computing Environment 1.1 Learning Objectives 1.2 Introduction 1.3 Command Line Computing 1.4 Open Source Software 1.5 Version Control Tools 1.6 Virtualization Tools 1.7 Putting the Pieces Together: Python, Jupyter, conda, and git 1.8 Conclusion 2 Python Programming: The Basics 2.1 Learning Objectives 2.2 Learning Materials 2.3 Introduction 2.4 Learning Python 2.5 Python Foundations 2.6 Conclusion 3 Python Programming: Data Structures, Functions, and Files 3.1 Learning Objectives 3.2 Learning Materials 3.3 Introduction 3.4 Working With Python’s Data Structures 3.5 Custom Functions 3.6 Reading and Writing Files 3.7 Pace Yourself 3.8 Conclusion 4 Collecting Data From Application Programming Interfaces 4.1 Learning Objectives 4.2 Learning Materials 4.3 Introduction 4.4 What Is an API? 4.5 Getting Practical: Working With APIs 4.6 Conclusion 5 Collecting Data From the Web: Scraping 5.1 Learning Objectives 5.2 Learning Materials 5.3 Introduction 5.4 An HTML and CSS Primer for Web Scrapers 5.5 Developing Your First Web Scraper 5.6 Ethical and Legal Issues in Web Scraping 5.7 Conclusion 6 Processing Structured Data 6.1 Learning Objectives 6.2 Learning Materials 6.3 Introduction 6.4 Practical Pandas: First Steps 6.5 Understanding Pandas Data Structures 6.6 Aggregation and Grouped Operations 6.7 Working With Time-Series Data 6.8 Combining Dataframes 6.9 Conclusion 7 Visualization and Exploratory Data Analysis 7.1 Learning Objectives 7.2 Learning Materials 7.3 Introduction 7.4 Iterative Research Workflows: EDA and Box’s Loop 7.5 Effective Visualization 7.6 Univariate EDA: Describing and Visualizing Distributions 7.7 Multivariate EDA 7.8 Conclusion 8 Latent Factors and Components 8.1 Learning Objectives 8.2 Learning Materials 8.3 Introduction 8.4 Latent Variables and the Curse of Dimensionality 8.5 Conducting a Principal Component Analysis in Sklearn 8.6 Conclusion Part II Fundamentals of Text Analysis 9 Processing Natural Language Data 9.1 Learning Objectives 9.2 Learning Materials 9.3 Introduction 9.4 Text Processing 9.5 Normalizing Text via Lemmatization 9.6 Part-of-Speech Tagging 9.7 Syntactic Dependency Parsing 9.8 Conclusion 10 Iterative Text Analysis 10.1 Learning Objectives 10.2 Learning Materials 10.3 Introduction 10.4 Exploration in Context: Text Analysis Pipelines 10.5 Count-Based Feature Extraction: From Strings to a Bag of Words 10.6 Close Reading 10.7 Conclusion 11 Exploratory Text Analysis – Working With Word Frequencies and Proportions 11.1 Learning Objectives 11.2 Learning Materials 11.3 Introduction 11.4 Scaling Up: Processing Political Speeches 11.5 Creating DTMs With Sklearn 11.6 Conclusion 12 Exploratory Text Analysis – Word Weights, Text Similarity, and Latent Semantic Analysis 12.1 Learning Objectives 12.2 Learning Materials 12.3 Introduction 12.4 Exploring Latent Semantic Space With Matrix Decomposition 12.5 Conclusion Part III Fundamentals of Network Analysis 13 Social Networks and Relational Thinking 13.1 Learning Objectives 13.2 Learning Materials 13.3 Introduction 13.4 What Are Social Networks? 13.5 Working With Relational Data 13.6 Walk Structure and Network Flow 13.7 Conclusion 14 Connection and Clustering in Social Networks 14.1 Learning Objectives 14.2 Learning Materials 14.3 Introduction 14.4 Micro-Level Network Structure and Processes 14.5 Detecting Cohesive Subgroups and Assortative Structure 14.6 Conclusion 15 Influence, Inequality, and Power in Social Networks 15.1 Learning Objectives 15.2 Learning Materials 15.3 Introduction 15.4 Centrality Measures: The Big Picture 15.5 Shortest Paths and Network Flow 15.6 Betweenness Centrality, Two Ways 15.7 Popularity, Power, and Influence 15.8 Conclusion 15.9 Chapter Appendix 16 Going Viral: Modelling the Epidemic Spread of Simple Contagions 16.1 Learning Objectives 16.2 Learning Materials 16.3 Introduction 16.4 Epidemic Spread and Diffusion 16.5 Modelling Spreading Processes With NDlib 16.6 Simple Contagions and Epidemic Spread 16.7 Conclusion 17 Not So Fast: Modelling the Diffusion of Complex Contagions 17.1 Learning Objectives 17.2 Learning Materials 17.3 Introduction 17.4 From Simple to Complex Contagions 17.5 Beyond Local Neighbourhoods: Network Effects and Thresholds 17.6 Threshold Models for Complex Contagions 17.7 Conclusion Part IV Research Ethics and Machine Learning 18 Research Ethics, Politics, and Practices 18.1 Learning Objectives 18.2 Learning Materials 18.3 Introduction 18.4 Research Ethics and Social Network Analysis 18.5 Informed Consent, Privacy, and Transparency 18.6 Bias and Algorithmic Decision-Making 18.7 Ditching the Value-Free Ideal for Ethics, Politics, and Science 18.8 Conclusion 19 Machine Learning: Symbolic and Connectionist 19.1 Learning Objectives 19.2 Learning Materials 19.3 Introduction 19.4 Types of Machine Learning 19.5 Symbolic and Connectionist Machine Learning 19.6 Conclusion 20 Supervised Learning With Regression and Cross-validation 20.1 Learning Objectives 20.2 Learning Materials 20.3 Introduction 20.4 Supervised Learning With Linear Regression 20.5 Classification With Logistic Regression 20.6 Conclusion 21 Supervised Learning With Tree-Based Models 21.1 Learning Objectives 21.2 Learning Materials 21.3 Introduction 21.4 Rules-Based Learning With Trees 21.5 Ensemble Learning 21.6 Evaluation Beyond Accuracy 21.7 Conclusion 22 Neural Networks and Deep Learning 22.1 Learning Objectives 22.2 Learning Materials 22.3 Introduction 22.4 The Perceptron 22.5 Multilayer Perceptrons 22.6 Training ANNs With Backpropagation and Gradient Descent 22.7 More Complex ANN Architectures 22.8 Conclusion 23 Developing Neural Network Models With Keras and TensorFlow 23.1 Learning Objectives 23.2 Learning Materials 23.3 Introduction 23.4 Getting Started With Keras 23.5 End-to-End Neural Network Modelling 23.6 Conclusion Part V Bayesian Data Analysis and Generative Modelling with Probabilistic Programming 24 Statistical Machine Learning and Generative Models 24.1 Learning Objectives 24.2 Learning Materials 24.3 Introduction 24.4 Statistics, Machine Learning, and Statistical Machine Learning: Where Are the Boundaries and What Do They Bind? 24.5 Generative Versus Discriminative Models

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.