Skip to content

Commit 4e028ec

Browse files
authored
Add descriptions and readmes to all examples
2 parents 91516d3 + 03f642c commit 4e028ec

File tree

38 files changed

+224
-13
lines changed

38 files changed

+224
-13
lines changed

altair/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Altair Example
2+
3+
This is an example of how to use `Altair` in `PyScript`, in this application we are using the _movies_ dataset from the `vega_datasets` package to create two graphs. The first graph creates a heatmap of the `IMDB` ratings and the `Rotten Tomatoes` ratings of the movies. The second graph creates a bar chart of the movie genres.
4+
5+
## Libraries Used
6+
7+
- [Altair](https://altair-viz.github.io/)
8+
- [Pandas](https://pandas.pydata.org/)
9+
- [Vega Datasets](https://vega.github.io/vega-datasets/)

altair/pyscript.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
name = "Altair"
2+
description = "An application that uses vega datasets and Vega to plot heatmap and bar graphs.
23
packages = ["altair", "pandas", "vega_datasets"]

antigravity/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Antigravity Example
2+
3+
This application is based on the famous XKCD comic [Python](https://xkcd.com/353/). It creates an `Antigravity` class to load a svg and then use PyScript to display and animate it.
4+
5+
It also shows you how you can import a file and use it in your Pyscript application - have a look at `pyscript.toml` to see how it's done.
6+
7+
## References
8+
9+
- [Pyodide - open_url](https://pyodide.org/en/stable/usage/api/python-api/http.html#pyodide.http.open_url)
10+
- [Pyodide - set_interval](https://pyodide.org/en/stable/usage/api/python-api/ffi.html#pyodide.ffi.wrappers.set_interval)
11+
12+
13+

antigravity/pyscript.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name = "Antigravity"
2+
description = "A simple application to display an image and animate it based on the famous XKCD comic."
23

34
[files]
45
"./antigravity.py" = ""

bokeh/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Bokeh Example
2+
3+
This simple application uses both `Pandas` and `Bokeh` to create a simple interactive plot with `PyScript`. We are using circles with orange colour and a size of 15 to represent the data points at hardcoded locations.
4+
5+
This application is a great start if you want to start with `Bokeh` and `Pandas` in `PyScript`.
6+
7+
## Libraries Used
8+
9+
- [Bokeh](https://bokeh.org/)
10+
- [Pandas](https://pandas.pydata.org/)

bokeh/pyscript.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
name = "Bokeh"
2+
description = "Simple application that uses Pandas and Bokeh to plot a graph."
23
packages = ["pandas", "bokeh==3.2.2", "xyzservices"]

d3/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# D3 Example
2+
3+
This application uses the D3 library to create a pie graph using some hardcoded data. We use this data to create a graph both in javascript and in PyScript to show you how you can use one or the other to create a graph.
4+
5+
6+
## Libraries Used
7+
8+
- [D3](https://d3js.org/)
9+
10+
## References
11+
12+
- [Pyodide - create_proxy](https://pyodide.org/en/stable/usage/api/python-api/ffi.html#pyodide.ffi.create_proxy)
13+
- [Pyodide - to_jw](https://pyodide.org/en/stable/usage/api/python-api/ffi.html#pyodide.ffi.to_js)

d3/pyscript.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
name = "D3 Visualization"
2+
description = "A simple application that uses D3 to plot a graph both in Javascript and Pyscript."

folium/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Folium Example
2+
3+
This application uses the `Folium` library to create a map of the United States and then uses Pandas to load a dataset of the unemployment rate in the US on October 2021. We then use this data to create a choropleth map of the unemployment rate in the US.
4+
5+
## Libraries Used
6+
7+
- [Folium](https://python-visualization.github.io/folium/)
8+
- [Pandas](https://pandas.pydata.org/)
9+
10+
## References
11+
12+
- [Folium - Choropleth](https://python-visualization.github.io/folium/latest/reference.html#folium.features.Choropleth)
13+
- [Folium - Map](https://python-visualization.github.io/folium/modules.html#folium.folium.Map)
14+
- [Pandas - Read CSV](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html)
15+
- [Pyodide - open_url](https://pyodide.org/en/stable/usage/api/python-api/http.html#pyodide.http.open_url)

folium/pyscript.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
name = "Folium"
2+
description = "A simple application that uses pandas and folium to draw heatmaps on a map."
23
packages = ["folium", "pandas"]

0 commit comments

Comments
 (0)