https://github.com/knapply/nyt-cyber
https://github.com/knapply/nyt-cyber
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/knapply/nyt-cyber
- Owner: knapply
- Created: 2020-02-07T01:00:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T01:37:16.000Z (over 6 years ago)
- Last Synced: 2025-03-05T14:28:32.370Z (over 1 year ago)
- Language: R
- Size: 261 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nty-cyber
``` r
df <- data.table::fread(
"https://raw.githubusercontent.com/knapply/nyt-cyber/master/nyt_df.csv",
colClasses = list(POSIXct = "pub_date")
)
library(ggplot2)
for_gg <- df[, by_month := lubridate::floor_date(pub_date, "1 month")
][, .N, by = by_month
]
ggplot(for_gg, aes(x = by_month, N)) +
geom_line(color = "red") +
theme_minimal(base_family = "Palantino") +
labs(title = '"cyber attack"', subtitle = 'Monthly NYT Articles',
caption = "github.com/knapply/nyt-cyber",
x = NULL, y = NULL)
```
