Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ff59b50
Create jiyang.py
jiyang-li1 Sep 22, 2025
f578f00
Update jiyang.py
jiyang-li1 Sep 22, 2025
00e3a52
Add Shun's hello world script
Shun-M-0728 Sep 22, 2025
ea369ba
Update README.md
jiyang-li1 Sep 22, 2025
82d3bd8
Update README.md
jiyang-li1 Sep 22, 2025
a721be7
Merge pull request #2 from compss211/jiyang
jiyang-li1 Sep 22, 2025
a863f67
Update README with personal information
Shun-M-0728 Sep 22, 2025
eba6010
Add personal introduction to README
Shun-M-0728 Sep 22, 2025
e614fdb
Update README.md
jiyang-li1 Sep 22, 2025
6c631d3
Create juan-ruben.gomez.py
rgomez-ucb Sep 22, 2025
ffd6622
Update jiyang.py
rgomez-ucb Sep 22, 2025
86d1d69
Merge branch 'main' of https://github.com/compss211/final-project-rep…
rgomez-ucb Sep 22, 2025
650f39e
Change header level for Shun's introduction
Shun-M-0728 Sep 22, 2025
f00c892
Merge pull request #3 from compss211/main
jiyang-li1 Sep 22, 2025
a87dbc7
Merge branch 'main' into shun-feature
Shun-M-0728 Sep 22, 2025
c04e7e2
change my number
Shun-M-0728 Sep 26, 2025
138091c
today is deadline
Shun-M-0728 Sep 26, 2025
2757a66
Merge pull request #4 from compss211/shun-feature
Shun-M-0728 Sep 26, 2025
9131125
Update pyproject.toml
jiyang-li1 Oct 6, 2025
2fe356a
Merge pull request #5 from compss211/jiyang
Shun-M-0728 Oct 6, 2025
0f0e985
Create mymodule.py
Shun-M-0728 Oct 6, 2025
8e832e0
Merge pull request #6 from compss211/shun-feature
Shun-M-0728 Oct 6, 2025
0517d6d
Delete mymodule.py
Shun-M-0728 Oct 6, 2025
9b59c5e
Delete src/mypkg directory
Shun-M-0728 Oct 6, 2025
c9309ff
Update mymodule.py
Shun-M-0728 Oct 6, 2025
e03bec3
Merge pull request #7 from compss211/shun-feature
Shun-M-0728 Oct 6, 2025
8a79015
Update hello_Shun.py
Shun-M-0728 Oct 6, 2025
c1a3631
Merge pull request #8 from compss211/shun-feature
Shun-M-0728 Oct 6, 2025
7a2ebfc
Create utils.py
Shun-M-0728 Oct 6, 2025
73e328b
Merge pull request #9 from compss211/shun-feature
Shun-M-0728 Oct 6, 2025
9e79d1e
Create presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
539c5a6
Update presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
15f987c
upload dataset
jiyang-li1 Oct 9, 2025
ffe0fde
Update presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
f875c48
Create project_test.db
jiyang-li1 Oct 9, 2025
21cd953
Update presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
3e50187
Update presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
6a37ddc
Update presentation 2 codes.ipynb
jiyang-li1 Oct 9, 2025
0ce583b
Create joined_data.csv
jiyang-li1 Oct 9, 2025
fccbeb8
update
jiyang-li1 Oct 9, 2025
2ed9f35
Add files via upload
rgomez-ucb Oct 10, 2025
09fd87a
rewrite presentation 2 codes.ipynb to functions
yuchenglu-ui Oct 10, 2025
507024d
upload full datasets
jiyang-li1 Oct 10, 2025
ec36844
Create test_0.py
jiyang-li1 Oct 12, 2025
bf5698c
Merge pull request #10 from compss211/test
jiyang-li1 Oct 12, 2025
2166944
Update test_0.py
jiyang-li1 Oct 12, 2025
3711411
Update README
Shun-M-0728 Oct 21, 2025
6755b24
Organaize README
Shun-M-0728 Oct 21, 2025
afc10f8
Create to_csv.py
jiyang-li1 Oct 22, 2025
3d74ce5
Update
jiyang-li1 Oct 22, 2025
273d151
Update .gitignore
jiyang-li1 Oct 22, 2025
648ecfc
Merge pull request #11 from compss211/random-split
jiyang-li1 Oct 22, 2025
b646a26
Update .gitignore
jiyang-li1 Oct 23, 2025
bea671b
Merge branch 'main' of https://github.com/compss211/final-project-rep…
jiyang-li1 Oct 23, 2025
564ae24
Update .gitignore
jiyang-li1 Oct 27, 2025
d8fa7aa
Update test_0.py
jiyang-li1 Oct 27, 2025
2bd2a20
Update to_csv.py
jiyang-li1 Oct 27, 2025
6e6504a
Create a TF-IDF file
Shun-M-0728 Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,7 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/
reddit_comments.csv

