# clint-claessen/lsq70077 architecture

> Architecture diagram of the GitHub repository clint-claessen/lsq70077, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/clint-claessen/lsq70077
- Repository: https://github.com/clint-claessen/lsq70077

## Overview

This is an R replication package for a political-science paper, not a general-purpose application. The main workflow runs the model, figure, and table scripts over supplied sentence-level and summary data to reproduce paper results. The graph follows relationships documented in the README; source code was not available to verify further calls or data-loading details.

Main entry points: [`main_figures.R`](https://github.com/clint-claessen/lsq70077/blob/master/main_figures.R) (Figure generation), [`data/figure1_salience_monthly.csv`](https://github.com/clint-claessen/lsq70077/blob/master/data/figure1_salience_monthly.csv) (Monthly salience), [`main_tables.R`](https://github.com/clint-claessen/lsq70077/blob/master/main_tables.R) (Table generation), [`data/green_party_sentences_xl.rds`](https://github.com/clint-claessen/lsq70077/blob/master/data/green_party_sentences_xl.rds) (Sentence-level data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Analysis scripts"]
  node_models["Regression models<br/>[main_models.R]"]
  node_figures["Figure generation<br/>[main_figures.R]"]
  node_tables["Table generation<br/>[main_tables.R]"]
end

subgraph group_data["Research data"]
  node_sentence_data["Sentence-level data"]
  node_sentence_csv["Sentence CSV"]
  node_salience_sentences["Salience coding"]
  node_monthly_totals["Monthly totals"]
  node_salience_monthly["Monthly salience"]
  node_distinctiveness_bars["Distinctiveness values"]
  node_table1_data["Corpus statistics"]
  node_test_scores["Classifier test scores"]
end

subgraph group_results["Paper results"]
  node_figure1["Figure 1"]
  node_figure2["Figure 2"]
  node_figure3_environment["Figure 3 environment"]
  node_figure3_welfare["Figure 3 welfare"]
  node_figure4["Figure 4"]
  node_figure5_environment["Figure 5 environment"]
  node_figure5_welfare["Figure 5 welfare"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs"| node_models
node_researcher -->|"runs"| node_figures
node_researcher -->|"runs"| node_tables
node_sentence_data -->|"refits from"| node_models
node_sentence_data -->|"aggregates and refits"| node_figures
node_salience_sentences -->|"contributes numerator"| node_salience_monthly
node_monthly_totals -->|"contributes denominator"| node_salience_monthly
node_salience_monthly -->|"plots values"| node_figures
node_distinctiveness_bars -->|"plots values"| node_figures
node_table1_data -->|"prints as Table 1"| node_tables
node_test_scores -->|"computes Table 2"| node_tables
node_figures -->|"writes"| node_figure1
node_figures -->|"writes"| node_figure2
node_figures -->|"writes"| node_figure3_environment
node_figures -->|"writes"| node_figure3_welfare
node_figures -->|"writes"| node_figure4
node_figures -->|"writes"| node_figure5_environment
node_figures -->|"writes"| node_figure5_welfare

click node_models "https://github.com/clint-claessen/lsq70077/blob/master/main_models.R"
click node_figures "https://github.com/clint-claessen/lsq70077/blob/master/main_figures.R"
click node_tables "https://github.com/clint-claessen/lsq70077/blob/master/main_tables.R"
click node_sentence_data "https://github.com/clint-claessen/lsq70077/blob/master/data/green_party_sentences_xl.rds"
click node_sentence_csv "https://github.com/clint-claessen/lsq70077/blob/master/data/green_party_sentences_xl.csv"
click node_salience_sentences "https://github.com/clint-claessen/lsq70077/blob/master/data/salience_sentences_xl.csv"
click node_monthly_totals "https://github.com/clint-claessen/lsq70077/blob/master/data/salience_monthly_totals_xl.csv"
click node_salience_monthly "https://github.com/clint-claessen/lsq70077/blob/master/data/figure1_salience_monthly.csv"
click node_distinctiveness_bars "https://github.com/clint-claessen/lsq70077/blob/master/data/figure2_distinctiveness_bars.csv"
click node_table1_data "https://github.com/clint-claessen/lsq70077/blob/master/data/table1_data_description.csv"
click node_test_scores "https://github.com/clint-claessen/lsq70077/tree/master/data/test_scores"
click node_figure1 "https://github.com/clint-claessen/lsq70077/blob/master/output/figure1_salience.pdf"
click node_figure2 "https://github.com/clint-claessen/lsq70077/blob/master/output/figure2_distinctiveness_bars.pdf"
click node_figure3_environment "https://github.com/clint-claessen/lsq70077/blob/master/output/figure3_odds_ratios_environment.pdf"
click node_figure3_welfare "https://github.com/clint-claessen/lsq70077/blob/master/output/figure3_odds_ratios_welfare.pdf"
click node_figure4 "https://github.com/clint-claessen/lsq70077/blob/master/output/figure4_predicted_gov_opp.pdf"
click node_figure5_environment "https://github.com/clint-claessen/lsq70077/blob/master/output/figure5_electoral_cycle_environment.pdf"
click node_figure5_welfare "https://github.com/clint-claessen/lsq70077/blob/master/output/figure5_electoral_cycle_welfare.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_models,node_figures,node_tables toneBlue
class node_sentence_data,node_sentence_csv,node_salience_sentences,node_monthly_totals,node_salience_monthly,node_distinctiveness_bars,node_table1_data,node_test_scores toneAmber
class node_figure1,node_figure2,node_figure3_environment,node_figure3_welfare,node_figure4,node_figure5_environment,node_figure5_welfare toneMint
class node_researcher toneIndigo
```

## Components

### Analysis scripts

- [Regression models](https://github.com/clint-claessen/lsq70077/blob/master/main_models.R): `main_models.R`
- [Figure generation](https://github.com/clint-claessen/lsq70077/blob/master/main_figures.R): `main_figures.R`
- [Table generation](https://github.com/clint-claessen/lsq70077/blob/master/main_tables.R): `main_tables.R`

### Research data

- [Sentence-level data](https://github.com/clint-claessen/lsq70077/blob/master/data/green_party_sentences_xl.rds): `data/green_party_sentences_xl.rds`
- [Sentence CSV](https://github.com/clint-claessen/lsq70077/blob/master/data/green_party_sentences_xl.csv): `data/green_party_sentences_xl.csv`
- [Salience coding](https://github.com/clint-claessen/lsq70077/blob/master/data/salience_sentences_xl.csv): `data/salience_sentences_xl.csv`
- [Monthly totals](https://github.com/clint-claessen/lsq70077/blob/master/data/salience_monthly_totals_xl.csv): `data/salience_monthly_totals_xl.csv`
- [Monthly salience](https://github.com/clint-claessen/lsq70077/blob/master/data/figure1_salience_monthly.csv): `data/figure1_salience_monthly.csv`
- [Distinctiveness values](https://github.com/clint-claessen/lsq70077/blob/master/data/figure2_distinctiveness_bars.csv): `data/figure2_distinctiveness_bars.csv`
- [Corpus statistics](https://github.com/clint-claessen/lsq70077/blob/master/data/table1_data_description.csv): `data/table1_data_description.csv`
- [Classifier test scores](https://github.com/clint-claessen/lsq70077/tree/master/data/test_scores): `data/test_scores`

### Paper results

- [Figure 1](https://github.com/clint-claessen/lsq70077/blob/master/output/figure1_salience.pdf): `output/figure1_salience.pdf`
- [Figure 2](https://github.com/clint-claessen/lsq70077/blob/master/output/figure2_distinctiveness_bars.pdf): `output/figure2_distinctiveness_bars.pdf`
- [Figure 3 environment](https://github.com/clint-claessen/lsq70077/blob/master/output/figure3_odds_ratios_environment.pdf): `output/figure3_odds_ratios_environment.pdf`
- [Figure 3 welfare](https://github.com/clint-claessen/lsq70077/blob/master/output/figure3_odds_ratios_welfare.pdf): `output/figure3_odds_ratios_welfare.pdf`
- [Figure 4](https://github.com/clint-claessen/lsq70077/blob/master/output/figure4_predicted_gov_opp.pdf): `output/figure4_predicted_gov_opp.pdf`
- [Figure 5 environment](https://github.com/clint-claessen/lsq70077/blob/master/output/figure5_electoral_cycle_environment.pdf): `output/figure5_electoral_cycle_environment.pdf`
- [Figure 5 welfare](https://github.com/clint-claessen/lsq70077/blob/master/output/figure5_electoral_cycle_welfare.pdf): `output/figure5_electoral_cycle_welfare.pdf`

### Other components

- **Researcher**

## Connections

- Researcher → Regression models: runs (evidence: `README.md`)
- Researcher → Figure generation: runs (evidence: `README.md`)
- Researcher → Table generation: runs (evidence: `README.md`)
- Sentence-level data → Regression models: refits from (evidence: `README.md`)
- Sentence-level data → Figure generation: aggregates and refits (evidence: `README.md`)
- Salience coding → Monthly salience: contributes numerator (evidence: `README.md`)
- Monthly totals → Monthly salience: contributes denominator (evidence: `README.md`)
- Monthly salience → Figure generation: plots values (evidence: `README.md`)
- Distinctiveness values → Figure generation: plots values (evidence: `README.md`)
- Corpus statistics → Table generation: prints as Table 1 (evidence: `README.md`)
- Classifier test scores → Table generation: computes Table 2 (evidence: `README.md`)
- Figure generation → Figure 1: writes (evidence: `README.md`)
- Figure generation → Figure 2: writes (evidence: `README.md`)
- Figure generation → Figure 3 environment: writes (evidence: `README.md`)
- Figure generation → Figure 3 welfare: writes (evidence: `README.md`)
- Figure generation → Figure 4: writes (evidence: `README.md`)
- Figure generation → Figure 5 environment: writes (evidence: `README.md`)
- Figure generation → Figure 5 welfare: writes (evidence: `README.md`)
