Skip to content

Commit

Permalink
fix: resolve merge conflicts for #33; merging changes in 'dev' into f…
Browse files Browse the repository at this point in the history
…eature/deployment; README.md and devcontainer.json
  • Loading branch information
kleinlennart committed Mar 15, 2024
2 parents 9052a18 + 59ca55f commit adb4a0f
Show file tree
Hide file tree
Showing 28 changed files with 4,030 additions and 34 deletions.
55 changes: 55 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"projectName": "media-impact-monitor-website",
"projectOwner": "SocialChangeLab",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 64,
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "vogelino",
"name": "Lucas Vogel",
"avatar_url": "https://avatars.githubusercontent.com/u/2759340?v=4",
"profile": "https://github.com/vogelino",
"contributions": [
"code",
"design",
"doc",
"projectManagement"
]
},
{
"login": "davidpomerenke",
"name": "David Pomerenke",
"avatar_url": "https://avatars.githubusercontent.com/u/46022183?v=4",
"profile": "https://github.com/davidpomerenke",
"contributions": [
"code",
"content",
"data",
"doc",
"projectManagement",
"research"
]
},
{
"login": "Lennartklein",
"name": "lennartklein",
"avatar_url": "https://avatars.githubusercontent.com/u/132817556?v=4",
"profile": "https://github.com/Lennartklein",
"contributions": [
"code",
"data",
"doc",
"projectManagement",
"research"
]
}
],
"contributorsPerLine": 10,
"linkToUsage": true
}
3 changes: 3 additions & 0 deletions .devcontainer/R/.Renviron
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Global .Renviron

RENV_PATHS_CACHE="/renv/cache"
6 changes: 6 additions & 0 deletions .devcontainer/R/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Copy to '/home/vscode/.Rprofile' in postCreateCommand.sh

cat("Loading global R presets from '/home/vscode/.Rprofile'....\n")

setwd("/workspaces/media-impact-monitor/backend-R")
renv::load(project = "/workspaces/media-impact-monitor/backend-R")
3 changes: 3 additions & 0 deletions .devcontainer/R/addins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"styler::style_active_file": "Shift+Cmd+F"
}
2 changes: 2 additions & 0 deletions .devcontainer/R/r.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
snippet tidy
library(tidyverse)
10 changes: 10 additions & 0 deletions .devcontainer/R/rstudio-prefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"always_save_history": false,
"save_workspace": "never",
"load_workspace": false,
"initial_working_directory": "/workspaces/media-impact-monitor/backend-R",
"restore_last_project": true,
"jobs_tab_visibility": "shown",
"rainbow_parentheses": true,
"auto_append_newline": true
}
88 changes: 67 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,74 @@
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {},
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {},
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {},
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers-contrib/features/ruff:1": {},
"ghcr.io/devcontainers-contrib/features/starship:1": {},
"ghcr.io/dhoeric/features/google-cloud-cli:1": {},
"ghcr.io/stuartleeks/dev-container-features/azure-cli-persistence:0": {},
"ghcr.io/joshuanianji/devcontainer-features/gcloud-cli-persistence:1": {},
"ghcr.io/nikobockerman/devcontainer-features/poetry-persistent-cache:1": {},
"ghcr.io/rocker-org/devcontainer-features/r-history:0": {},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {},
// Web Dev Stack –--------------------------------------------------------

// https://github.com/devcontainers/features/tree/main/src/node
"ghcr.io/devcontainers/features/node:1": {
"version": "lts" // Node.js version
},

"ghcr.io/devcontainers/features/azure-cli:1": { },
"ghcr.io/stuartleeks/dev-container-features/azure-cli-persistence:0": { },
"ghcr.io/dhoeric/features/google-cloud-cli:1": { },
"ghcr.io/joshuanianji/devcontainer-features/gcloud-cli-persistence:1": { },

// Python Stack –--------------------------------------------------------

"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "3.10"
},
"ghcr.io/devcontainers-contrib/features/poetry:2": { },
"ghcr.io/nikobockerman/devcontainer-features/poetry-persistent-cache:1": { },
"ghcr.io/devcontainers-contrib/features/ruff:1": { },
"ghcr.io/devcontainers-contrib/features/starship:1": { },

// R Stack –--------------------------------------------------------

// System dependencies
// "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
// "packages": "libfribidi-dev,libharfbuzz-dev,cmake"
// },

// https://github.com/rocker-org/devcontainer-features/tree/main/src/r-apt
// NOTE: always installs the latest R Version (not fixed!)
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"vscodeRSupport": "full",
"installDevTools": true, // for debugging
"installREnv": false, // -> install with renv cache feature
"installRMarkdown": false, // needed?
"installJupyterlab": false,
"installRadian": true, // better R console
"installVscDebugger": true,
"useTesting": true, // for Debian, default: true
"installBspm": false
},
// https://github.com/rocker-org/devcontainer-features/tree/main/src/rstudio-server
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {
"singleUser": true,
"version": "stable"
},
// https://github.com/rocker-org/devcontainer-features/tree/main/src/quarto-cli
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
"installTinyTex": false,
"installChromium": false // https://github.com/rocker-org/devcontainer-features/tree/main/src/quarto-cli#install-chromium
},
// https://github.com/rocker-org/devcontainer-features/tree/main/src/renv-cache
"ghcr.io/rocker-org/devcontainer-features/renv-cache:0": { },

