Skip to content

Commit

Permalink
deploy: 6e3a473
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Jan 16, 2024
1 parent 65a0459 commit 2c0e34a
Show file tree
Hide file tree
Showing 172 changed files with 4,276 additions and 20,274 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3bb6aef6b2eeef875723941ee10b071e
config: 5a2ede0e61f74be3e45663111ee811c3
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified _downloads/networks.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed _images/appendix_13_0.png
Diff not rendered.
Binary file removed _images/appendix_19_0.png
Diff not rendered.
Binary file removed _images/appendix_23_0.png
Diff not rendered.
Binary file removed _images/appendix_31_0.png
Diff not rendered.
Binary file removed _images/appendix_33_0.png
Diff not rendered.
Binary file removed _images/appendix_35_0.png
Diff not rendered.
Binary file removed _images/appendix_37_0.png
Diff not rendered.
Binary file removed _images/appendix_5_0.png
Diff not rendered.
Binary file removed _images/appendix_7_0.png
Diff not rendered.
Binary file removed _images/ch_fpms_14_0.png
Diff not rendered.
Binary file removed _images/ch_intro_100_0.png
Diff not rendered.
Binary file removed _images/ch_intro_19_0.png
Diff not rendered.
Binary file removed _images/ch_intro_28_0.png
Diff not rendered.
Binary file removed _images/ch_intro_32_0.png
Diff not rendered.
Binary file removed _images/ch_intro_38_0.png
Diff not rendered.
Binary file removed _images/ch_intro_46_0.png
Diff not rendered.
Binary file removed _images/ch_intro_52_0.png
Diff not rendered.
Binary file removed _images/ch_intro_56_0.png
Diff not rendered.
Binary file removed _images/ch_intro_71_0.png
Diff not rendered.
Binary file removed _images/ch_intro_83_0.png
Diff not rendered.
Binary file removed _images/ch_intro_90_0.png
Diff not rendered.
Binary file removed _images/ch_intro_97_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_12_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_18_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_32_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_38_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_40_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_44_0.png
Diff not rendered.
Binary file removed _images/ch_mcs_54_0.png
Diff not rendered.
Binary file removed _images/ch_opt_10_0.png
Diff not rendered.
Binary file removed _images/ch_opt_16_0.png
Diff not rendered.
Binary file removed _images/ch_opt_18_0.png
Diff not rendered.
Binary file removed _images/ch_opt_38_0.png
Diff not rendered.
Binary file removed _images/ch_production_12_0.png
Diff not rendered.
Binary file removed _images/ch_production_14_0.png
Diff not rendered.
Binary file removed _images/ch_production_17_0.png
Diff not rendered.
Binary file removed _images/ch_production_21_0.png
Diff not rendered.
Binary file removed _images/ch_production_23_0.png
Diff not rendered.
Binary file removed _images/ch_production_26_0.png
Diff not rendered.
Binary file removed _images/ch_production_30_0.png
Diff not rendered.
Binary file removed _images/ch_production_36_0.png
Diff not rendered.
Binary file removed _images/ch_production_42_0.png
Diff not rendered.
Binary file removed _images/ch_production_48_0.png
Diff not rendered.
Binary file removed _images/ch_production_52_0.png
Diff not rendered.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

11 changes: 4 additions & 7 deletions _sources/ch_fpms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.10.3
kernelspec:
display_name: Python 3
language: python
Expand All @@ -16,9 +14,8 @@ kernelspec:
# Chapter 5 - Nonlinear Interactions (Python Code)

```{code-cell}
---
tags: [hide-output]
---
:tags: [hide-output]
! pip install --upgrade quantecon_book_networks
```

Expand Down Expand Up @@ -160,7 +157,7 @@ def plot_fin_graph(G, ax, node_color_list):
Now we will iterate by applying the operator $T$ to the vector of firm values $v$ and produce the plots.

```{code-cell}
G = nx.from_numpy_matrix(np.matrix(fn.C), create_using=nx.DiGraph)
G = nx.from_numpy_array(np.array(fn.C), create_using=nx.DiGraph)
v = fn.v_bar
k = 15
Expand All @@ -177,5 +174,5 @@ for i in range(k):
if export_figures:
plt.savefig("figures/fin_network_sims_1.pdf")
plt.show()
```

19 changes: 11 additions & 8 deletions _sources/ch_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.5
jupytext_version: 1.15.1
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
---

# Chapter 1 - Introduction (Python Code)

```{code-cell} ipython3
---
tags: [hide-output]
---
:tags: [hide-output]
! pip install --upgrade quantecon_book_networks kaleido
```

