Summary: The “Two Lines Of Code” Challenge: Build a cloneable resource that (a) consists of just two lines of code and (b) presents an interesting, insightful view into the world of OOI data. The idea is to fall somewhere between “static website” presentation (i.e. magic) and “1000 lines of dense code” (terrifying) to illuminate a relatable path to data accessibility.
The TLOC Challenge is intended to accelerate time to Aha I get it. Here is the recipe; and like any good recipe you can always do your own variant.
- Create a data visualization that relies at least in part on OOI data.
- Write a Python module that encapsulates this visualization
- Create a Jupyter notebook with one cell containing just two lines of code
- The first line of code imports the Python module
- The second line of code is a function call returning a data structure
- Running the cell has two outcomes
- Renders a visualization of data
- Returns data structure(s) with this visualized data
- The visualization provides context for comprehension: Aha! Cool!
- It’s totally fine to use markdown cells in the notebook to provide this
- Place the Jupyter notebook and module in an open GitHub repository
- Post a link here (and wherever else you like)
- A viewer clones this repo:
git clone repo-URL
- They have Jupyter Lab running; and necessary libraries installed (
pandas
etc) - They open the notebook and run the cell
- From the two lines of code: A visualization (and the data), aha!
- They can look behind the curtain by opening the Python module