Skip to content

Commit

Permalink
Update examples with Jupytext 1.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Mar 27, 2021
1 parent 4ae9263 commit 475aebd
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 48 deletions.
6 changes: 3 additions & 3 deletions demo/World population.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
jupyter:
jupytext:
cell_markers: region,endregion
formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc
formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
text_representation:
extension: .Rmd
format_name: rmarkdown
format_version: '1.1'
jupytext_version: 1.1.0
format_version: '1.2'
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
Expand Down
2 changes: 1 addition & 1 deletion demo/World population.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@
"metadata": {
"jupytext": {
"cell_markers": "region,endregion",
"formats": "ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc"
"formats": "ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst"
},
"kernelspec": {
"display_name": "Python 3",
Expand Down
24 changes: 14 additions & 10 deletions demo/World population.lgt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@
# jupyter:
# jupytext:
# cell_markers: region,endregion
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.1.0
# format_version: '1.5'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# # A quick insight at world population
#
# ## Collecting population data
#
# In the below we retrieve population data from the
# [World Bank](http://www.worldbank.org/)
# using the [wbdata](https://github.com/OliverSherouse/wbdata) python package
# region [markdown]
"""
# A quick insight at world population
## Collecting population data
In the below we retrieve population data from the
[World Bank](http://www.worldbank.org/)
using the [wbdata](https://github.com/OliverSherouse/wbdata) python package
"""
# endregion

# region
import pandas as pd
Expand Down
6 changes: 3 additions & 3 deletions demo/World population.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
jupyter:
jupytext:
cell_markers: region,endregion
formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc
formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
text_representation:
extension: .md
format_name: markdown
format_version: '1.1'
jupytext_version: 1.1.0
format_version: '1.3'
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
Expand Down
21 changes: 7 additions & 14 deletions demo/World population.myst.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
jupytext:
cell_markers: region,endregion
formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
text_representation:
extension: '.md'
extension: .md
format_name: myst
format_version: '0.7'
jupytext_version: 1.4.0+dev
format_version: 0.13
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
Expand Down Expand Up @@ -95,13 +96,6 @@ plt.show()

## Stacked bar plot with plotly

+++

Stacked area plots (with cumulated values computed depending on
selected legends) are
[on their way](https://github.com/plotly/plotly.js/pull/2960) at Plotly. For
now we just do a stacked bar plot.

```{code-cell} ipython3
import plotly.offline as offline
import plotly.graph_objs as go
Expand All @@ -110,10 +104,9 @@ offline.init_notebook_mode()
```

```{code-cell} ipython3
bars = [go.Bar(x=population.index, y=population[zone], name=zone)
data = [go.Scatter(x=population.index, y=population[zone], name=zone, stackgroup='World')
for zone in zones]
fig = go.Figure(data=bars,
layout=go.Layout(title='World population',
barmode='stack'))
fig = go.Figure(data=data,
layout=go.Layout(title='World population'))
offline.iplot(fig)
```
10 changes: 5 additions & 5 deletions demo/World population.pandoc.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
jupyter:
jupytext:
cell_markers: 'region,endregion'
formats: 'ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc'
cell_markers: region,endregion
formats: "ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst"
text_representation:
extension: '.md'
extension: .md
format_name: pandoc
format_version: '2.7.2'
jupytext_version: '1.1.0'
format_version: 2.11.4
jupytext_version: 1.11.1
kernelspec:
display_name: Python 3
language: python
Expand Down
22 changes: 12 additions & 10 deletions demo/World population.pct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
# jupyter:
# jupytext:
# cell_markers: region,endregion
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.2'
# jupytext_version: 1.1.0
# format_version: '1.3'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# %% [markdown]
# # A quick insight at world population
#
# ## Collecting population data
#
# In the below we retrieve population data from the
# [World Bank](http://www.worldbank.org/)
# using the [wbdata](https://github.com/OliverSherouse/wbdata) python package
"""
# A quick insight at world population
## Collecting population data
In the below we retrieve population data from the
[World Bank](http://www.worldbank.org/)
using the [wbdata](https://github.com/OliverSherouse/wbdata) python package
"""

# %%
import pandas as pd
Expand Down
4 changes: 2 additions & 2 deletions demo/World population.spx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# jupyter:
# jupytext:
# cell_markers: region,endregion
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc
# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc,.myst.md:myst
# text_representation:
# extension: .py
# format_name: sphinx
# format_version: '1.1'
# jupytext_version: 1.1.0
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
Expand Down

0 comments on commit 475aebd

Please sign in to comment.