Code Monkey home page Code Monkey logo

socialchangelab / media-impact-monitor Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 14.35 MB

The Media Impact Monitor will be a novel tool for protest groups and NGOs to measure and visualize their impact on public discourse.

Home Page: https://dev.mediaimpactmonitor.app/

License: Other

R 3.74% Vim Snippet 0.01% Shell 0.20% Dockerfile 0.18% Python 12.60% JavaScript 0.72% TypeScript 33.16% CSS 2.37% Jupyter Notebook 47.02%
activism media-monitoring-platform prototype-fund social-change media-impact public-discourse ngo protest

media-impact-monitor's People

Contributors

davidpomerenke avatar kleinlennart avatar vogelino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

media-impact-monitor's Issues

[Feature] Power user tools & settings

@davidpomerenke:

Zu dem Protest/Impact-Diagramm (in dem Wireframe) ist mir noch Folgendes eingefallen:

  • Es gibt verschiedene Methoden, wie der Impact berechnet werden kann. Die können wir an anderer Stelle im Vergleich darstellen. In dem Diagramm sollten wir uns wahrscheinlich für eine Methode entscheiden, oder den Durchschnitt der zwei relevantesten Methoden nehmen oder so.
  • Außerdem gibt es verschiedene Medien, für die der Impact berechnet werden kann. Da können wir uns vielleicht auch eine zusammenfassende Metrik überlegen, à la overall_impact(protest_x) = print_media_impact(protest_x) / average_print_media_impact * print_media_importance + twitter_impact(protest_x) / average_twitter_impact * twitter_importance + …
  • Power User wollen sich vielleicht auch für diese Art von Diagramm spezifische Methoden oder Medien rauspicken. Das könnte vielleicht an einer anderen Stelle in der App realisiert sein, damit die Start-Visualisierung nicht zu kompliziert wird. Oder es könnten noch zusätzliche Power-Einstellungen geben, die über ein kleines ⚙️ Symbol oder so verfügbar sind und nicht so prominent sind.

Für die Alpha können wir diese Sachen ignorieren und die einfachste Impact Methode und nur Printmedien nehmen.

Setup Frontend

Setup frontend projects with:

  • NextJS
  • Refine
  • Tailwind CSS
  • Supabase
  • Public facing page
  • Login area
  • Eslint / Prettier
  • Typescript
  • NVM
  • npm
  • Shadcn/ui
  • Docker

[Feature] Finding articles about a given protest

We want to make a table with articles about a given protest.

The first step for this will be filtering by date (starting from the protest date and ending x days later) and whether the name of the organization occurs in an article.

Yet this will give false positives: Articles about other protests or that do not relate to any protest at all. Or that relate to other protests by the same group but in another country, as mentioned in one user interview.

First Wireframes

Defining roughly:

  • General Layout
  • Arrangement of Charts
  • Navigation
  • Changing level of detail
  • Events Timeline
  • Media Timeline

This will only include alpha features

Convert ACLED participant numbers

They are currently given in strings like "a few dozen".
I have written a rule-based script that handles many cases that I can copy from my master thesis.
And maybe we can use GPT for cases that are not covered by it.

[ORG] Find Project Name

We need to find a name for our project that:

  • Is easy to pronounce and memorize
  • Implies its purpose or field
  • Is available as a domain name

Fix MediaCloud API

MediaCloud generally works (from 2023 currently) but there's some smaller issues with the API.

Should investigate this, implement a workaround, and raise the issue in the MediaCloud repo.