#sqlthing
*.db
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python-envs.defaultEnvManager": "ms-python.python:conda",
"python-envs.defaultPackageManager": "ms-python.python:conda",
"python-envs.pythonProjects": []
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# COMPSS-211-Final-Project-Template-Repo
Template repository for COMPSS-211 Final Projects

## Instruction
This is the repository where we should work!

## Group members
Shun, Ruben, Jiyang and Yucheng.
198,327 changes: 198,327 additions & 0 deletions data/PoliticalDiscussion_comments_sample.csv

Large diffs are not rendered by default.

59,679 changes: 59,679 additions & 0 deletions data/PoliticalDiscussion_submissions_sample.csv

Large diffs are not rendered by default.

258,005 changes: 258,005 additions & 0 deletions data/joined_data.csv

Large diffs are not rendered by default.

7,584 changes: 7,584 additions & 0 deletions data/reddit-1614740ac8c94505e4ecb9d88be8bed7b6afddd4.torrent

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions data/reddit_politicaldisscussion_linechart.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: "reddit_rpoliticaldiscussion_linechart"
author: "MaCSS 211 - Fall 2025"
date: "2025-10-10"
output: html_document
---

```{r setup, include=TRUE}
setwd("/Users/ruben/Desktop/final-project-repo-team-trust/data") #set your working directory
library(ggplot2) #install packages
library(dplyr) #install packages
(echo = TRUE) #printcharts
```

```{r readcsv, include=TRUE}
reddit_data <-read.csv("joined_data.csv")
head(reddit_data)
```

### create counts for each year
```{r createcounts, include=TRUE}
year_counts <- reddit_data %>%
group_by(year) %>%
summarise(count = n())

head(year_counts)
```

### Checking for missed yearly data 2018-2023
```{r missedyears, include=TRUE}
table(reddit_data$year)
```
### Create timestamps using submission column created_utc_x and commment column created_utc_y
```{r createtimestamps, include=TRUE}
reddit_data$year <- ifelse(
is.na(reddit_data$created_utc_y),
format(as.POSIXct(reddit_data$created_utc_x, origin = "1970-01-01", tz = "UTC"), "%Y"),
format(as.POSIXct(reddit_data$created_utc_y, origin = "1970-01-01", tz = "UTC"), "%Y")
)

table(reddit_data$year)
```

### Count rows per year (Posts + Comments)
```{r countrows, include=TRUE}

year_counts <- reddit_data %>%
group_by(year) %>%
summarise(count = n()) %>%
mutate(
year = as.numeric(year),
count = as.numeric(count),
count_rounded = round(count / 10) * 10
)
```

### plot counts
```{r plotlinechart, include=TRUE, echo=TRUE}
ggplot(year_counts, aes(x = as.numeric(year), y = count)) +
geom_line(color = "skyblue", size = 1.2) +
geom_point(color = "red", size = 3) +
geom_text(aes(label = count), vjust = -0.6, size = 3.5) +
scale_x_continuous(
breaks = seq(min(year_counts$year), max(year_counts$year), by = 1) # toshow every year
) +
scale_y_continuous(
breaks = seq(0, max(year_counts$count), by = 2000) # range of years
) +
labs(
title = "Total Posts and Comments by Year in r/PoliticalDiscussion",
x = "Year",
y = "Count"
) +
theme_minimal()
```
Loading