Giter VIP home page Giter VIP logo

human_conversation_dynamics's Introduction

Human Conversation Dynamics

A shiny app that visualizes human conversation dynamics based on a 10-year subscription of 1% Twitter stream.

Go here for a publicly hosted instance of this app: https://zzeyu42.shinyapps.io/human_conversation_dynamics/

However, since I am using a free plan of the hosting service, the monthly uptime is limited (25 hours). Alternatively, you can run your local instance of the app, which should significantly boost the performance of the app. It is also easy to run it locally, especially if you're an R user (See How to run on my local machine? for instructions).

What I did

  1. Extracted every retweet from the 10-year Twitter dataset;
  2. Used Nominatim to geocode every retweeting/retweeted user's location, if available;
  3. Used that location and the geographical information contained in the tweets, if available, to determine the countries (regions) of the retweets and retweeted tweets;
  4. Counted the number of retweeting behaviors from each country (region) to another for every year;
  5. Visualized the above information with this Shiny app.

How to run on my local machine?

This is a Shiny app written in R. Make sure you have an installation of R on your computer, and install the packages shiny, shinydashboard, leaflet, DT, data.table.

After that, clone this repository, and run from the command line (replace path-to-repo by the path to this repository):

R -e "shiny::runApp('path-to-repo')"

The app is now running on your local machine. You should see a browser pop up. If not, manually copy the link given by the command line interface and open that link in a browser.

A screenshot of the app

Data sources

  1. Twitter data: Archive Team: The Twitter Stream Grab
  2. Shapes of countries (regions) (stored in data/countries.RDS to accelerate the loading process): World Bank Official Boundaries

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.