/
readme-chapter-7.Rmd
89 lines (54 loc) · 2.27 KB
/
readme-chapter-7.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
title: "Chapter 7"
author: "Andrew Ba Tran"
date: "8/16/2018"
output:
pdf_document: default
html_document: default
---
### Chapter 7
# Git and Github Pages
You've got so many files by now.
Raw data, exploratory scripts, Rmd and HTML files.
Git is useful for version control, especially when working with teams on big projects. And GitHub is useful because it's built on top of Git and lets the public download your files for free.
```{r img1, echo = F, out.width="100%"}
library(knitr)
include_graphics("images/git.png")
```
Git started out as version control system and has since been "repurposed" beyond software development
Journalists use it for methodology, but also to share raw and summarized data.
### For teams to collaborate
**It's kinda complicated**
```{r img2, echo = F, out.width="100%"}
include_graphics("images/smokey.png")
```
So why?
It might be tough to justify for someone working solo.
But it's worth learning because of the capabilities for communicating your analysis and for future collaboration.
## Show off! Collaborate!
- The R Community is active on GitHub
- The more often you use it, the more often you can use others' code and data
- Easily import from GitHub repos into your workflow
- Simple to run [Shiny Apps locally](https://github.com/yonicd/gunflow) with `runGithub` function
## Files and folders
The [repo for this class](https://github.com/r-journalism/learn-chapter-7) is on GitHub, but can be easily downloaded to your desktop with the following commands:
```
install.packages("usethis")
usethis::use_course("https://github.com/r-journalism/learn-chapter-7/archive/master.zip")
```
## In this section
* Installing git
* On a Mac and PC
* Setting up, using Git
* Time to crack open that console
* Connecting to GitHub
* Show your work
* Best practices for GitHub
* Transparency and avoiding issues
### Readings
* Excuse me, do you have a moment to talk about version control? - [Jennifer Bryan](https://peerj.com/preprints/3159/)
* fivethirtyeight data repo - [Github](https://github.com/fivethirtyeight/data)
* BuzzFeedNews/everything - [Github](https://github.com/BuzzFeedNews/everything)
* WPInvestigative - [Github](https://github.com/wpinvestigative)
-----
<span style="color:gray">© Copyright 2018, Andrew Ba Tran</span>