Skip to content

Commit 61bf711

Browse files
2nd round of comments
1 parent d9e6755 commit 61bf711

File tree

6 files changed

+85
-112
lines changed

6 files changed

+85
-112
lines changed

_posts/python/maps/choropleth-maps/2015-06-30-Choropleth_maps.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
title: Python Choropleth Maps | Plotly
1010
display_as: maps
1111
has_thumbnail: true
12-
page_type: example_index
13-
order: 1
1412
ipynb: ~notebook_demo/55
13+
order: 1
14+
page_type: u-guide
1515
---
1616
{% raw %}
1717
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
@@ -29,7 +29,7 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
2929
</div>
3030
<div class="inner_cell">
3131
<div class="text_cell_render border-box-sizing rendered_html">
32-
<h3 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anchor-link" href="#United-States-Choropleth-Map">&#194;&#182;</a></h3>
32+
<h4 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anchor-link" href="#United-States-Choropleth-Map">&#194;&#182;</a></h4>
3333
</div>
3434
</div>
3535
</div>
@@ -112,7 +112,7 @@ <h3 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anch
112112
</div>
113113
<div class="inner_cell">
114114
<div class="text_cell_render border-box-sizing rendered_html">
115-
<h3 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#World-Choropleth-Map">&#194;&#182;</a></h3>
115+
<h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#World-Choropleth-Map">&#194;&#182;</a></h4>
116116
</div>
117117
</div>
118118
</div>
@@ -191,7 +191,7 @@ <h3 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#
191191
</div>
192192
<div class="inner_cell">
193193
<div class="text_cell_render border-box-sizing rendered_html">
194-
<h3 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#Choropleth-Inset-Map">&#194;&#182;</a></h3>
194+
<h4 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#Choropleth-Inset-Map">&#194;&#182;</a></h4>
195195
</div>
196196
</div>
197197
</div>
@@ -410,6 +410,15 @@ <h4 id="Full-County-Choropleths">Full County Choropleths<a class="anchor-link" h
410410
</div>
411411

412412
</div>
413+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
414+
</div>
415+
<div class="inner_cell">
416+
<div class="text_cell_render border-box-sizing rendered_html">
417+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182;</a></h4><p>See <a href="https://plot.ly/python/reference/#choropleth">https://plot.ly/python/reference/#choropleth</a> for more information and chart attribute options!</p>
418+
419+
</div>
420+
</div>
421+
</div>
413422

414423

415424
{% endraw %}