// Misc –-----------------------------------------------------------------------------------

"ghcr.io/stuartleeks/dev-container-features/shell-history:0": { },
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers-contrib/features/act:1": {},
"ghcr.io/devcontainers/features/terraform:1": {}
},
// Ports & Server ----------------------------------------------------------------------------
// start RStudio Server process in container
"postAttachCommand": {
"rstudio-start": "rserver"
},
// start RStudio Server process in container, not needed automatically
// "postAttachCommand": {
// "rstudio-start": "rserver"
// },
// https://containers.dev/implementors/json_reference/#port-attributes
"forwardPorts": [
8787
Expand Down Expand Up @@ -70,8 +113,11 @@
"ms-python.python",
"ms-toolsai.jupyter",
"charliermarsh.ruff",
"tamasfe.even-better-toml",
"tamasfe.even-better-toml"
],
// "codespaces": {
// "openFiles": [ "README.md" ]
// },
"settings": {
"editor.codeActionsOnSave": {
"source.fixAll": "always",
Expand Down
50 changes: 48 additions & 2 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
#!/usr/bin/bash
## postCreateCommand.sh

echo 'eval "$(starship init bash)"' >> ~/.bashrc;
cd backend-python && poetry install; # install everything once at setup
## Node Startup
# https://github.com/devcontainers/features/tree/main/src/node#using-nvm-from-postcreatecommand-or-another-lifecycle-command
# . ${NVM_DIR}/nvm.sh && nvm install --lts

## R ------------------------------------

## R system dependencies
sudo apt-get update
sudo apt-get install -y \
cmake

## tidyverse dependencies (from https://packagemanager.posit.co/client/#/repos/cran/packages/overview?search=tidyverse)
sudo apt-get install -y \
libicu-dev \
make \
libcurl4-openssl-dev \
libssl-dev \
zlib1g-dev \
libfontconfig1-dev \
libfreetype6-dev \
libfribidi-dev \
libharfbuzz-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
pandoc \
libxml2-dev

## setup R env prefs
# ~ = /home/vscode/ for Codespaces
cp /workspaces/media-impact-monitor/.devcontainer/R/.Rprofile ~/.Rprofile
cp /workspaces/media-impact-monitor/.devcontainer/R/.Renviron ~/.Renviron

# https://docs.rstudio.com/ide/server-pro/session-user-settings.html
cp /workspaces/media-impact-monitor/.devcontainer/R/rstudio-prefs.json ~/.config/rstudio/rstudio-prefs.json

mkdir -p ~/.config/rstudio/keybindings
cp /workspaces/media-impact-monitor/.devcontainer/R/addins.json ~/.config/rstudio/keybindings/addins.json
mkdir -p ~/.config/rstudio/snippets
cp /workspaces/media-impact-monitor/.devcontainer/R/r.snippets ~/.config/rstudio/snippets/r.snippets

## Restore renv library from lockfile
Rscript -e 'renv::restore(project = "/workspaces/media-impact-monitor/backend-R")'

####

echo 'eval "$(starship init bash)"' >> ~/.bashrc
cd backend-python && poetry install # install everything once at setup
4 changes: 2 additions & 2 deletions .devcontainer/postStartCommand.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/bash
## postStartCommand.sh

cd backend-python && poetry install; # install changed packages
bash
cd backend-python && poetry install # install changed packages
# bash
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# Icon must end with two \r
Icon


# Thumbnails
._*

Expand All @@ -35,7 +34,6 @@ Temporary Items

# End of https://www.toptal.com/developers/gitignore/api/macos


### Windows ------------------------------------------------------------------------

# Windows thumbnail cache files
Expand Down Expand Up @@ -65,7 +63,6 @@ $RECYCLE.BIN/

# End of https://www.toptal.com/developers/gitignore/api/windows


### Python ------------------------------------------------------------------------

# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -241,7 +238,6 @@ pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/python


### R ------------------------------------------------------------------------

# History files
Expand Down Expand Up @@ -283,7 +279,7 @@ vignettes/*.pdf
*.knit.md

# R Environment Variables
.Renviron
# .Renviron

# pkgdown site
docs/
Expand Down
77 changes: 73 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
# media-impact-monitor
[![Logo of the Media Impact Monitor app](https://mediaimpactmonitor.app/assets/logos/mim-alternate-hybrid.svg)](https://mediaimpactmonitor.app/)

<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
<!-- badges: end -->
<br />

# Media Impact Monitor

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

The _Media Impact Monitor_ is be a novel tool for protest groups and NGOs to measure and visualize their impact on public discourse. The tool will show how activist events affect the discourse across various media sources, such as local and national newspapers, social media, parliamentary debates, and more. Protest groups can use it to quantitatively and qualitatively evaluate their actions and adapt them in a targeted manner to draw attention to their issues.

The _Media Impact Monitor_ project is hosted by [Social Change Lab](http://socialchangelab.org/) and funded by [Prototype Fund](https://prototypefund.de/en/) ([BMBF](https://www.bmbf.de/bmbf/de/home/home_node.html)). Development is primarily taking place from March–August 2024.

## Motivation

NGOs and protest groups often want to draw more public attention to important issues in order to initiate social change. To do this, they organise panel discussions, publish articles on social media, send out press releases, organize demonstrations, practice civil disobedience, implement art actions, and so on. To evaluate their work, organizations often use "press hits" as a metric - but this is a poor substitute for the broader impact on agenda setting within public discourse, which the organizations are interested in but cannot easily analyze.

This impact on agenda setting is difficult to capture statistically because of the complex causal relationship between discourse, action events, and external events. A correlational and even a simple regression analysis would therefore lead to statistically biased results.

This is where we will start with the Media Impact Monitor: It aims to use innovative causal inference methods to quantify and visualize how action events affect agenda setting in public discourse.

**Examples:** The "Last Generation" can use it to see, for example, whether their actions distract from actual climate policy discussion or contribute to it constructively; and NGOs such as Greenpeace can evaluate which of their formats are most effective in media terms, and can use their media impact as an argument for donating to them.

## Team

The project team is constituted from:

- **David Pomerenke** (@davidpomerenke) – Data Science – M.A. Artificial Intelligence
- **Lennard Klein** (@kleinlennart) – Data Science – B.A. Political Science
- **Lucas Vogel** (@vogelino) – Frontend UI/UX Development – B.A. Interface Design

## Contact

We are seeking activists and NGO employees to help us shape the tool: We are curious about your experience with media evaluation, your ideas and dreams, and your feedback on our prototypes!

Please [send us an email](mailto:[email protected]) or [book a short meeting](https://cal.com/davidpomerenke/meeting-mim) with us 🤗

## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="10%"><a href="https://github.com/vogelino"><img src="https://avatars.githubusercontent.com/u/2759340?v=4?s=64" width="64px;" alt="Lucas Vogel"/><br /><sub><b>Lucas Vogel</b></sub></a><br /><a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=vogelino" title="Code">💻</a> <a href="#design-vogelino" title="Design">🎨</a> <a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=vogelino" title="Documentation">📖</a> <a href="#projectManagement-vogelino" title="Project Management">📆</a></td>
<td align="center" valign="top" width="10%"><a href="https://github.com/davidpomerenke"><img src="https://avatars.githubusercontent.com/u/46022183?v=4?s=64" width="64px;" alt="David Pomerenke"/><br /><sub><b>David Pomerenke</b></sub></a><br /><a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=davidpomerenke" title="Code">💻</a> <a href="#content-davidpomerenke" title="Content">🖋</a> <a href="#data-davidpomerenke" title="Data">🔣</a> <a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=davidpomerenke" title="Documentation">📖</a> <a href="#projectManagement-davidpomerenke" title="Project Management">📆</a> <a href="#research-davidpomerenke" title="Research">🔬</a></td>
<td align="center" valign="top" width="10%"><a href="https://github.com/Lennartklein"><img src="https://avatars.githubusercontent.com/u/132817556?v=4?s=64" width="64px;" alt="lennartklein"/><br /><sub><b>lennartklein</b></sub></a><br /><a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=Lennartklein" title="Code">💻</a> <a href="#data-Lennartklein" title="Data">🔣</a> <a href="https://github.com/SocialChangeLab/media-impact-monitor-website/commits?author=Lennartklein" title="Documentation">📖</a> <a href="#projectManagement-Lennartklein" title="Project Management">📆</a> <a href="#research-Lennartklein" title="Research">🔬</a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="center" size="13px" colspan="10">
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
</img>
</td>
</tr>
</tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

## Partners

| Hosted by | Funded by | |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![Logo of the Social Change Lab](https://mediaimpactmonitor.app/assets/logos/socialchangelab-hybrid.svg)](https://socialchangelab.org/)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | [![Logo of the Prototype Fund](https://mediaimpactmonitor.app/assets/logos/prototypefund-hybrid.svg)](https://prototypefund.org/) | [![Logo of the Bundesministerium für Bildung und Forschung](https://mediaimpactmonitor.app/assets/logos/bmbf-hybrid.svg)](https://prototypefund.org/) |
8 changes: 8 additions & 0 deletions assets/logos/bmbf-hybrid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions assets/logos/bmbf-negative.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions assets/logos/bmbf-positive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit adb4a0f

Please sign in to comment.