This is a template repository for a hands-on session about using the command line with GitHub Codespaces. Create your own copy using the "Use this template" button above.
The goal is to offer a fundamental, but hopefully not too basic introduction to using command-line programs in a cloud-based environment. I'm trying to focus on areas where I've seen people struggle with using command-line programs in the newsroom.
This tutorial is intended for use with GitHub Codespaces, which provides a Linux-based development environment in your web browser.
The tutorial portion is oriented around the Bash shell, which is the default in GitHub Codespaces. Most, if not all, of the examples in the tutorial should work on other shells, but if you encounter errors, that may be the reason.
Finally, some of the examples in the tutorial use csvkit, which you'll install after you create your Codespace.
-
Create your own repository from this template:
- Click the green
Use this template
button at the top of this repository's GitHub page - Select
Create a new repository
- Give your repository a name (e.g.,
my-command-line-tutorial
) - Make sure it's set to
Public
(required for free Codespaces usage) - Click
Create repository from template
- Click the green
-
Open your new repository in GitHub Codespaces:
- Navigate to your newly created repository
- Click the green
Code
button on your repository's GitHub page - Select the
Codespaces
tab - Click
Create codespace on main
- Wait for the environment to load (this may take a minute or two)
- csvkit will be automatically installed during setup
-
Open the terminal:
- Once Codespaces loads, you'll see VS Code in your browser
- Open a terminal by clicking
Terminal
>New Terminal
in the menu bar - Or use the keyboard shortcut `Ctrl+Shift+`` (backtick)
- Copy and paste this command into the Terminal:
go install github.com/maaslalani/slides@latest
It will take a minute to run. You won't have to do it again.
-
Navigate to the tutorial:
cd tutorial
-
Start the tutorial:
- Open
tutorial/README.md
in the VS Code editor to follow along - You can edit this file directly to record your answers as you work through the exercises
- You can also view
tutorial/solutions.md
for reference
- Open
-
Tutorial reflection: At the end of this README, answer the following questions:
- How could command line skills improve your efficiency as a journalist?
- What types of stories or investigations would benefit most from these tools?
- What felt most challenging about learning these technical skills?
- How does this connect to your understanding of data journalism?
tutorial
: Instructions and data for the hands-on activity we'll walk through during the conference session. You should also be able to follow along on your own computer.tutorial/slides.md
: Slides used during the conference session. These can be displayed using the slides tool.tipsheet.md
: General tips and links to other references for using the command line.
The command line is by no means a set of tools and concepts specific to journalism. I've tried to use real data in this tutorial to ground the concepts in the kinds of ways I use the command line as a data reporter.
Agency: U.S. Immigration and Customs Enforcement
Link: Detention Management | ICE
Agency: U.S. Census Bureau
Link: National Population Totals: 2010-2019
Agency: U.S. Census Bureau
Link: National Population Totals: 2020-2024
Agency: UMPD
Link: UMPD Incident Logs