Skip to content

Commit

Permalink
deploy: cff04f6
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn-chien committed Aug 16, 2024
1 parent 0437b07 commit b184767
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 180 deletions.
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 modified _images/fig-01-demand-orig-shifted-demand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _images/fig-01-demand-q1-p1-q2-p2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 9 additions & 26 deletions _sources/content/01-demand/01-demand.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 'seaborn-v0_8-whitegrid', 'tableau-colorblind10']\n"
]
}
],
"source": [
"print(plt.style.available)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"cell_id": "211eaf07-febe-480e-9d9d-f7152cca2a4f",
"tags": [
Expand Down Expand Up @@ -123,8 +106,8 @@
"ardy = 0\n",
"\n",
"fig = plt.figure(figsize=[7,7])\n",
"plt.plot(xs, ys, label=\"Original Demand Curve\", linestyle='-', linewidth=2)\n",
"plt.plot(xs, ys2, label=\"Shifted Demand Curve\", linestyle='--', linewidth=2)\n",
"plt.plot(xs, ys, label=\"Original Demand Curve\", linewidth=2)\n",
"plt.plot(xs, ys2, label=\"Shifted Demand Curve\", linestyle=\"dashed\", linewidth=2, color=\"#049348\")\n",
"plt.arrow(arx, ary, ardx, ardy, head_width=0.8, head_length=0.5, length_includes_head=True)\n",
"plt.xticks([])\n",
"plt.yticks([])\n",
Expand Down Expand Up @@ -173,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {
"tags": [
"remove_input"
Expand All @@ -188,17 +171,17 @@
"q_2, p_2 = 8, -16\n",
"\n",
"fig = plt.figure(figsize=[7,7])\n",
"plt.plot(xs, ys)\n",
"plt.plot(xs, ys, color=\"#1F578E\")\n",
"plt.scatter([q_1, q_2], [p_1, p_2], s=200, color=\"g\", zorder=15)\n",
"plt.arrow(q_1, p_1, q_2 - q_1, p_2 - p_1, color=\"tab:orange\", width=.1, head_length=1.5, head_width=0.5, length_includes_head=True, zorder=-1)\n",
"plt.arrow(q_1, p_1, q_2 - q_1, p_2 - p_1, color=\"#CB7432\", width=.1, head_length=1.5, head_width=0.5, length_includes_head=True, zorder=-1)\n",
"\n",
"# (q_1, p_1)\n",
"plt.vlines(q_1, -1000, p_1, linestyle=\"dashed\")\n",
"plt.hlines(p_1, -1000, q_1, linestyle=\"dashed\")\n",
"plt.vlines(q_1, -1000, p_1, linestyle=\"dashed\", color=\"#1F578E\")\n",
"plt.hlines(p_1, -1000, q_1, linestyle=\"dashed\", color=\"#1F578E\")\n",
"\n",
"# (q_2, p_2)\n",
"plt.vlines(q_2, -1000, p_2, linestyle=\"dashed\")\n",
"plt.hlines(p_2, -1000, q_2, linestyle=\"dashed\")\n",
"plt.vlines(q_2, -1000, p_2, linestyle=\"dashed\", color=\"#1F578E\")\n",
"plt.hlines(p_2, -1000, q_2, linestyle=\"dashed\", color=\"#1F578E\")\n",
"\n",
"plt.xticks([q_1, q_2], [r\"$q_1$\", r\"$q_2$\"], size=14)\n",
"plt.yticks([p_1, p_2], [r\"$p_1$\", r\"$p_2$\"], size=14)\n",
Expand Down
153 changes: 77 additions & 76 deletions _sources/content/02-supply/01-supply.ipynb

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions _sources/content/02-supply/04-market-equilibria.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {
"tags": [
"remove_cell"
Expand All @@ -16,7 +16,7 @@
"import matplotlib.pyplot as plt\n",
"import matplotlib as mpl\n",
"import matplotlib.patches as patches\n",
"plt.style.use('seaborn-muted')\n",
"# plt.style.use('seaborn-muted')\n",
"mpl.rcParams['figure.dpi'] = 200\n",
"%matplotlib inline\n",
"\n",
Expand All @@ -42,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"cell_id": "5a6c6746-bad6-466e-8c18-bc16f5fad344"
},
Expand Down Expand Up @@ -154,7 +154,7 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": null,
"metadata": {
"cell_id": "b75d49b7-7c34-4c8a-a844-e16f26940df7"
},
Expand Down Expand Up @@ -239,7 +239,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": null,
"metadata": {
"cell_id": "254b8839-cf4f-460b-a597-c267ad6ebb84"
},
Expand Down Expand Up @@ -330,7 +330,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": null,
"metadata": {
"cell_id": "b7a2e982-d79e-4094-a295-d8edea5e3c12"
},
Expand Down Expand Up @@ -375,7 +375,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": null,
"metadata": {
"cell_id": "42bf023c-0b5a-4f12-8158-dcf58f137185"
},
Expand Down Expand Up @@ -415,7 +415,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": null,
"metadata": {
"cell_id": "d06b28f9-96eb-480c-8a10-3ba4981be472"
},
Expand Down Expand Up @@ -455,7 +455,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": null,
"metadata": {
"cell_id": "f9654557-6972-4ba9-948b-f7ff7a48a61f"
},
Expand Down Expand Up @@ -504,7 +504,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -548,7 +548,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": null,
"metadata": {
"cell_id": "6e28af89-0a83-465e-bb24-d7e66c9b978e"
},
Expand Down Expand Up @@ -596,7 +596,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -623,7 +623,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": null,
"metadata": {
"cell_id": "f5d296fd-a13d-4b0b-a22d-a22806cb498c",
"tags": [
Expand Down Expand Up @@ -736,7 +736,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.4"
}
},
"nbformat": 4,
Expand Down
66 changes: 30 additions & 36 deletions _sources/content/06-inequality/inequality.ipynb

Large diffs are not rendered by default.

14 changes: 1 addition & 13 deletions content/01-demand/01-demand.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,19 +488,7 @@ <h2> Contents </h2>
<div id="searchbox"></div>
<article class="bd-article">

<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">plt</span><span class="o">.</span><span class="n">style</span><span class="o">.</span><span class="n">available</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[&#39;Solarize_Light2&#39;, &#39;_classic_test_patch&#39;, &#39;_mpl-gallery&#39;, &#39;_mpl-gallery-nogrid&#39;, &#39;bmh&#39;, &#39;classic&#39;, &#39;dark_background&#39;, &#39;fast&#39;, &#39;fivethirtyeight&#39;, &#39;ggplot&#39;, &#39;grayscale&#39;, &#39;seaborn-v0_8&#39;, &#39;seaborn-v0_8-bright&#39;, &#39;seaborn-v0_8-colorblind&#39;, &#39;seaborn-v0_8-dark&#39;, &#39;seaborn-v0_8-dark-palette&#39;, &#39;seaborn-v0_8-darkgrid&#39;, &#39;seaborn-v0_8-deep&#39;, &#39;seaborn-v0_8-muted&#39;, &#39;seaborn-v0_8-notebook&#39;, &#39;seaborn-v0_8-paper&#39;, &#39;seaborn-v0_8-pastel&#39;, &#39;seaborn-v0_8-poster&#39;, &#39;seaborn-v0_8-talk&#39;, &#39;seaborn-v0_8-ticks&#39;, &#39;seaborn-v0_8-white&#39;, &#39;seaborn-v0_8-whitegrid&#39;, &#39;tableau-colorblind10&#39;]
</pre></div>
</div>
</div>
</div>
<section class="tex2jax_ignore mathjax_ignore" id="demand-curves">
<section class="tex2jax_ignore mathjax_ignore" id="demand-curves">
<h1>Demand Curves<a class="headerlink" href="#demand-curves" title="Link to this heading">#</a></h1>
<p>In this chapter, we will explore one of the most foundational yet important concepts in economics: demand curves. The demand curve shows the graphical relationship between the price of a good or service and the quantity demanded for it over a given period of time.
In other words, it shows the quantity of goods or services consumers are willing to buy at each market price.
Expand Down
Loading

0 comments on commit b184767

Please sign in to comment.