diff --git a/.gitignore b/.gitignore index 7627e45..2d86a41 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,17 @@ dev_*.ipynb .DS_Store node_modules/ polbotcheck/dump/ -web/Release.key +Release.key polbotcheck/__pycache__/ + + +# testing +/coverage + +# production +/build + +# misc +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/Procfile b/Procfile index d39ebe0..0900e0b 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: FLASK_ENV=production webapi/run_analytics_server.sh +web: bin/boot diff --git a/web/json/Achim_P.json b/json/Achim_P.json similarity index 100% rename from web/json/Achim_P.json rename to json/Achim_P.json diff --git a/web/json/agnieszka_mdb.json b/json/agnieszka_mdb.json similarity index 100% rename from web/json/agnieszka_mdb.json rename to json/agnieszka_mdb.json diff --git a/web/json/parties.json b/json/parties.json similarity index 100% rename from web/json/parties.json rename to json/parties.json diff --git a/web/json/politicians.json b/json/politicians.json similarity index 100% rename from web/json/politicians.json rename to json/politicians.json diff --git a/web/json/topics.json b/json/topics.json similarity index 100% rename from web/json/topics.json rename to json/topics.json diff --git a/web/package.json b/package.json similarity index 64% rename from web/package.json rename to package.json index ce2efed..c4a5fab 100644 --- a/web/package.json +++ b/package.json @@ -4,14 +4,14 @@ "private": true, "dependencies": { "chart.js": "^2.5.0", - "react": "^15.4.2", - "react-bootstrap": "^0.30.7", - "react-chartjs-2": "^2.0.5", - "react-dom": "^15.4.2", - "react-router": "^2.8.1" + "react": "^16.0.0", + "react-bootstrap": "^0.31.3", + "react-chartjs-2": "^2.6.4", + "react-dom": "^16.0.0", + "react-router-dom": "^4.2.2" }, "devDependencies": { - "react-scripts": "0.9.3" + "react-scripts": "^1.0.14" }, "scripts": { "start": "react-scripts start", diff --git a/polbotcheck/db.py b/polbotcheck/db.py index 16ad43b..1516449 100644 --- a/polbotcheck/db.py +++ b/polbotcheck/db.py @@ -8,7 +8,7 @@ from config.db_credentials import db_credentials -CANDIDATES_PATH = '../web/public/candidates.json' +CANDIDATES_PATH = '../public/candidates.json' # Configure your ArangoDB server connection here diff --git a/web/public/candidates.json b/public/candidates.json similarity index 100% rename from web/public/candidates.json rename to public/candidates.json diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..12407c4 Binary files /dev/null and b/public/favicon.ico differ diff --git a/web/public/index.html b/public/index.html similarity index 95% rename from web/public/index.html rename to public/index.html index aab5e3b..d7a954f 100644 --- a/web/public/index.html +++ b/public/index.html @@ -13,7 +13,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> -
Sind es Bots oder echte Menschen, die den Kandidaten folgen? Das finden wir hier für euch heraus, + damit klar wird, was echt ist und was nicht. +
+ ++ Twitter Bots sind computergesteuerte Programme die sich automatisiert auf dem Social Network bewegen + und verschiedene Ziele verfolgen. Die meisten betreiben Marketing und folgen allen möglichen + Accounts und erzeugen so Aufmerksamkeit. Andere sorgen mit Retweets für eine größere + Reichweite anderer Accounts, die sie voranbringen wollen. +
++ Eigentlich ist es noch kein Problem, wenn Bots dem Account eines Kandidaten folgen. Problematisch wird + es, wenn wir als Wähler die Meldungen eines Kandidaten häufiger zu sehen bekommen, weil sie angeblich + viele andere interessieren (und daher auch mich interessieren könnten), aber hauptsächlich Bots diese + Retweets erzeugt haben. +
+ ++ Wir geben dir einen Einblick, wieviele Retweets der Politiker von Bots sind, um besser einschätzen zu können, + ob nachgeholfen wird. Zur Erkennung ob ein Twitter Account ein Bot ist, verlassen wir uns auf die + mehrjährige Recherche-Arbeit des Projekts + Botometerfrüher Truthy BotOrNot. + Es wurde 2014 von der Indiana University aus den USA ins Leben gerufen. Über deren Web-Dienst kann man die + Wahrscheinlichkeit einholen, mit der ein Twitter Account ein Bot ist. +
++ Wir gehen ab 70% Prozent davon aus, dass es sich um einen Bot handelt. +
++ Für jeden Politiker, zu dem wir die Daten einholen konnten + die Datenlage ist recht + eingeschränkt, siehe Quellen ganz unten, daher auch die fehlenden Parteien und Wahlkreise + zeigen wir hier nun den Anteil der Follower die Bots sind, den Anteil der Retweets die von Bots + stammen und wieviel Prozent der Retweeter Bots sind. +
++ Die Liste der Politiker und die Infos über sie, u.a. die Account-Namen der Twitter-Profile haben wir über + github.com/okfde/wahldaten eingeholt. +
++ Die Wahrscheinlichkeit ob ein Account ein Bot ist, holen wir uns über + Botometer (früher Truthy BotOrNot) von der + Indiana University aus den USA ein. +
++ Die Follower und Retweet Daten sind über die Twitter-API + von Twitter selbst eingeholt worden. +
++ Die Namen der Wahlkreise haben wir über die + Abgeordnetenwatch API abgerufen. +
+Der Quellcode dieses Projekts ist zu finden auf + github. +
+Wahlkreis: {this.state.district.name ? this.state.district.name : '-'}
+Name: {this.state.member.name ? this.state.member.name : '-'}
+Partei: {partySlug ? {parties[partySlug]} : '-'}
+Wahlkreis: {district ? {district.name} : '-'}
+Listenplatz: {this.state.election.list ? this.state.election.list : '-'}
+Twitter-Account: {this.state.member.twitter_handle ? getTwitterLink(this.state.member.twitter_handle) : '-'}
+Name: {this.state.name ? this.state.name : '-'}
+hessische BTW-Kandidaten 2017
+
-
-
->**For Visual Studio Code users**
-
->VS Code ESLint plugin automatically detects Create React App's configuration file. So you do not need to create `eslintrc.json` at the root directory, except when you want to add your own rules. In that case, you should include CRA's config by adding this line:
-
->```js
-{
- // ...
- "extends": "react-app"
-}
-```
-
-Then add this block to the `package.json` file of your project:
-
-```js
-{
- // ...
- "eslintConfig": {
- "extends": "react-app"
- }
-}
-```
-
-Finally, you will need to install some packages *globally*:
-
-```sh
-npm install -g eslint-config-react-app@0.3.0 eslint@3.8.1 babel-eslint@7.0.0 eslint-plugin-react@6.4.1 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@2.2.3 eslint-plugin-flowtype@2.21.0
-```
-
-We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
-
-## Debugging in the Editor
-
-**This feature is currently only supported by [Visual Studio Code](https://code.visualstudio.com) editor.**
-
-Visual Studio Code supports live-editing and debugging out of the box with Create React App. This enables you as a developer to write and debug your React code without leaving the editor, and most importantly it enables you to have a continuous development workflow, where context switching is minimal, as you don’t have to switch between tools.
-
-You would need to have the latest version of [VS Code](https://code.visualstudio.com) and VS Code [Chrome Debugger Extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) installed.
-
-Then add the block below to your `launch.json` file and put it inside the `.vscode` folder in your app’s root directory.
-
-```json
-{
- "version": "0.2.0",
- "configurations": [{
- "name": "Chrome",
- "type": "chrome",
- "request": "launch",
- "url": "http://localhost:3000",
- "webRoot": "${workspaceRoot}/src",
- "userDataDir": "${workspaceRoot}/.vscode/chrome",
- "sourceMapPathOverrides": {
- "webpack:///src/*": "${webRoot}/*"
- }
- }]
-}
-```
-
-Start your app by running `npm start`, and start debugging in VS Code by pressing `F5` or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
-
-## Changing the Page `