Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/globeandmail/tgamtheme
The Globe and Mail's graphics theme for ggplot2
https://github.com/globeandmail/tgamtheme
data data-journalism data-visualization journalism news r r-package
Last synced: 3 days ago
JSON representation
The Globe and Mail's graphics theme for ggplot2
- Host: GitHub
- URL: https://github.com/globeandmail/tgamtheme
- Owner: globeandmail
- License: other
- Created: 2021-01-20T17:43:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T08:19:19.000Z (about 1 year ago)
- Last Synced: 2024-11-27T22:42:07.445Z (about 1 month ago)
- Topics: data, data-journalism, data-visualization, journalism, news, r, r-package
- Language: R
- Homepage: https://globeandmail.github.io/tgamtheme
- Size: 299 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TGAM theme
[![R build status](https://github.com/globeandmail/tgamtheme/workflows/R-CMD-check/badge.svg)](https://github.com/globeandmail/tgamtheme/actions)
This package contains a theme and colour palettes in The Globe and Mail's graphics style.
It's designed to be used as a companion to The Globe's data journalism template, [**startr**](https://github.com/globeandmail/startr), and its function library, [**upstartr**](https://github.com/globeandmail/upstartr).
### Installation
```r
install.packages('tgamtheme')
```Or, if you want to run a development version, you can install it from GitHub by doing:
```r
devtools::install_github('globeandmail/tgamtheme')
library(tgamtheme)
```### Usage
```r
mtcars %>%
rownames_to_column() %>%
ggplot(aes(x = reorder(rowname, mpg), y = mpg)) +
geom_col() +
coord_flip() +
theme_tgam(position = 'left') +
labs(
title = 'Fuel consumption for several types of vehicles',
subtitle = 'Vehicle models from 1973 to 1974',
caption = 'THE GLOBE AND MAIL, SOURCE: MOTOR TREND'
)
```There's also a palette, `tgam_pal`, along with `scale_color_tgam` and `scale_fill_tgam`.
### Reference
You can find the full reference manual for `tgamtheme`'s functions [**here**](https://globeandmail.github.io/tgamtheme/).
### Get in touch
If you've got any questions, feel free to send us an email, or give us a shout on Twitter:
[![Tom Cardoso](https://avatars0.githubusercontent.com/u/2408118?v=3&s=200)](https://github.com/tomcardoso)
---
[Tom Cardoso](mailto:[email protected])
[@tom_cardoso](https://www.twitter.com/tom_cardoso)