Direkt zum Hauptbereich

#cssws15 2nd GESIS Computational Social Science Winter Symposium 2015

Workshop on #R and Twitter

On 1st Dec. 2015 I will give a workshop at the GESIS Computational Social Science Winter Symposium 2015.

Using R to harvest the Twitter STREAM API

R is a free software programming language and software environment for statistical computing and graphics. Because R is a programming language its usage is not limited to the field of statistics. There are already many R-packages to cover the whole spectrum of social media analysis from web scraping to text mining. This is a hands-on-tutorial to analyze data from twitter in R. In four steps, the tutorial demonstrates how to get the desired data, how to “clean” it, how to analyze it, and how to visualize the results. By following these steps the participants will gain knowledge about the general structure of R, its basic grammar, some relevant packages for social media analyses, the twitter streaming API, and about some basic programming concepts. The tutorial addresses readers with little previous knowledge about programming. The aim is to demonstrate that the efforts in learning a programming language instead of using off-the-shelf-solutions are rewarded with greater flexibility for creative social media analysis. The R language has become one of the most prominent tools among statisticians and data miners. Because it is free software and due to its outstanding capacities which are enhanced by a huge community of contributors R has become the first choice at many universities in teaching statistics. 
Example plot from the tutorial.

Data science is more than just statistics. Statisticians survey data in a very careful way to come up with representative samples structured in nice and neat tables. But social media data is not structured this way. It is just out there somewhere on the internet and we have to get it on our computer and transform it in a way that is suitable for analyzing. This step normally involves the use of an API. In a second step, social media data normally has to be cleaned. E.g. there might be duplicates, missing values or wrong specifications of objects. The cleaned data can be used to test hypothesis, to find hidden patterns, to analyze it with descriptive statistics or more advanced machine learning algorithms. Whatever we find out in the end, it is very important to present the results in a way that reduces the complexity of the original data drastically. For this last step, data science has developed visualization tools. All these four steps can be done directly in R. In the tutorial we will connect to twitter and get tweets located in California. This sample will then be analyzed and visualized. The research question for this example is the following: Are trends on Twitter regional localized? On the one hand, twitter is a global social media platform that connects people all over the world. It is therefore reasonable to argue that regional differences are not so important on Twitter. On the other hand, people use twitter to communicate about what is going on in their real lives. Since the real live takes place in a specified space, it is reasonable to argue that information on twitter should show a lot of regional differences.
The tutorial addresses readers with little previous knowledge about programming. The aim is to demonstrate that the efforts in learning a programming language instead of using off-the-shelf-solutions are rewarded with greater flexibility for creative social media analysis.
All participants should bring a laptop with R and R-Studio installed, as well as a valid Twitter account.

Kommentare

Beliebte Posts aus diesem Blog

Kritik an dem Science-Artikel der Priesemann-Gruppe „Inferring change points in the spread of COVID-19 reveals the effectiveness of interventions“

Der Science-Artikel von Dehning et al. (2020) gilt als Beleg für die Effektivität der Corona-Maßnahmen in Deutschland im März 2020. Wir glauben, dass der Artikel gravierende Fehler enthält und daher nichts darüber aussagt, ob insbesondere das Kontaktverbot vom 23.03.2020, irgendeinen Effekt hatte. Unsere Kritik haben wir bei Science eingereicht und sie ist hier zu finden: https://science.sciencemag.org/content/369/6500/eabb9789/tab-e-letters Im folgenden übersetze ich unseren Beitrag und gehe anschließend auf die Frage ein, wie Wissenschaft unter COVID-19-Bedingungen funktioniert und was daran bedenklich ist. Eine Kritik an ‘Inferring change points in the spread of COVID-19 reveals the effectiveness of interventions’ Wir haben den Artikel ‘Inferring change points in the spread of COVID-19 reveals the effectiveness of interventions’ analysiert und dabei gravierende Unstimmigkeiten im Design der Studie festgestellt: Anstatt das Datum der Wendepunkte (wann sich die COVID-19-Entwicklung i

Der Nutzerismus: Eine Ideologie mit totalitärem Potential

Ich glaube, dass wir derzeit den Aufstieg einer Ideologie erleben, die ich Nutzerismus nennen möchte. Hannah Arendt hat darauf hingewiesen, dass jede Ideologie zu einem totalitaristischen Regime führen kann und es gibt ernste Anzeichen, dass dies auch für den Nutzerismus gilt.  Was ist der Nutzerismus? Wie bei jeder Ideologie ist der Kerngedanke sehr einfach: Im Prinzip gibt es für alle gesellschaftlichen Probleme eine technische Lösung. Leider wenden die Menschen die richtigen Technologien nicht an. Sie nehmen ihre Rolle als Nutzer nicht wahr. Es geht dem Nutzerismus also um das Zusammenspiel von Mensch und Technik, allerdings immer wieder aus der gleichen Perspektive. Die Technik kommt vor als potentielle Lösung eines gesellschaftlichen Problems. Eventuell fehlt die perfekte Lösung noch, aber das ist dann als Auftrag an die Wissenschaft und die Ingenieure zu verstehen. Dieser Technikglaube hat etwas sehr Naives. Er abstrahiert zum Beispiel von allen Interessen, für die Technologien

Was man an der COVID-Politik über Faschismus lernen kann

Kritiker der Corona-Politik führen immer häufiger den Begriff Faschismus im Munde, um die politischen Maßnahmen zu beschreiben. Einerseits ist damit natürlich eine polemische Ablehnung verbunden: Wer will schon für Faschismus sein? Generell ist der moralische Vorwurf, etwas sei faschistisch oder faschistoid in der demokratischen Auseinandersetzung durchaus geläufig. Dabei wird jedoch meist auf etwas verwiesen, was zum demokratischen Staat dazu gehört und gerade keinen Faschismus begründet: Die Polizei, die das Gewaltmonopol durchsetzt, ist keine faschistische Organisation, ein Parlament, welches Bürgerrechte einschränkt, ist kein Beleg für die faschistische Aufhebung des Rechtsstaats und ein Medienartikel, der dazu aufruft, Bürger sollen Straftäter anzeigen, ist keine faschistische Propaganda, usw. All dies sind Beispiele für das Leben in demokratischen Gemeinwesen. Anstatt die Demokratie also immer gleich auf dem Weg in den Faschismus zu wähnen, wäre es angebracht, sich zu fragen, war