Website and Repo Logo assets

  • Upload Media Impact Monitor logos to the new media-impact-monitor/assets branch (for general future use in Slides etc. and Markdown ref) #32
  • Replace website Social Change Lab Logo with better high res version https://github.com/SocialChangeLab/assets/blob/main/logos/
  • update BMBF logo for deployed version of website
  • add Media Impact Monitor Header logo (e.g., the one from the website) to the README.md with ref to media-impact-monitor/assets with
    ![Logo](https://github.com/SocialChangeLab/media-impact-monitor/blob/assets/logos/{...}) (⏳ On it)

[BUG] Installing R packages using devcontainer-features/r-packages does not work

With devcontainer-features/r-packages we should be able to install R packages from the .devcontainer config like this:

"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
	"packages": [
		"easystats"
	],
	"installSystemRequirements": true
},
This does not work, see the error message.
0.388 ===========================================================================
0.388 Feature       : R packages (via pak)
0.388 Description   : Installs R packages via the pak R package's function. R must be already installed.
0.389 Id            : ghcr.io/rocker-org/devcontainer-features/r-packages
0.389 Version       : 1.0.4
0.389 Documentation : https://github.com/rocker-org/devcontainer-features/tree/main/src/r-packages
0.389 Options       :
0.389     PACKAGES="easystats"
0.389     PAKVERSION="auto"
0.389     ADDITIONALREPOSITORIES=""
0.389     INSTALLSYSTEMREQUIREMENTS="true"
0.389     NOTCRAN="false"
0.389 ===========================================================================
0.569 Install R packages...
0.595 /tmp/r-packages /tmp/dev-container-features/r-packages_14
1.710 pak is already installed. Skip pak installation...
1.712 Set 'CI' to 'true'...
1.755 find: '/var/lib/apt/lists/*': No such file or directory
1.761 Running apt-get update...
2.863 Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
2.973 Get:2 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3626 B]
3.038 Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
3.038 Get:4 https://packages.microsoft.com/repos/azure-cli jammy InRelease [3595 B]
3.226 Get:5 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
3.297 Get:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
3.335 Get:7 https://packages.cloud.google.com/apt cloud-sdk InRelease [6361 B]
3.412 Get:8 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
3.580 Ign:9 https://r2u.stat.illinois.edu/ubuntu jammy InRelease
3.824 Get:10 https://r2u.stat.illinois.edu/ubuntu jammy Release [5713 B]
4.066 Get:11 https://r2u.stat.illinois.edu/ubuntu jammy Release.gpg [793 B]
4.802 Get:12 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ Packages [48.6 kB]
5.528 Get:13 https://packages.microsoft.com/repos/azure-cli jammy/main all Packages [1099 B]
5.654 Get:14 https://packages.microsoft.com/repos/azure-cli jammy/main amd64 Packages [1367 B]
7.228 Get:15 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
7.801 Get:16 https://dl.yarnpkg.com/debian stable/main amd64 Packages [11.1 kB]
8.002 Get:17 https://dl.yarnpkg.com/debian stable/main all Packages [11.1 kB]
8.201 Get:18 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
8.449 Get:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
10.94 Get:20 https://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages [609 kB]
15.14 Get:21 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1514 kB]
17.89 Get:22 https://r2u.stat.illinois.edu/ubuntu jammy/main all Packages [7860 kB]
18.22 Get:23 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1074 kB]
19.81 Get:24 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.6 kB]
20.56 Get:25 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1889 kB]
27.70 Get:26 https://r2u.stat.illinois.edu/ubuntu jammy/main amd64 Packages [2468 kB]
31.49 Get:27 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
33.37 Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1346 kB]
33.85 Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1927 kB]
34.75 Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1796 kB]
35.59 Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [50.4 kB]
35.75 Get:32 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [28.1 kB]
36.06 Get:33 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [50.4 kB]
36.20 Fetched 41.1 MB in 34s (1204 kB/s)
36.20 Reading package lists...
86.39 > pak::repo_add(); pak::pak(trimws(unlist(strsplit('easystats', ',')))); pak::cache_clean()
88.48 
91.54 v Updated metadata database: 2.89 MB in 8 files.
91.54 
91.54 i Updating metadata database
97.90 v Updating metadata database ... done
97.91 
98.81  
98.82 > Will install 38 packages.
98.84 > Will download 38 CRAN packages (33.95 MB).
98.85 + MASS           7.3-60.0.1 [bld][cmp][dl] (561.61 kB)
98.85 + Matrix         1.6-5      [bld][cmp][dl] (2.88 MB)
98.85 + RColorBrewer   1.1-3      [bld][dl] (11.64 kB)
98.85 + bayestestR     0.13.2     [bld][dl] (408.56 kB)
98.85 + cli            3.6.2      [bld][cmp][dl] (569.77 kB)
98.85 + colorspace     2.1-0      [bld][cmp][dl] (2.12 MB)
98.85 + correlation    0.8.4      [bld][dl] (1.09 MB)
98.85 + datawizard     0.9.1      [bld][dl] (538.71 kB)
98.85 + easystats      0.7.0      [bld][dl] (1.75 MB)
98.85 + effectsize     0.8.6      [bld][dl] (344.84 kB)
98.85 + fansi          1.0.6      [bld][cmp][dl] (482.48 kB)
98.85 + farver         2.1.1      [bld][cmp][dl] (1.27 MB)
98.85 + ggplot2        3.5.0      [bld][dl] (3.56 MB)
98.85 + glue           1.7.0      [bld][cmp][dl] (105.42 kB)
98.85 + gtable         0.3.4      [bld][dl] (130.10 kB)
98.85 + insight        0.19.8     [bld][dl] (944.21 kB)
98.85 + isoband        0.2.7      [bld][cmp][dl] (1.59 MB)
98.85 + labeling       0.4.3      [bld][dl] (10.17 kB)
98.85 + lattice        0.22-5     [bld][cmp][dl] (599.04 kB)
98.85 + lifecycle      1.0.4      [bld][dl] (107.66 kB)
98.85 + magrittr       2.0.3      [bld][cmp][dl] (267.07 kB)
98.85 + mgcv           1.9-1      [bld][cmp][dl] (1.08 MB)
98.85 + modelbased     0.8.7      [bld][dl] (2.66 MB)
98.85 + munsell        0.5.0      [bld][dl] (182.65 kB)
98.85 + nlme           3.1-164    [bld][cmp][dl] (836.83 kB)
98.85 + parameters     0.21.5     [bld][dl] (674.14 kB)
98.85 + performance    0.10.9     [bld][dl] (2.49 MB)
98.85 + pillar         1.9.0      [bld][dl] (444.53 kB)
98.85 + pkgconfig      2.0.3      [bld][dl] (6.08 kB)
98.85 + report         0.5.8      [bld][dl] (1.88 MB)
98.85 + rlang          1.1.3      [bld][cmp][dl] (763.76 kB)
98.85 + scales         1.3.0      [bld][cmp][dl] (302.54 kB)
98.85 + see            0.8.2      [bld][dl] (123.33 kB)
98.85 + tibble         3.2.1      [bld][cmp][dl] (565.98 kB)
98.85 + utf8           1.2.4      [bld][cmp][dl] (241.08 kB)
98.85 + vctrs          0.6.5      [bld][cmp][dl] (969.07 kB)
98.85 + viridisLite    0.4.2      [bld][dl] (1.27 MB)
98.85 + withr          3.0.0      [bld][dl] (107.68 kB)
98.86   
98.97 i Getting 38 pkgs (33.95 MB)
100.7 v Got cli 3.6.2 (source) (569.77 kB)
101.0 v Got bayestestR 0.13.2 (source) (408.56 kB)
101.4 v Got effectsize 0.8.6 (source) (344.84 kB)
101.5 v Got glue 1.7.0 (source) (105.42 kB)
102.0 v Got gtable 0.3.4 (source) (130.10 kB)
102.2 v Got fansi 1.0.6 (source) (482.48 kB)
102.7 v Got colorspace 2.1-0 (source) (2.12 MB)
102.8 v Got labeling 0.4.3 (source) (10.17 kB)
102.9 v Got farver 2.1.1 (source) (1.27 MB)
103.3 v Got insight 0.19.8 (source) (944.21 kB)
104.3 v Got lattice 0.22-5 (source) (599.04 kB)
104.4 v Got munsell 0.5.0 (source) (182.65 kB)
105.6 v Got ggplot2 3.5.0 (source) (3.56 MB)
105.9 v Got isoband 0.2.7 (source) (1.59 MB)
106.0 v Got nlme 3.1-164 (source) (836.83 kB)
107.0 v Got modelbased 0.8.7 (source) (2.66 MB)
107.1 v Got magrittr 2.0.3 (source) (267.07 kB)
107.3 v Got RColorBrewer 1.1-3 (source) (11.64 kB)
107.4 v Got pillar 1.9.0 (source) (444.53 kB)
108.1 v Got see 0.8.2 (source) (123.33 kB)
108.4 v Got parameters 0.21.5 (source) (674.14 kB)
108.4 v Got utf8 1.2.4 (source) (241.08 kB)
108.5 v Got mgcv 1.9-1 (source) (1.08 MB)
108.6 v Got rlang 1.1.3 (source) (763.76 kB)
108.8 v Got pkgconfig 2.0.3 (source) (6.08 kB)
109.8 v Got scales 1.3.0 (source) (302.54 kB)
109.9 v Got MASS 7.3-60.0.1 (source) (561.61 kB)
110.2 v Got viridisLite 0.4.2 (source) (1.27 MB)
110.9 v Got easystats 0.7.0 (source) (1.75 MB)
111.1 v Got datawizard 0.9.1 (source) (538.71 kB)
111.2 v Got vctrs 0.6.5 (source) (969.07 kB)
111.4 v Got correlation 0.8.4 (source) (1.09 MB)
111.5 v Got lifecycle 1.0.4 (source) (107.66 kB)
111.7 v Got tibble 3.2.1 (source) (565.98 kB)
112.2 v Got withr 3.0.0 (source) (107.68 kB)
112.3 v Got Matrix 1.6-5 (source) (2.88 MB)
113.1 v Got performance 0.10.9 (source) (2.49 MB)
113.9 v Got report 0.5.8 (source) (1.88 MB)
114.2 i Building cli 3.6.2
116.5 i Building colorspace 2.1-0
116.8 i Building fansi 1.0.6
117.0 i Building farver 2.1.1
117.1 i Building glue 1.7.0
117.3 i Building insight 0.19.8
118.2 i Building isoband 0.2.7
118.7 i Building labeling 0.4.3
131.0 v Built labeling 0.4.3 (12.1s)
131.1 i Building lattice 0.22-5
145.1 v Built glue 1.7.0 (27.4s)
145.1 i Building magrittr 2.0.3
163.9 v Built colorspace 2.1-0 (46.4s)
164.0 i Building MASS 7.3-60.0.1
166.9 v Built magrittr 2.0.3 (21.1s)
167.0 i Building pkgconfig 2.0.3
174.1 v Built isoband 0.2.7 (55.3s)
174.2 i Building RColorBrewer 1.1-3
178.7 v Built pkgconfig 2.0.3 (11.3s)
178.8 i Building rlang 1.1.3
187.7 v Built RColorBrewer 1.1-3 (13.1s)
187.7 i Building utf8 1.2.4
189.4 v Built fansi 1.0.6 (1m 12.3s)
189.5 i Building viridisLite 0.4.2
192.4 v Built lattice 0.22-5 (1m 0.7s)
192.5 i Building withr 3.0.0
195.1 v Built insight 0.19.8 (1m 16.8s)
200.7 Error: 
200.7 ! error in pak subprocess
200.7 Caused by error in `verify_extracted_package(filename, pkg_cache)`:
200.7 ! 
200.7 '/tmp/Rtmp1ZXPyW/file98249036931/colorspace_2.1-0_R_x86_64-pc-linux-gnu.tar.gz'
200.7 is not a valid R package, it is an empty archive.
200.7 ---
200.7 Backtrace:
200.7 1. pak::pak(trimws(unlist(strsplit("easystats", ","))))
200.7 2. pak::pkg_install(pkg, ...)
200.7 3. pak:::remote(function(...) get("pkg_install_do_plan", asNamespace("pak"))(...)...
200.7 4. err$throw(res$error)
200.7 ---
200.7 Subprocess backtrace:
200.7  1. base::withCallingHandlers(cli_message = function(msg) { ...
200.7  2. get("pkg_install_do_plan", asNamespace("pak"))(...)
200.7  3. proposal$install()
200.7  4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, ...
200.7  5. base::withCallingHandlers({ ...
200.7  6. pkgdepends:::handle_events(state, events)
200.7  7. pkgdepends:::handle_event(state, i)
200.7  8. proc$get_result()
200.7  9. processx:::process_get_result(self, private)
200.7 10. private$post_process()
200.7 11. pkgdepends:::install_extracted_binary(filename, lib_cache, pkg_cache, lib, ...
200.7 12. pkgdepends:::verify_extracted_package(filename, pkg_cache)
200.7 13. base::throw(pkg_error("{.path {filename}} is not a valid R package, it is an e...
200.7 14. | base::signalCondition(cond)
200.7 15. global (function (e) ...
200.7 Execution halted
200.9 ERROR: Feature "R packages (via pak)" (ghcr.io/rocker-org/devcontainer-features/r-packages) failed to install! Look at the documentation at https://github.com/rocker-org/devcontainer-features/tree/main/src/r-packages for help troubleshooting this error.

Questions:

  • Is this a problem with devcontainer-features/r-packages or with easystats. Does installation of easystats via other methods work?
  • Do we need this feature at all? What is a good way to set up package installation in R?

[Feature] Make dummy prototype

Make a prototype that contains all components (Python data loaders & API, frontend, maybe some R code) and is deployed. Does not need to be useful, but must work.

Test Refine.dev

I want to evaluate if the open source retool alternative refine.dev is an option for our first prototype or even our final product.

Prototype Fund Admin

  • join email list
  • Zulip
  • join Google Cal & check all dates
  • plan Superbloom coaching calls

[Feature] Sentiment Analysis for media

  • decide which approach to use (dictionary-based, transformer)
  • what metrics to display (sentiment scores – e.g., pos words over neg words etc., frequencies, etc.)
  • how to best show changes of sentiment over time (time series, dot plots, ...)
  • how to best show differences between publications (combine different articles from the same publication and calculate the overall score)
  • how to best show differences between single articles (score + color coding)
  • binary vs. trinary sentiment coding (positive, neutral, negative or just pos, neg)

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.