_posts/python/maps/choropleth-maps/Choropleth_maps.ipynb

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cell_type": "markdown",
1515
"metadata": {},
1616
"source": [
17-
"### United States Choropleth Map"
17+
"#### United States Choropleth Map"
1818
]
1919
},
2020
{
@@ -87,7 +87,7 @@
8787
"cell_type": "markdown",
8888
"metadata": {},
8989
"source": [
90-
"### World Choropleth Map"
90+
"#### World Choropleth Map"
9191
]
9292
},
9393
{
@@ -156,7 +156,7 @@
156156
"cell_type": "markdown",
157157
"metadata": {},
158158
"source": [
159-
"### Choropleth Inset Map"
159+
"#### Choropleth Inset Map"
160160
]
161161
},
162162
{
@@ -357,7 +357,7 @@
357357
},
358358
{
359359
"cell_type": "code",
360-
"execution_count": 5,
360+
"execution_count": 1,
361361
"metadata": {},
362362
"outputs": [
363363
{
@@ -389,7 +389,7 @@
389389
"output_type": "stream",
390390
"text": [
391391
"Collecting git+https://github.com/plotly/publisher.git\n",
392-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-Qur0ve-build\n",
392+
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-OKLJ7r-build\n",
393393
"Installing collected packages: publisher\n",
394394
" Found existing installation: publisher 0.11\n",
395395
" Uninstalling publisher-0.11:\n",
@@ -402,14 +402,10 @@
402402
"name": "stderr",
403403
"output_type": "stream",
404404
"text": [
405-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning:\n",
406-
"\n",
407-
"The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
408-
"\n",
409-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning:\n",
410-
"\n",
411-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
412-
"\n"
405+
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
406+
" \"You should import from nbconvert instead.\", ShimWarning)\n",
407+
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning: Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
408+
" warnings.warn('Did you \"Save\" this notebook before running this command? '\n"
413409
]
414410
}
415411
],
@@ -426,8 +422,7 @@
426422
" 'How to make choropleth maps in Python with Plotly.',\n",
427423
" title = 'Python Choropleth Maps | Plotly',\n",
428424
" has_thumbnail='true', thumbnail='thumbnail/choropleth.jpg', \n",
429-
" language='python', \n",
430-
" page_type='example_index',\n",
425+
" language='python',\n",
431426
" display_as='maps', order=1, ipynb='~notebook_demo/55',\n",
432427
" uses_plotly_offline=False)"
433428
]

_posts/python/maps/county_choropleth/2015-06-30-county_choropleth.html

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ <h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check"
7474
<div class="text_cell_render border-box-sizing rendered_html">
7575
<h4 id="FIPS-and-Values">FIPS and Values<a class="anchor-link" href="#FIPS-and-Values">&#194;&#182;</a></h4><p>Every US state and county has an assined ID regulated by the US Federal Government under the term FIPS (Federal Information Processing Standards) codes. There are state codes and county codes: the 2016 state and county FIPS codes can be found at the <a href="https://www.census.gov/geographies/reference-files/2016/demo/popest/2016-fips.html">US Census Website</a>.</p>
7676
<p>Combine a state FIPS code (eg. <code>06</code> for California) with a county FIPS code of the state (eg. <code>059</code> for Orange county) and this new state-county FIPS code (<code>06059</code>) uniquely refers to the specified state and county.</p>
77-
<p><code>ff.create_choropleth</code> only needs a list of FIPS codes and a list of values.</p>
78-
<p><b>Each FIPS code points to one county and each corresponding value in `values` determines the color of the county.</b></p>
77+
<p><code>ff.create_choropleth</code> only needs a list of FIPS codes and a list of values. Each FIPS code points to one county and each corresponding value in <code>values</code> determines the color of the county.</p>
7978

8079
</div>
8180
</div>
@@ -140,12 +139,6 @@ <h4 id="Change-the-Scope">Change the Scope<a class="anchor-link" href="#Change-t
140139
<p><code>['AK', 'AL', 'CA', ...]</code></p>
141140
<p>State abbreviations (eg. <code>CA</code>) or the proper names (eg. <code>California</code>) as strings are accepted. If the state name is not recognized, the API will throw a Warning and indicate which FIPS values were ignored.</p>
142141
<p>Another param used in the example below is <code>binning_endpoints</code>. If your <code>values</code> is a list of numbers, you can bin your values into half-open intervals on the real line.</p>
143-
<p>For example if <code>binning_endpoints = [4, 7]</code> then each <code>x</code> from <code>values</code> will be grouped into one of the following bins:</p>
144-
<ul>
145-
<li><code>x &lt;= 4</code></li>
146-
<li><code>4 &lt; x &lt;= 7</code></li>
147-
<li><code>x &gt; 7</code></li>
148-
</ul>
149142

150143
</div>
151144
</div>
@@ -431,7 +424,7 @@ <h4 id="The-Entire-USA">The Entire USA<a class="anchor-link" href="#The-Entire-U
431424
</div>
432425
<div class="cell border-box-sizing code_cell rendered">
433426
<div class="input">
434-
<div class="prompt input_prompt">In&nbsp;[8]:</div>
427+
<div class="prompt input_prompt">In&nbsp;[2]:</div>
435428
<div class="inner_cell">
436429
<div class="input_area">
437430
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly.plotly</span> <span class="kn">as</span> <span class="nn">py</span>
@@ -485,21 +478,7 @@ <h4 id="The-Entire-USA">The Entire USA<a class="anchor-link" href="#The-Entire-U
485478

486479
<div class="output_area">
487480

488-
<div class="prompt"></div>
489-
490-
491-
<div class="output_subarea output_stream output_stderr output_text">
492-
<pre>/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotly/api/v1/clientresp.py:40: UserWarning:
493-
494-
Estimated Draw Time Slow
495-
496-
</pre>
497-
</div>
498-
</div>
499-
500-
<div class="output_area">
501-
502-
<div class="prompt output_prompt">Out[8]:</div>
481+
<div class="prompt output_prompt">Out[2]:</div>
503482

504483

505484

@@ -525,7 +504,7 @@ <h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182
525504
</div>
526505
<div class="cell border-box-sizing code_cell rendered">
527506
<div class="input">
528-
<div class="prompt input_prompt">In&nbsp;[11]:</div>
507+
<div class="prompt input_prompt">In&nbsp;[3]:</div>
529508
<div class="inner_cell">
530509
<div class="input_area">
531510
<div class=" highlight hl-ipython2"><pre><span></span><span class="n">help</span><span class="p">(</span><span class="n">ff</span><span class="o">.</span><span class="n">create_choropleth</span><span class="p">)</span>

_posts/python/maps/county_choropleth/county_choropleth.ipynb

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@
4949
"\n",
5050
"Combine a state FIPS code (eg. `06` for California) with a county FIPS code of the state (eg. `059` for Orange county) and this new state-county FIPS code (`06059`) uniquely refers to the specified state and county.\n",
5151
"\n",
52-
"`ff.create_choropleth` only needs a list of FIPS codes and a list of values.\n",
53-
"\n",
54-
"<b>Each FIPS code points to one county and each corresponding value in `values` determines the color of the county.</b>"
52+
"`ff.create_choropleth` only needs a list of FIPS codes and a list of values. Each FIPS code points to one county and each corresponding value in `values` determines the color of the county."
5553
]
5654
},
5755
{
@@ -108,12 +106,7 @@
108106
"\n",
109107
"State abbreviations (eg. `CA`) or the proper names (eg. `California`) as strings are accepted. If the state name is not recognized, the API will throw a Warning and indicate which FIPS values were ignored.\n",
110108
"\n",
111-
"Another param used in the example below is `binning_endpoints`. If your `values` is a list of numbers, you can bin your values into half-open intervals on the real line.\n",
112-
"\n",
113-
"For example if `binning_endpoints = [4, 7]` then each `x` from `values` will be grouped into one of the following bins:\n",
114-
"- `x <= 4`\n",
115-
"- `4 < x <= 7`\n",
116-
"- `x > 7`"
109+
"Another param used in the example below is `binning_endpoints`. If your `values` is a list of numbers, you can bin your values into half-open intervals on the real line."
117110
]
118111
},
119112
{
@@ -357,7 +350,7 @@
357350
},
358351
{
359352
"cell_type": "code",
360-
"execution_count": 8,
353+
"execution_count": 2,
361354
"metadata": {},
362355
"outputs": [
363356
{
@@ -367,16 +360,6 @@
367360
"The draw time for this plot will be slow for clients without much RAM.\n"
368361
]
369362
},
370-
{
371-
"name": "stderr",
372-
"output_type": "stream",
373-
"text": [
374-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotly/api/v1/clientresp.py:40: UserWarning:\n",
375-
"\n",
376-
"Estimated Draw Time Slow\n",
377-
"\n"
378-
]
379-
},
380363
{
381364
"data": {
382365
"text/html": [
@@ -386,7 +369,7 @@
386369
"<plotly.tools.PlotlyDisplay object>"
387370
]
388371
},
389-
"execution_count": 8,
372+
"execution_count": 2,
390373
"metadata": {},
391374
"output_type": "execute_result"
392375
}
@@ -434,7 +417,7 @@
434417
},
435418
{
436419
"cell_type": "code",
437-
"execution_count": 11,
420+
"execution_count": 3,
438421
"metadata": {
439422
"scrolled": true
440423
},
@@ -656,7 +639,7 @@
656639
},
657640
{
658641
"cell_type": "code",
659-
"execution_count": 1,
642+
"execution_count": 4,
660643
"metadata": {},
661644
"outputs": [
662645
{
@@ -688,7 +671,7 @@
688671
"output_type": "stream",
689672
"text": [
690673
"Collecting git+https://github.com/plotly/publisher.git\n",
691-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-jLD6v9-build\n",
674+
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-9qabVC-build\n",
692675
"Installing collected packages: publisher\n",
693676
" Found existing installation: publisher 0.11\n",
694677
" Uninstalling publisher-0.11:\n",
@@ -701,10 +684,14 @@
701684
"name": "stderr",
702685
"output_type": "stream",
703686
"text": [
704-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
705-
" \"You should import from nbconvert instead.\", ShimWarning)\n",
706-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning: Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
707-
" warnings.warn('Did you \"Save\" this notebook before running this command? '\n"
687+
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning:\n",
688+
"\n",
689+
"The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
690+
"\n",
691+
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning:\n",
692+
"\n",
693+
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
694+
"\n"
708695
]
709696
}
710697
],

0 commit comments

Comments
 (0)