Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a10eefa

Browse files
committed
update version check for map charts in python/version2
1 parent d941159 commit a10eefa

14 files changed

+146
-453
lines changed

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

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
thumbnail: thumbnail/choropleth.jpg
77
layout: user-guide
88
language: python
9-
version: 2
109
title: Python Choropleth Maps | Plotly
1110
display_as: maps
1211
has_thumbnail: true
12+
version: 2
1313
ipynb: ~notebook_demo/55
1414
order: 1
1515
page_type: u-guide
@@ -19,7 +19,7 @@
1919
</div>
2020
<div class="inner_cell">
2121
<div class="text_cell_render border-box-sizing rendered_html">
22-
<h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotly?">&#194;&#182;</a></h4><p>Plotly's Python library is free and open source! <a href="https://plot.ly/python/getting-started/">Get started</a> by downloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
22+
<h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotly?">&#182;</a></h4><p>Plotly's Python library is free and open source! <a href="https://plot.ly/python/getting-started/">Get started</a> by downloading the client and <a href="https://plot.ly/python/getting-started/">reading the primer</a>.
2323
<br>You can set up Plotly to work in <a href="https://plot.ly/python/getting-started/#initialization-for-online-plotting">online</a> or <a href="https://plot.ly/python/getting-started/#initialization-for-offline-plotting">offline</a> mode, or in <a href="https://plot.ly/python/getting-started/#start-plotting-online">jupyter notebooks</a>.
2424
<br>We also have a quick-reference <a href="https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf">cheatsheet</a> (new!) to help you get started!</p>
2525

@@ -30,7 +30,16 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
3030
</div>
3131
<div class="inner_cell">
3232
<div class="text_cell_render border-box-sizing rendered_html">
33-
<h4 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anchor-link" href="#United-States-Choropleth-Map">&#194;&#182;</a></h4>
33+
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#182;</a></h4><p>This is documentation for version 2 of plotly.py. See the <a href="https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23">changelog</a> for differences between package versions.</p>
34+
35+
</div>
36+
</div>
37+
</div>
38+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
39+
</div>
40+
<div class="inner_cell">
41+
<div class="text_cell_render border-box-sizing rendered_html">
42+
<h4 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anchor-link" href="#United-States-Choropleth-Map">&#182;</a></h4>
3443
</div>
3544
</div>
3645
</div>
@@ -100,7 +109,7 @@ <h4 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anch
100109

101110

102111
<div class="output_html rendered_html output_subarea output_execute_result">
103-
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~AdamKulidjian/6694.embed" height="525px" width="100%"></iframe>
112+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2919.embed" height="525px" width="100%"></iframe>
104113
</div>
105114

106115
</div>
@@ -113,7 +122,7 @@ <h4 id="United-States-Choropleth-Map">United States Choropleth Map<a class="anch
113122
</div>
114123
<div class="inner_cell">
115124
<div class="text_cell_render border-box-sizing rendered_html">
116-
<h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#World-Choropleth-Map">&#194;&#182;</a></h4>
125+
<h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#World-Choropleth-Map">&#182;</a></h4>
117126
</div>
118127
</div>
119128
</div>
@@ -155,7 +164,7 @@ <h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#
155164
<span class="n">showframe</span> <span class="o">=</span> <span class="bp">False</span><span class="p">,</span>
156165
<span class="n">showcoastlines</span> <span class="o">=</span> <span class="bp">False</span><span class="p">,</span>
157166
<span class="n">projection</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span>
158-
<span class="nb">type</span> <span class="o">=</span> <span class="s1">&#39;Mercator&#39;</span>
167+
<span class="nb">type</span> <span class="o">=</span> <span class="s1">&#39;mercator&#39;</span>
159168
<span class="p">)</span>
160169
<span class="p">)</span>
161170
<span class="p">)</span>
@@ -179,7 +188,7 @@ <h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#
179188

180189

181190
<div class="output_html rendered_html output_subarea output_execute_result">
182-
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~AdamKulidjian/6696.embed" height="525px" width="100%"></iframe>
191+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2480.embed" height="525px" width="100%"></iframe>
183192
</div>
184193

185194
</div>
@@ -192,7 +201,7 @@ <h4 id="World-Choropleth-Map">World Choropleth Map<a class="anchor-link" href="#
192201
</div>
193202
<div class="inner_cell">
194203
<div class="text_cell_render border-box-sizing rendered_html">
195-
<h4 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#Choropleth-Inset-Map">&#194;&#182;</a></h4>
204+
<h4 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#Choropleth-Inset-Map">&#182;</a></h4>
196205
</div>
197206
</div>
198207
</div>
@@ -310,7 +319,7 @@ <h4 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#
310319

