Skip to content

Commit 83043d4

Browse files
Merge pull request #86 from chennesy/getting_started_edit
edit getting started episode
2 parents 4eab639 + 60cc42b commit 83043d4

1 file changed

Lines changed: 35 additions & 18 deletions

File tree

episodes/getting-started.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Getting Started
33
teaching: 15
4-
exercises: 0
4+
exercises: 5
55
---
66

77
::::::::::::::::::::::::::::::::::::::: objectives
@@ -23,24 +23,31 @@ exercises: 0
2323

2424
## Why Python?
2525

26-
Python is a popular programming language for tasks such as data collection, cleaning, and analysis. Python can help you to create reproducible workflows to accomplish repetitive tasks more efficiently. Let's consider a few examples of folks using Python in different library settings:
26+
Python is a popular programming language for tasks such as data collection, cleaning, and analysis. Python can help you to create reproducible workflows to accomplish repetitive tasks more efficiently.
2727

28-
1. **Metadata work.** Many cataloging teams use Python to migrate, transform and enrich metadata that they receive from different sources. For example, the [pymarc library](https://pypi.org/project/pymarc/) is a popular Python package for working with MARC21 records.
28+
This lesson works with a series of CSV files of circulation data from the Chicago Public Library system to demonstrate how to use Python to clean, analyze, and visualize usage data that spans over the course of multiple years.
2929

30-
2. **Collection and citation analysis.** Python can automate workflows to analyze library collections. In cases where spreadsheets and OpenRefine are unable to support specific forms of analysis, Python is a more flexible and powerful tool.
30+
::::::::::::::::::::::::::::::::::::::: challenge
31+
## Python in Libraries
32+
There are a lot of ways that library and information science folks use Python in their work. Go around the room and have helpers and co-teachers share how they have used Python.
3133

32-
3. **Assessment.** Library workers often need to collect metrics or statistics on some aspect of their work. Python can be a valuable tool to collect, clean, analyze, and visualize that data in a consistent way over time.
34+
Learners: Can you think of other ways to use Python in libraries? Do you have hopes for how you'd like to use Python in the future?
3335

34-
4. **Accessing data.** Researchers often use Python to collect data (including textual data) from websites and social media platforms. Academic librarians are often well-positioned to help teach these researchers how to use Python for web scraping or querying Application Programming Interfaces (APIs) to access the data they need.
36+
::::::::::::::: solution
3537

36-
5. **Analyzing data.** Python is widely used by scholars who are embarking on different forms of computational research (e.g., network analysis, natural language processing, machine learning). Library workers can leverage Python for their own research in these areas, but also take part in larger networks of academic support related to data science, computational social sciences, and/or digital humanities.
38+
Here a few areas where you might apply Python in your work.
3739

40+
**Metadata work.** Many cataloging teams use Python to migrate, transform and enrich metadata that they receive from different sources. For example, the [pymarc library](https://pypi.org/project/pymarc/) is a popular Python package for working with MARC21 records.
3841

39-
::::::::::::::::::::::::::::::::::::: instructor
42+
**Collection and citation analysis.** Python can automate workflows to analyze library collections. In cases where spreadsheets and OpenRefine are unable to support specific forms of analysis, Python is a more flexible and powerful tool.
4043

41-
Instructors: Along with the examples above, it can be helpful to ask your co-instructors and helpers to share real-world examples of how they integrate Python into their own work and why they find it useful. You can also ask learners if they have any particular Python projects in mind.
44+
**Assessment.** Library workers often need to collect metrics or statistics on some aspect of their work. Python can be a valuable tool to collect, clean, analyze, and visualize that data in a consistent way over time.
4245

43-
:::::::::::::::::::::::::::::::::::::::::::::::::
46+
**Accessing data.** Researchers often use Python to collect data (including textual data) from websites and social media platforms. Academic librarians are often well-positioned to help teach these researchers how to use Python for web scraping or querying Application Programming Interfaces (APIs) to access the data they need.
47+
48+
**Analyzing data.** Python is widely used by scholars who are embarking on different forms of computational research (e.g., network analysis, natural language processing, machine learning). Library workers can leverage Python for their own research in these areas, but also take part in larger networks of academic support related to data science, computational social sciences, and/or digital humanities.
49+
:::::::::::::::::::::::::
50+
::::::::::::::::::::::::::::::::::::::::::::::::::
4451

4552
## Use JupyterLab to edit and run Python code.
4653

@@ -152,35 +159,45 @@ While Python runs both calculations Juypter will only display the output from th
152159
3
153160
```
154161

155-
::::::::::::::::::::::::::::::::::::::::: callout
156162
### Editing the notebook
157163

158164
You can use the icons at the top of your notebook to edit the cells in your Notebook:
165+
159166
- The `+` icon adds a new cell below the selected cell.
160-
The scissors icon will delete the current cell.
167+
- The scissors icon will delete the current cell.
161168

162169
You can move cells around in your notebook by hovering over the left-hand margin of a cell until your cursor changes into a four-pointed arrow, and then dragging and dropping the cell where you want it.
163170

164-
::::::::::::::::::::::::::::::::::::::::::::::::::
165-
171+
::::::::::::::::::::::::::::::::::::::::: callout
166172
### Markdown
173+
::::::::::::::::::::::::::::::::::::: instructor
174+
175+
Instructors: Since the lesson is focused on Python we don't include any Markdown examples here. If you want to teach Markdown, note that it will slow down the lesson.
176+
177+
:::::::::::::::::::::::::::::::::::::::::::::::::
178+
167179
You can add text to a Juypter notebook by selecting a cell, and changing the dropdown above the notebook from `Code` to `Markdown`. Markdown is a lightweight language for formatting text. This feature allows you to annotate your code, add headers, and write documentation to help explain the code. While we won't cover Markdown in this lesson, there are many helpful online guides out there:
168180
- [Markdown for Jupyter Cheatsheet (IBM)](https://www.ibm.com/docs/en/watson-studio-local/1.2.3?topic=notebooks-markdown-jupyter-cheatsheet)
169181
- [Markdown Guide (Matt Cone)](https://www.markdownguide.org/)
170182

171183
![Changing a cell from Code to Markdown](../episodes/fig/0_jupyter_markdown_dd.png){alt='screenshot of the Jupyter notebook dropdown to change a cell to Markdown'}
172184

185+
You can also use "hotkeys"" to change Jupyter cells from Code to Markdown and back:
186+
187+
- Click on the code cell that you want to convert to a Markdown cell.
188+
- Press the <kbd>Esc</kbd> key to enter command mode.
189+
- Press the <kbd>M</kbd> key to convert the cell to Markdown.
190+
- Press the <kbd>y</kbd> key to convert the cell back to Code.
191+
::::::::::::::::::::::::::::::::::::::::::::::::::
192+
173193
[anaconda]: https://docs.anaconda.com/anaconda/install/
174194
[spyder]: https://www.spyder-ide.org/
175195
[jupyterlab]: https://jupyterlab.readthedocs.io/en/stable/
176196

177-
178197
:::::::::::::::::::::::::::::::::::::::: keypoints
179198

180199
- You can launch JupyterLab from the command line or from Anaconda Navigator.
181200
- You can use a JupyterLab notebook to edit and run Python.
182201
- Notebooks can include both code and markdown (text) cells.
183202

184-
::::::::::::::::::::::::::::::::::::::::::::::::::
185-
186-
203+
::::::::::::::::::::::::::::::::::::::::::::::::::

0 commit comments

Comments
 (0)