TwittStorm for Geosoftware II (University of Münster, winter semester 2019/2020) by Jonathan Bahlmann, Katharina Poppinga, Paula Scharf and Benjamin Rieke.
TwittStorm is built to monitor heavy weather events and is most useful for severe precipitation events. It connects different, highly dynamic sources of data as live precipitation data, precipitation sums, severe weather warnings and tweets in an area of interest of the users choice, all backed by useful background data. Additionally, an animation gives the ability to reenact the event.
The code of this project is published on GitHub: https://github.com/PaulaScharf/TwittStorm
The corresponding Docker Repository can be found on Docker Hub: https://hub.docker.com/r/paulasch/twittstorm
Get three files from TwittStorm-GitHub-Repository:
Dockerfile
docker-compose.yml
.env
Open .env
and replace the XXX-placeholder for the values of all five given variables by your own API keys. See How to get and use your own API-keys for information about how to create your API keys and where to insert which of them.
Then open a docker shell in the same directory and enter docker-compose up
.
In case the pulling of the image fails, do it manually by typing docker pull paulasch/twittstorm
.
The started application can be found with your browser at http://<your IP>:3000
(e.g.: http://192.168.99.100:3000 on windows or http://localhost:3000 on ubuntu).
In order to use this app, you have to sign up for the necessary services. You'll need a mapbox access key for the map, and a twitter developer account with keys in order to access real-time twitter data.
- First you will need a Mapbox account. If you are not signed up yet you should go to https://account.mapbox.com/auth/signup/ and create an account. All you need for this process is a valid email address.
- After validating your email check out https://account.mapbox.com/access-tokens/. Here you will find your own default token.
- Set the value of the variable
MAPBOX_ACCESS_KEY
in.env
to your default token.
- If you don't already have one, please create a twitter account. This can be done by downloading and opening the mobile app or through the web at https://twitter.com.
- You'll need to register as a developer. This can be done here: https://developer.twitter.com/en/apply-for-access. You're only going to get and display twitter data, so you can disable all other options in the "how are you going to use twitter"-form.
- Create an app at https://developer.twitter.com/en/apps (accessible only with an account). You can name this app whatever you like.
- You can see and copy the tokens you'll need from the "Keys and tokens" section in the overview of the app you just created.
- Set the value of the variable
TWITTER_CONSUMER_KEY
in.env
to your own "API key". - Set the value of the variable
TWITTER_CONSUMER_SECRET
in.env
to your own "API secret key". - Set the value of the variable
TWITTER_ACCESS_TOKEN_KEY
in.env
to your own created "access token". - Set the value of the variable
TWITTER_ACCESS_TOKEN_SECRET
in.env
to your own created "access token secret".
- Download and install JMeter from here: https://jmeter.apache.org/download_jmeter.cgi
(We used "apache-jmeter-5.2.1.zip") - Download and install JMeter Plugins Manager: https://jmeter-plugins.org/wiki/PluginsManager/
- Install the Selenium/Webserver plugin:
- open JMeter
- go to options
- open Plugins Manager
- go to available plugins
- search for "Selenium/WebDriver Support" and install it
- Open the JMeter script (located in this repo at
./test/Twittstorm.jmx
) - Configure the WebDriver for Chrome
- download Chrome from here: https://www.google.com/intl/de_de/chrome/
- download ChromeDriver.exe from here: https://chromedriver.chromium.org/downloads
(we used "ChromeDriver 79.0.3945.36", because we operate chrome version 79) - in JM open thread "client side tests"
- open "jp@gc - Chrome Driver Config"
- open tab "chrome"
- set the path to the location of the "chromedriver.exe" on your local system
- Start the test threads and look at the results in "View Results Tree", "Summary Report" and "Response Time Graph"
- Ensure that your adblocker does not prevent JSNLog from working.
- For the newest R packages, we use a repository which needs to be signed with a keyserver. Building a docker image locally, we experienced some keyserver unavailabilities. Using a prebuilt image from Docker Hub (the intended use as described in this readme) we did not run into this problem. Please just be aware that that could be an issue, especially when working locally. In the case of an error remain patient and try again.
When using the image from Docker Hub, the configuration possibilities are limited (only given for the API keys in .env
). If you want to configure some aspects as it is specified in our Configuration Wiki, you need to clone the GitHub Repository, edit the config.yaml
and build your own local image.