311320

312321
<div class="output_html rendered_html output_subarea output_execute_result">
313-
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~AdamKulidjian/6698.embed" height="525px" width="100%"></iframe>
322+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2921.embed" height="525px" width="100%"></iframe>
314323
</div>
315324

316325
</div>
@@ -323,14 +332,14 @@ <h4 id="Choropleth-Inset-Map">Choropleth Inset Map<a class="anchor-link" href="#
323332
</div>
324333
<div class="inner_cell">
325334
<div class="text_cell_render border-box-sizing rendered_html">
326-
<h4 id="Full-County-Choropleths">Full County Choropleths<a class="anchor-link" href="#Full-County-Choropleths">&#194;&#182;</a></h4><p>For the full county choropleth doc page checkout <a href="https://plot.ly/python/county-choropleth/">https://plot.ly/python/county-choropleth/</a></p>
335+
<h4 id="Full-County-Choropleths">Full County Choropleths<a class="anchor-link" href="#Full-County-Choropleths">&#182;</a></h4><p>For the full county choropleth doc page checkout <a href="https://plot.ly/python/county-choropleth/">https://plot.ly/python/county-choropleth/</a></p>
327336

328337
</div>
329338
</div>
330339
</div>
331340
<div class="cell border-box-sizing code_cell rendered">
332341
<div class="input">
333-
<div class="prompt input_prompt">In&nbsp;[2]:</div>
342+
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
334343
<div class="inner_cell">
335344
<div class="input_area">
336345
<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>
@@ -366,42 +375,12 @@ <h4 id="Full-County-Choropleths">Full County Choropleths<a class="anchor-link" h
366375
</div>
367376
</div>
368377

369-
<div class="output_wrapper">
370-
<div class="output">
371-
372-
373-
<div class="output_area">
374-
375-
<div class="prompt"></div>
376-
377-
378-
<div class="output_subarea output_stream output_stdout output_text">
379-
<pre>The draw time for this plot will be slow for clients without much RAM.
380-
</pre>
381-
</div>
382-
</div>
383-
384-
<div class="output_area">
385-
386-
<div class="prompt output_prompt">Out[2]:</div>
387-
388-
389-
390-
<div class="output_html rendered_html output_subarea output_execute_result">
391-
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~AdamKulidjian/6672.embed" height="450px" width="900px"></iframe>
392-
</div>
393-
394-
</div>
395-
396-
</div>
397-
</div>
398-
399378
</div>
400379
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
401380
</div>
402381
<div class="inner_cell">
403382
<div class="text_cell_render border-box-sizing rendered_html">
404-
<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>
383+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#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>
405384

406385
</div>
407386
</div>

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

