Setup & Materials
For this tutorial you'll need Verdant installed in JupyterLab. We'll
use a notebook houses_kc.ipynb
and its Verdant history
file houses_kc.ipyhistory
. Verdant stores output images,
like plots or charts, in a seperate folder
houses_kc_output
. All of these materials can be
downloaded as a zip file tutorial_notebook.zip
from the
GitHub repository tutorial folder.
Next unzip the folder on your own machine and start jupyter lab with
jupyter lab .
. Open up the notebook in:
tutorial_notebook/houses_king_county/houses_kc.ipynb
.
If everything has loaded OK, you should see Verdant's tree log icon at the left. Click the log to open up Verdant. You should see an activity pane like below.
In houses_kc.ipynb
the author has been at work predicting
housing prices in the Seattle area of the United States. In this
tutorial, we'll use history to uncover different details of the
analysis and the author's modeling choices.
🌱 In this tutorial, triple-click the black bar with your mouse to reveal the answers to a question. 🌱
Secret revealed. You did it!
1. Get an overview of what has been done so far
The dataset in this analysis has a fair number of features to describe
each property. However, the author of
houses_kc.ipynb
seems to have picked just a single
feature sqft_living
for their first model:
Did the author explore any of the other features? One good way to get an overview is to take a peek at how this notebook has evolved over time. Using the activity pane (shown below) scroll down to the earliest version of the notebook.
Question: Looking at the earliest version, what date and time did the author first start working on this notebook?
January 25, 2021 at 3:46pm
The notebook minimap with the colorful ticks next to each version row shows us which cells changed in a given notebook version. Green indicates a cell added, red a cell deleted, blue a cell changed, and so on.
Question: Use your mouse to hover over the vertical line tick in the minimap for v39-40. Which cell was changed in v39-v40 and how?
Code cell 9 was edited
Now let's get back to figuring out what the author tried in this analysis. Try clicking on a version v37 (shown below) to open the full notebook at that version as a ghost notebook:
The diff notation in the ghost notebook highlights what content was added (green), deleted (red), or edited (blue) in this version. Next, try using the arrows at the top of the ghost book to move ahead in time a couple of versions, and watch how the notebook changes:
Question: Glance through versions v37 to v50 of the notebook. Other than sqft_living, what are 2 other features the author plotted compared to price?
zipcode, bedrooms, or bathrooms
Hopefully you've spotted a few charts in these versions, however it's a bit tedious to skim one at a time though versions. Next let's learn some strategies to more directly find specific things from history!
2. Track model improvements
For this notebook, it would be helpful to know what kind of model performance the author has gotten so far for predicting house prices. What kind of models have they tried and what were their results?
There are a few ways in Verdant to find specific history. Head over to the Artifacts tab.
The Artifacts tab has two views: a table view summarizing overall history of your current notebook and a detailed history view that will show you all history for one specific artifact (a cell or an output):
First, let's check out the table view:
For each cell & output in your current notebook, this table lists how many versions exist of that cell. Cells are abbreviated C for code and M for markdown. Each cell has a number that identifies it, like C2. This id is unique, permanent, and never changes, so that you can always recover a specific cell even after it's been deleted.
Question: How many versions exist for C4 (Code Cell 4)?
11
Scroll the table down to the output of code cell 14 (C14). In the preview of this output, we can see that this cell of the notebook prints out model metrics.
Click on the output to see all of its versions:
Welcome to the detail view! The detail view will show you every version that has ever been created of a specific thing. While in this view, clicking on a link like Notebook v128 will open up the ghost notebook to help you see a specific version in context of the full notebook version.
Question: Using the detail view for the
output of code cell 14, what was the lowest value of
Coefficient of determination
the author got?
0.29
Now, taking a look at the current Jupyter notebook, we can see that the author actually has two different models in their notebook. Next let's take a look at the history of metrics for the second model.
A different way of finding history in Verdant is to use the version inspector.
Click on the Version Inspector button to activate the inspector. Then click on the final output in the current notebook to see its history. With the inspector, you can get the history of anything from the current notebook just by clicking on it. After using the inspector to click on the last output of the notebook, you should now be seeing metrics of the output of code cell 22:
Question: Using the detail view for the
output of code cell 22, what was the highest value of
Coefficient of determination
the author got?
0.69
Finally, sometimes you'll want to retrieve the history of a cell or output that was deleted i.e. it no longer exists in the current Jupyter notebook. To find history of anything by keyword, including the history of previously deleted cells, use the history search tab of Verdant:
3. Finding images, charts & visualizations
A few ending words on how to find charts and images in history. The history search has a few special keywords, such that if you search for "plot" or "image" or "chart", the search will return all images a notebook has ever produced:
Verdant actually stores all images a notebook produces in a
auto-generated folder titled {name of your notebook}_output such as
houses_kc_output
. Open that folder in your normal
computer file browser to see all the images. If you decide to delete
images stored in this folder they will just show up with a missing
image symbol in Verdant:
Meanwhile if you want to reproduce an image you find in the output folder, simply copy the name of the file (shown below in JupyterLab's file browser):
Be sure to type = before the name to let the history search know you're searching for an exact artifact by name:
Question: One final question to put it all together. How many versions of code cell 17's output exist?
6
You did it. Happy coding! If you encounter any issues with Verdant, we always appreciate feedback or a issue report in the repo. Many thanks from our team at Carnegie Mellon University. <3


Buffalo Plains [ar75], plain, in Imperia, peasants: 100
Last updated Turn #139
Buffalo Plains [ar75], plain, in Imperia, peasants: 100
------------------------------------------------------------------------
25: Lanthara [r4v], Imperial Empire, duke, with 39 nazgul, arrived from
25: the west, accompanied by:
25: Manis [h3g], Imperial Empire, with 17 archers, 18 hvy. xbowmen
25: Lars the very big Guy [o4l], refugee, prisoner
26: Lanthara [r4v], Imperial Empire, duke, with 39 nazgul, went east,
26: accompanied by:
26: Manis [h3g], Imperial Empire, with 17 archers, 18 hvy. xbowmen
26: Lars the very big Guy [o4l], refugee, prisoner
27: Stack of nazgul [eo5f] attacks Lanthara [r4v]!
27:
27: Stack of nazgul [eo5f], nazgul, number: 3
27:
27: Lanthara [r4v], Imperial Empire, duke, with 39 nazgul,
27: accompanied by:
27: Manis [h3g], Imperial Empire, behind 5, with 17 archers, 18 hvy.
27: xbowmen
27:
27: Initial missile round for the defense (Lanthara [r4v]):
27: Four missiles hit!
27: Stack of nazgul [eo5f] loses two nazgul [55].
27:
27: Combat round: one
27: Missile phase:
27: Lanthara's forces hit with two missiles.
27: Stack of nazgul [eo5f] suffers a hit!
27:
27: Lanthara [r4v] is victorious!
27:
27: Stack of nazgul lost two nazgul.
27: Stack of nazgul [eo5f] was killed.
27:
28: Sunset [j3n], refugee, arrived from the west.
30: Sunset [j3n], refugee, went east.
Routes leaving Buffalo Plains:
North, forest, to Blackroot Wood [aq75], 8 days
East, plain, to Buffalo Plains [ar76], 7 days
South, plain, to Buffalo Plains [as75], 7 days
West, plain, to Buffalo Plains [ar74], 7 days
Seen here:
Stack of giants [js6c], giants, number: 12
Sunset [j3n], refugee


Welcome to the Code Quiz!
You have 60 seconds to answer all the questions.
Every wrong answer subtracts 10 seconds.
Your score equals the number of seconds left on the timer when all questions are answered.
You have 60 seconds to answer all the questions.
Every wrong answer subtracts 10 seconds.
Your score equals the number of seconds left on the timer when all questions are answered.


Logo
Files
Downloads
Transfered
one
two
three
Hi
Downloading
Some filename
70%
Status information denoting block content
Card Title
I am a very simple card.
Open
remove


WITNESS LIST
Natural Resources & Economic Development
March 24, 2015 9:00 AM
ON:
Viktorin, Richard (Audits in the Public Interest), Austin, TX
Registering, but not testifying:
FOR:
Blackwood, Dr. Susan (Harris County Houston Sports Authority), Austin, TX
Harris, Dana (Austin Chamber of Commerce), Austin, TX
Lucero, Homero (TX Travel Assoc.), Austin, TX
Patterson, T.J. (City of Fort Worth), Fort Worth, TX
Shields, Chris (San Antonio Chamber of Commerce), Austin, TX
Shields, Chris (City of San Antonio), Austin, TX
Shields, Chris (San Antonio Sports), Austin, TX
Short, Jim (National Cutting House Association), Fulshear, TX
Sullivan, Brian (Texas Hotel & Lodging Association), Austin, TX
Weist, Jon (City of Irving), Irving, TX
ON:
Daniel, Bryan (Office of the Governor), Austin, TX
Dupuy, Cary (Comptroller of Public Accounts), Austin, TX
Wood, Robert (Comptroller), Austin, TX
Registering, but not testifying:
FOR:
Bellina, Jim (AMA Tech Tel), Amarillo, TX
ON:
Lloyd, Brian (Public Utility Commission), Austin, TX
Meyers, Lucas (Texas Cable Association), Austin, TX
FOR:
Adkins, JD (Conoco Phillips), Rosenberg, TX
Brewer, Candice (NARO - National Assn. Royalty Owners), San Angelo, TX
Davis, Tricia (Self; Texas Royalty Council), Dripping Springs, TX
Dupnik, Shelby (Self; Karnes County), Kenedy, TX
Edwards, Kirk (Self), Odessa, TX
Horton, Gilbert (Devon Energy), Austin, TX
Hunt, Truett (Self), Kenedy, TX
Longahecker, Ed (Texas Independent Producers and Royalty Owners Association), Austin,
TX
Macchiarola, Frank (America's Natural Gas Alliance), Washington, DC
Neeley, Josiah (R Street Institute), Round Rock, TX
Ratliff, Shannon (Texas Oil and Gas Association), Austin, TX
Shepperd, Ben (Permian Basin Petroleum Association), Midland, TX
Smith, Ed Mayor (City of Marshall), Marshall, TX
WITNESS LIST
Natural Resources & Economic Development
March 24, 2015 9:00 AM
Staples, Todd (Texas Oil and Gas Association), Austin, TX
Stevens, Bill (Texas Alliance of Energy Producers), Austin, TX
Strause, Glynis Holm (Self), George West, TX
Sullivan, Kent (Texas Royalty Council), Austin, TX
Taylor, Tommy (Fasken Oil and Ranch, Ltd.), Midland, TX
Thompson, Leigh (Texas Public Policy Foundation), Austin, TX
Todd, Cliff (C & J Energy Services), Long Branch, TX
Tymrak, Don (City of Karnes City), Karnes City, TX
AGAINST:
Baker, Ken (Self), Southlake, TX
Beving, Rita (Pubilc Citizen), Farmers Br., TX
Burgess, Anita City Atty (City of Denton), Denton, TX
Carr, Snapper (TX Coalition of Cities for Utility Issues), Austin, TX
Chandler, Clayton (City of Mansfield), Mansfield, TX
Crowson, Don (City of Arlington), Arlington, TX
Fullenwider, Sarah (City of Fort Worth), Fort Worth, TX
Gosslee, Susybelle (League of Women Voters Texas), Dallas, TX
Jordan, Jungus (City of Fort Worth), Fort Worth, TX
Kingston, Philip (City of Dallas), Dallas, TX
Lane, Bill (City of Mansfield), Mansfield, TX
Meredith, Bryn (Cities of Mansfield and Southlake and 23 other municipalities), Fort
Worth, TX
Metzger, Luke (Environment Texas), Austin, TX
Parajon, James (City of Arlington), Arlington, TX
Phylis, Peter (City of Mansfield), Mansfield, TX
Postell, Donald R (City of Grand Prairie), Grand Prairie, TX
Reed, Cyrus (Sierra Club, Lone Star Chapter), Austin, TX
Rooke, Molly (Self), Dallas, TX
Sandlin, Bennett (Texas Municipal League), Austin, TX
Schneider, Robin (Texas Campaign for the Environment), Austin, TX
Spiess, Sharon (Self), Denton, TX
Watts, Chris Mayor (City of Denton), Denton, TX
ON:
Allison, Jim (County Judges and Commissioners Assoc. of TX), Austin, TX
Lindsey, Stephen (City of Mansfield), Mansfield, TX
Registering, but not testifying:
FOR:
Acevedo, Adrian (Anadarko Petroleum), Austin, TX
Allday, Marty (Consumer Energy Alliance), Houston, TX
Billingsley, Anne T. (Oneok), Austin, TX
Buchanan, Laura (Texas Land and Mineral Owners Association), Austin, TX
Campbell, Cade Walker (SM Energy Company), Houston, TX
Cannon, Thure (Texas Pipeline Association), Austin, TX
WITNESS LIST
Natural Resources & Economic Development
March 24, 2015 9:00 AM
Casey, Stan (Concho Resources), Midland, TX
Erico, Patty (SM Energy), Denver, CO
Fainter Jr., John W. (Association of Electric Companies of Texas, Inc.), Austin, TX
Flores, Robert (Breitling Energy), Dallas, TX
Gipson, Mark (Pioneer Natural Resources), Irving, TX
Goleman, Kinnan (Shell Oil Company), Austin, TX
Gutierrez, Hugo (Marathon Oil Corporation), Houston, TX
Hinkle, Dan (Association of Energy Service Companies), Sugar Land, TX
Hinkle, Dan (EP Energy), Sugar Land, TX
Hinkle, Dan (Ener Vest), Sugar Land, TX
Hinkle, Dan (EOG Resources), Sugar Land, TX
Hinkle, Dan (BP), Sugar Land, TX
Holt, David (Self; Former Mayor, City Councilman), Austin, TX
Hosek, Chris (Range Resources; Select Energy; QEP; SM Energy; R360), Austin, TX
Hosek, Chris (BASA Resources; EXCO Resources; Linn Energy; Newfield), Austin, TX
Klumpyan, Julie (Valero), San Antonio, TX
Macksood, Greg (Chesapeake Energy), Austin, TX
Martin, Amanda (Texas Association of Business), Austin, TX
McBeth, Kelly (Gas Processors Assn.), Austin, TX
Moore, Julie (Occidental Petroleum), Austin, TX
Omey, Samantha (Exxon), Austin, TX
Perry, Steve (Chevron USA), Austin, TX
Rivero, Hector (Texas Chemical Council), Austin, TX
Ruckel, Grant (Energy Transfer), Austin, TX
Simpson, Stephanie (TX Assn of Manufacturers), Austin, TX
Thompson, Matt (Apache Corp.), Houston, TX
Tramuto, Jim (Southwestern Energy Company), Spring, TX
Wall, Keith (Center Point Energy), Houston, TX
Williams, Julie (Chevron), Austin, TX
Woodard, Shayne (DCP Mid Stream), Austin, TX
Yarbrough II, Charles R. (Atmos Energy), Dallas, TX
AGAINST:
Anderson, Scott (Environmental Defense Fund), Austin, TX
Crow, David (Arlington Professional Fire Fighters), Arlington, TX
Dobbs, Andrew (Texas Campaign for the Environment), Austin, TX
Foster, David (Clean Water Action), Austin, TX
Hadden, Karen (SEED Coalition), Austin, TX
McMullen, Cathy (Denton Drilling Awareness Group), Denton, TX
Solis, Eddie (City of North Richland Hills), Austin, TX
Weinberg, David (Texas League of Conservation Voters), Austin, TX
Weist, Jon (City of Irving), Irving, TX
WITNESS LIST
Natural Resources & Economic Development
March 24, 2015 9:00 AM
ON:
Goss, Diane (TCEQ), Austin, TX
Sheedy, Keith (TCEQ), Austin, TX