Expand All @@ -31,8 +29,8 @@ import quantecon_book_networks.input_output as qbn_io
import quantecon_book_networks.data as qbn_data
import quantecon_book_networks.plotting as qbn_plot
ch1_data = qbn_data.introduction()
default_figsize = [6, 4]
export_figures = True
default_figsize = (6, 4)
export_figures = False
```

Next we import some common python libraries.
Expand All @@ -44,6 +42,7 @@ import networkx as nx
import statsmodels.api as sm
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.ticker as ticker
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.patches as mpatches
import plotly.graph_objects as go
Expand Down Expand Up @@ -277,11 +276,15 @@ for ax in axes:
ax = axes[0]
ax.plot(list(range(n)), t_data, linestyle='', marker='o', alpha=0.5, ms=4)
ax.vlines(list(range(n)), 0, t_data, 'k', lw=0.2)
ax.get_xaxis().set_major_formatter(
ticker.FuncFormatter(lambda x, p: format(int(x), ',')))
ax.set_title(f"Student t draws", fontsize=11)
ax = axes[1]
ax.plot(list(range(n)), n_data, linestyle='', marker='o', alpha=0.5, ms=4)
ax.vlines(list(range(n)), 0, n_data, lw=0.2)
ax.get_xaxis().set_major_formatter(
ticker.FuncFormatter(lambda x, p: format(int(x), ',')))
ax.set_title(f"$N(0, \sigma^2)$ with $\sigma = {s}$", fontsize=11)
plt.tight_layout()
Expand Down Expand Up @@ -361,7 +364,7 @@ b, a = results.params
Finally we produce our plot.

```{code-cell} ipython3
fig, ax = plt.subplots(figsize=[7.3,4])
fig, ax = plt.subplots(figsize=(7.3, 4))
ax.scatter(x, y, alpha=0.3, label="firm size (market value)")
ax.plot(x, x * a + b, 'k-', alpha=0.6, label=f"slope = ${a: 1.2f}$")
Expand Down
7 changes: 3 additions & 4 deletions _sources/ch_mcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import quantecon_book_networks.input_output as qbn_io
import quantecon_book_networks.plotting as qbn_plt
import quantecon_book_networks.data as qbn_data
ch4_data = qbn_data.markov_chains_and_networks()
export_figures = True
export_figures = False
```

```{code-cell} ipython3
Expand Down Expand Up @@ -374,8 +374,7 @@ def transition(P, n, ax=None):
ax.plot(range(1, nstates+1), s, '-o', alpha=0.6)
ax.set(ylim=(0, 0.25),
xticks=((1, nstates)))
ax.set_title(f"t = {n}")
ax.set_xlabel("Quantile")
ax.set_title(f"$t = {n}$")
return ax
```
Expand All @@ -388,7 +387,7 @@ fig, axes = plt.subplots(1, len(ns), figsize=(6, 4))
for n, ax in zip(ns, axes):
ax = transition(P_B, n, ax=ax)
ax.set_xlabel("Quantile")
plt.tight_layout()
if export_figures:
Expand Down
2 changes: 1 addition & 1 deletion _sources/ch_opt.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import quantecon_book_networks.input_output as qbn_io
import quantecon_book_networks.plotting as qbn_plt
import quantecon_book_networks.data as qbn_data
ch3_data = qbn_data.optimal_flows()
export_figures = True
export_figures = False
```

```{code-cell}
Expand Down
9 changes: 5 additions & 4 deletions _sources/ch_opt_julia.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jupytext:
kernelspec:
display_name: Julia
language: Julia
name: julia-1.7
name: julia-1.9
---


# Chapter 3 - Optimal Flows (Julia Code)

## Bellman’s Method
Expand Down Expand Up @@ -56,8 +57,8 @@ $T^2_q$, $T^3_q$ and plot them. By $T^3_q$ has already converged on $q^∗$.

```{code-cell}
using PyPlot
export_figures = true
fig, ax = plt.subplots(figsize=[6, 4])
export_figures = false
fig, ax = plt.subplots(figsize=(6, 4))
n = 7
q = zeros(n)
Expand All @@ -67,7 +68,7 @@ ax.set_ylabel("nodes")
for i in 1:3
new_q = T(q)
ax.plot(1:n, new_q, "-o", alpha=0.7, label ="iterate $i")
ax.plot(1:n, new_q, "-o", alpha=0.7, label="iterate $i")
q = new_q
end
Expand Down
4 changes: 2 additions & 2 deletions _sources/ch_production.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import quantecon_book_networks.input_output as qbn_io
import quantecon_book_networks.plotting as qbn_plt
import quantecon_book_networks.data as qbn_data
ch2_data = qbn_data.production()
default_figsize = [6, 4]
export_figures = True
default_figsize = (6, 4)
export_figures = False
```

```{code-cell} ipython3
Expand Down
17 changes: 17 additions & 0 deletions _sources/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
jupytext:
text_representation:
extension: .md
format_name: myst
kernelspec:
display_name: Python 3
language: python
name: python3
---

# Execution Statistics

This table contains the latest execution statistics.

```{nb-exec-table}
```

Large diffs are not rendered by default.

134 changes: 134 additions & 0 deletions _static/_sphinx_javascript_frameworks_compat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/

/**
* select a different prefix for underscore
*/
$u = _.noConflict();


/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
Loading

0 comments on commit 2c0e34a

Please sign in to comment.