Skip to content

Commit 49ce392

Browse files
eriknwericmjl
authored andcommitted
Display images with marimo
1 parent ab8a8fe commit 49ce392

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

notebooks/05-casestudies/01-gameofthrones.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _():
4444
@app.cell(hide_code=True)
4545
def _(mo):
4646
mo.md(
47-
r"""
47+
rf"""
4848
## Introduction
4949
5050
In this chapter, we will use Game of Thrones as a case study to practice our newly learnt skills of network analysis.
@@ -55,7 +55,7 @@ def _(mo):
5555
5656
The figure below is a precusor of what we will analyse in this chapter.
5757
58-
![](images/got.png)
58+
{mo.image("images/got.png")}
5959
6060
6161
The dataset is publicly available for the 5 books at https://github.com/mathbeveridge/asoiaf. This is an interaction network and were created by connecting two characters whenever their names (or nicknames) appeared within 15 words of one another in one of the books. The edge weight corresponds to the number of interactions.

notebooks/05-casestudies/02-airport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,12 @@ def _(mo):
415415
@app.cell(hide_code=True)
416416
def _(mo):
417417
mo.md(
418-
r"""
418+
rf"""
419419
## Directed Graphs and PageRank
420420
421421
The figure below explains the basic idea behind the PageRank algorithm. The "importance" of the node depends on the incoming links to the node, i.e if an "important" node A points towards a node B it will increase the PageRank score of node B, and this is run iteratively. In the given figure, even though node C is only connected to one node it is considered "important" as the connection is to node B, which is an "important" node.
422422
423-
![](images/pagerank.png)
423+
{mo.image("images/pagerank.png")}
424424
<!-- <img src='images/pagerank.png' alt='pagerank' width='500'/> -->
425425
426426
Source: Wikipedia

0 commit comments

Comments
 (0)