Lines changed: 18 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
"<br>We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!\n"
1111
]
1212
},
13+
{
14+
"cell_type": "markdown",
15+
"metadata": {},
16+
"source": [
17+
"#### Version Check\n",
18+
"This is documentation for version 2 of plotly.py. See the [changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23) for differences between package versions."
19+
]
20+
},
1321
{
1422
"cell_type": "markdown",
1523
"metadata": {},
@@ -25,7 +33,7 @@
2533
{
2634
"data": {
2735
"text/html": [
28-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/6694.embed\" height=\"525px\" width=\"100%\"></iframe>"
36+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/2919.embed\" height=\"525px\" width=\"100%\"></iframe>"
2937
],
3038
"text/plain": [
3139
"<plotly.tools.PlotlyDisplay object>"
@@ -98,7 +106,7 @@
98106
{
99107
"data": {
100108
"text/html": [
101-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/6696.embed\" height=\"525px\" width=\"100%\"></iframe>"
109+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/2480.embed\" height=\"525px\" width=\"100%\"></iframe>"
102110
],
103111
"text/plain": [
104112
"<plotly.tools.PlotlyDisplay object>"
@@ -143,7 +151,7 @@
143151
" showframe = False,\n",
144152
" showcoastlines = False,\n",
145153
" projection = dict(\n",
146-
" type = 'Mercator'\n",
154+
" type = 'mercator'\n",
147155
" )\n",
148156
" )\n",
149157
")\n",
@@ -167,7 +175,7 @@
167175
{
168176
"data": {
169177
"text/html": [
170-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/6698.embed\" height=\"525px\" width=\"100%\"></iframe>"
178+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~PythonPlotBot/2921.embed\" height=\"525px\" width=\"100%\"></iframe>"
171179
],
172180
"text/plain": [
173181
"<plotly.tools.PlotlyDisplay object>"
@@ -283,30 +291,9 @@
283291
},
284292
{
285293
"cell_type": "code",
286-
"execution_count": 2,
294+
"execution_count": null,
287295
"metadata": {},
288-
"outputs": [
289-
{
290-
"name": "stdout",
291-
"output_type": "stream",
292-
"text": [
293-
"The draw time for this plot will be slow for clients without much RAM.\n"
294-
]
295-
},
296-
{
297-
"data": {
298-
"text/html": [
299-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~AdamKulidjian/6672.embed\" height=\"450px\" width=\"900px\"></iframe>"
300-
],
301-
"text/plain": [
302-
"<plotly.tools.PlotlyDisplay object>"
303-
]
304-
},
305-
"execution_count": 2,
306-
"metadata": {},
307-
"output_type": "execute_result"
308-
}
309-
],
296+
"outputs": [],
310297
"source": [
311298
"import plotly.plotly as py\n",
312299
"import plotly.figure_factory as ff\n",
@@ -347,7 +334,7 @@
347334
},
348335
{
349336
"cell_type": "code",
350-
"execution_count": 3,
337+
"execution_count": null,
351338
"metadata": {},
352339
"outputs": [
353340
{
@@ -378,28 +365,8 @@
378365
"name": "stdout",
379366
"output_type": "stream",
380367
"text": [
381-
"Collecting git+https://github.com/plotly/publisher.git\n",
382-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-Nylcl7-build\n",
383-
"Installing collected packages: publisher\n",
384-
" Found existing installation: publisher 0.11\n",
385-
" Uninstalling publisher-0.11:\n",
386-
" Successfully uninstalled publisher-0.11\n",
387-
" Running setup.py install for publisher ... \u001b[?25ldone\n",
388-
"\u001b[?25hSuccessfully installed publisher-0.11\n"
389-
]
390-
},
391-
{
392-
"name": "stderr",
393-
"output_type": "stream",
394-
"text": [
395-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning:\n",
396-
"\n",
397-
"The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
398-
"\n",
399-
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning:\n",
400-
"\n",
401-
"Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
402-
"\n"
368+
"Collecting git+https://github.com/plotly/publisher.git\r\n",
369+
" Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-jIvIQ7\r\n"
403370
]
404371
}
405372
],
@@ -447,7 +414,7 @@
447414
"name": "python",
448415
"nbconvert_exporter": "python",
449416
"pygments_lexer": "ipython2",
450-
"version": "2.7.12"
417+
"version": "2.7.15rc1"
451418
}
452419
},
453420
"nbformat": 4,

_posts/python-version2/maps/county-choropleth/2015-06-30-county_choropleth.html

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
thumbnail: thumbnail/county-choropleth-usa-greybkgd.jpg
77
layout: user-guide
88
language: python
9-
version: 2
109
title: Python USA County Choropleth Maps | Plotly
1110
display_as: maps
1211
has_thumbnail: true
12+
version: 2
1313
page_type: example_index
1414
order: 0
1515
ipynb: ~notebook_demo/212
@@ -30,45 +30,10 @@ <h4 id="New-to-Plotly?">New to Plotly?<a class="anchor-link" href="#New-to-Plotl
3030
</div>
3131
<div class="inner_cell">
3232
<div class="text_cell_render border-box-sizing rendered_html">
33-
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#182;</a></h4><p>Note: <code>United States County Choropleths</code> are available in version <b>2.5.1+</b><br>
34-
Run <code>pip install plotly --upgrade</code> to update your Plotly version</p>
35-
36-
</div>
37-
</div>
38-
</div>
39-
<div class="cell border-box-sizing code_cell rendered">
40-
<div class="input">
41-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
42-
<div class="inner_cell">
43-
<div class="input_area">
44-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly</span>
45-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
46-
</pre></div>
47-
48-
</div>
49-
</div>
50-
</div>
33+
<h4 id="Version-Check">Version Check<a class="anchor-link" href="#Version-Check">&#182;</a></h4><p>This is documentation for version 2 of plotly.py. See the <a href="https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#270---2018-05-23">changelog</a> for differences between package versions.</p>
5134

52-
<div class="output_wrapper">
53-
<div class="output">
54-
55-
56-
<div class="output_area">
57-
58-
<div class="prompt output_prompt">Out[1]:</div>
59-
60-
61-
62-
63-
<div class="output_text output_subarea output_execute_result">
64-
<pre>&#39;2.7.0&#39;</pre>
6535
</div>
66-
6736
</div>
68-
69-
</div>
70-
</div>
71-
7237
</div>
7338
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
7439
</div>

0 commit comments

Comments
 (0)