Skip to content

Commit b2576fa

Browse files
Update README (#22)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ae4d36e commit b2576fa

File tree

8 files changed

+1365
-1359
lines changed

8 files changed

+1365
-1359
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Welcome to mapwidget
22

3+
[![image](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/giswqs/mapwidget/blob/master/docs/examples/maplibre.ipynb)
4+
[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/giswqs/mapwidget/blob/master/docs/examples/maplibre.ipynb)
35
[![image](https://img.shields.io/pypi/v/mapwidget.svg)](https://pypi.python.org/pypi/mapwidget)
46
[![image](https://img.shields.io/conda/vn/conda-forge/mapwidget.svg)](https://anaconda.org/conda-forge/mapwidget)
5-
[![image](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/opengeos/mapwidget/blob/master/docs/examples/maplibre.ipynb)
6-
[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/mapwidget/blob/master/docs/examples/maplibre.ipynb)
7+
[![Conda Recipe](https://img.shields.io/badge/recipe-mapwidget-green.svg)](https://github.com/giswqs/mapwidget-feedstock)
8+
[![image](https://static.pepy.tech/badge/mapwidget)](https://pepy.tech/project/mapwidget)
9+
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/mapwidget.svg)](https://anaconda.org/conda-forge/mapwidget)
10+
[![image](https://github.com/opengeos/mapwidget/workflows/Linux%20build/badge.svg)](https://github.com/opengeos/mapwidget/actions)
11+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/opengeos/mapwidget/master.svg)](https://results.pre-commit.ci/latest/github/opengeos/mapwidget/master)
12+
[![image](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13+
[![image](https://img.shields.io/badge/YouTube-Channel-red)](https://youtube.com/@giswqs)
714

8-
**Custom Jupyter widgets for creating interactive maps using JavaScript libraries with bidirectional communication**
15+
**Custom Jupyter widgets for creating interactive maps with bidirectional communication**
916

1017
The **mapwidget** package provides a set of custom map widgets for creating interactive maps in a Jupyter environment using different JavaScript mapping libraries, such as [Cesium](https://cesium.com/), [Leaflet](https://leafletjs.com/), [Mapbox](https://www.mapbox.com/), [MapLibre](https://maplibre.org/), and [OpenLayers](https://openlayers.org/). The widgets are built on top of the [anywidget](https://github.com/manzt/anywidget) Python package.
1118

@@ -33,7 +40,3 @@ The **mapwidget** package provides a set of custom map widgets for creating inte
3340
### MapLibre
3441

3542
![](https://i.imgur.com/o2ZHeTL.gif)
36-
37-
## Credits
38-
39-
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) and the [giswqs/pypackage](https://github.com/giswqs/pypackage) project template.

docs/examples/cesium.ipynb

Lines changed: 143 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,145 @@
11
{
2-
"cells": [
3-
{
4-
"attachments": {},
5-
"cell_type": "markdown",
6-
"metadata": {},
7-
"source": [
8-
"[![image](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/opengeos/mapwidget/blob/master/docs/examples/cesium.ipynb)\n",
9-
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/mapwidget/blob/master/docs/examples/cesium.ipynb)"
10-
]
11-
},
12-
{
13-
"cell_type": "code",
14-
"execution_count": null,
15-
"metadata": {},
16-
"outputs": [],
17-
"source": [
18-
"# %pip install mapwidget"
19-
]
20-
},
21-
{
22-
"cell_type": "code",
23-
"execution_count": null,
24-
"metadata": {},
25-
"outputs": [],
26-
"source": [
27-
"import os\n",
28-
"import mapwidget.cesium as mapwidget"
29-
]
30-
},
31-
{
32-
"attachments": {},
33-
"cell_type": "markdown",
34-
"metadata": {},
35-
"source": [
36-
"You need a Cesium access token to use the Cesium widget. First, [sign up](https://ion.cesium.com/signup/) for a free Cesium account. Then, you can create a token by following the instructions [here](https://cesium.com/learn/ion/cesium-ion-access-tokens/). Set `CESIUM_TOKEN` as an environment variable to use the Cesium widget. Alternatively, uncomment the following code block and replace `YOUR-CESIUM-TOKEN` with your Cesium access token."
37-
]
38-
},
39-
{
40-
"cell_type": "code",
41-
"execution_count": null,
42-
"metadata": {},
43-
"outputs": [],
44-
"source": [
45-
"if os.environ.get(\"CESIUM_TOKEN\") is None:\n",
46-
" token = \"YOUR-CESIUM-TOKEN\"\n",
47-
"else:\n",
48-
" token = os.environ.get(\"CESIUM_TOKEN\")"
49-
]
50-
},
51-
{
52-
"attachments": {},
53-
"cell_type": "markdown",
54-
"metadata": {},
55-
"source": [
56-
"San Francisco"
57-
]
58-
},
59-
{
60-
"cell_type": "code",
61-
"execution_count": null,
62-
"metadata": {},
63-
"outputs": [],
64-
"source": [
65-
"m = mapwidget.Map(center=[37.655, -122.4175], altitude=400, height=\"600px\", token=token)\n",
66-
"m"
67-
]
68-
},
69-
{
70-
"attachments": {},
71-
"cell_type": "markdown",
72-
"metadata": {},
73-
"source": [
74-
"![](https://i.imgur.com/gK2wA4p.gif)"
75-
]
76-
},
77-
{
78-
"attachments": {},
79-
"cell_type": "markdown",
80-
"metadata": {},
81-
"source": [
82-
"New York City"
83-
]
84-
},
85-
{
86-
"cell_type": "code",
87-
"execution_count": null,
88-
"metadata": {},
89-
"outputs": [],
90-
"source": [
91-
"m = mapwidget.Map(\n",
92-
" center=[40.70605, -74.01177], altitude=600, height=\"600px\", token=token\n",
93-
")\n",
94-
"m"
95-
]
96-
},
97-
{
98-
"attachments": {},
99-
"cell_type": "markdown",
100-
"metadata": {},
101-
"source": [
102-
"![](https://i.imgur.com/6quoDtN.gif)"
103-
]
104-
},
105-
{
106-
"cell_type": "code",
107-
"execution_count": null,
108-
"metadata": {},
109-
"outputs": [],
110-
"source": [
111-
"m.center"
112-
]
113-
},
114-
{
115-
"cell_type": "code",
116-
"execution_count": null,
117-
"metadata": {},
118-
"outputs": [],
119-
"source": [
120-
"m.zoom"
121-
]
122-
}
123-
],
124-
"metadata": {
125-
"kernelspec": {
126-
"display_name": "Python 3 (ipykernel)",
127-
"language": "python",
128-
"name": "python3"
129-
},
130-
"language_info": {
131-
"codemirror_mode": {
132-
"name": "ipython",
133-
"version": 3
134-
},
135-
"file_extension": ".py",
136-
"mimetype": "text/x-python",
137-
"name": "python",
138-
"nbconvert_exporter": "python",
139-
"pygments_lexer": "ipython3",
140-
"version": "3.10.9"
141-
}
142-
},
143-
"nbformat": 4,
144-
"nbformat_minor": 4
2+
"cells": [
3+
{
4+
"attachments": {},
5+
"cell_type": "markdown",
6+
"metadata": {},
7+
"source": [
8+
"[![image](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/opengeos/mapwidget/blob/master/docs/examples/cesium.ipynb)\n",
9+
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/mapwidget/blob/master/docs/examples/cesium.ipynb)"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"# %pip install mapwidget"
19+
]
20+
},
21+
{
22+
"cell_type": "code",
23+
"execution_count": null,
24+
"metadata": {},
25+
"outputs": [],
26+
"source": [
27+
"import os\n",
28+
"import mapwidget.cesium as mapwidget"
29+
]
30+
},
31+
{
32+
"attachments": {},
33+
"cell_type": "markdown",
34+
"metadata": {},
35+
"source": [
36+
"You need a Cesium access token to use the Cesium widget. First, [sign up](https://ion.cesium.com/signup/) for a free Cesium account. Then, you can create a token by following the instructions [here](https://cesium.com/learn/ion/cesium-ion-access-tokens/). Set `CESIUM_TOKEN` as an environment variable to use the Cesium widget. Alternatively, uncomment the following code block and replace `YOUR-CESIUM-TOKEN` with your Cesium access token."
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": null,
42+
"metadata": {},
43+
"outputs": [],
44+
"source": [
45+
"if os.environ.get(\"CESIUM_TOKEN\") is None:\n",
46+
" token = \"YOUR-CESIUM-TOKEN\"\n",
47+
"else:\n",
48+
" token = os.environ.get(\"CESIUM_TOKEN\")"
49+
]
50+
},
51+
{
52+
"attachments": {},
53+
"cell_type": "markdown",
54+
"metadata": {},
55+
"source": [
56+
"San Francisco"
57+
]
58+
},
59+
{
60+
"cell_type": "code",
61+
"execution_count": null,
62+
"metadata": {},
63+
"outputs": [],
64+
"source": [
65+
"m = mapwidget.Map(center=[37.655, -122.4175], altitude=400, height=\"600px\", token=token)\n",
66+
"m"
67+
]
68+
},
69+
{
70+
"attachments": {},
71+
"cell_type": "markdown",
72+
"metadata": {},
73+
"source": [
74+
"![](https://i.imgur.com/gK2wA4p.gif)"
75+
]
76+
},
77+
{
78+
"attachments": {},
79+
"cell_type": "markdown",
80+
"metadata": {},
81+
"source": [
82+
"New York City"
83+
]
84+
},
85+
{
86+
"cell_type": "code",
87+
"execution_count": null,
88+
"metadata": {},
89+
"outputs": [],
90+
"source": [
91+
"m = mapwidget.Map(\n",
92+
" center=[40.70605, -74.01177], altitude=600, height=\"600px\", token=token\n",
93+
")\n",
94+
"m"
95+
]
96+
},
97+
{
98+
"attachments": {},
99+
"cell_type": "markdown",
100+
"metadata": {},
101+
"source": [
102+
"![](https://i.imgur.com/6quoDtN.gif)"
103+
]
104+
},
105+
{
106+
"cell_type": "code",
107+
"execution_count": null,
108+
"metadata": {},
109+
"outputs": [],
110+
"source": [
111+
"m.center"
112+
]
113+
},
114+
{
115+
"cell_type": "code",
116+
"execution_count": null,
117+
"metadata": {},
118+
"outputs": [],
119+
"source": [
120+
"m.zoom"
121+
]
122+
}
123+
],
124+
"metadata": {
125+
"kernelspec": {
126+
"display_name": "Python 3 (ipykernel)",
127+
"language": "python",
128+
"name": "python3"
129+
},
130+
"language_info": {
131+
"codemirror_mode": {
132+
"name": "ipython",
133+
"version": 3
134+
},
135+
"file_extension": ".py",
136+
"mimetype": "text/x-python",
137+
"name": "python",
138+
"nbconvert_exporter": "python",
139+
"pygments_lexer": "ipython3",
140+
"version": "3.10.9"
141+
}
142+
},
143+
"nbformat": 4,
144+
"nbformat_minor": 4
145145
}

0 commit comments

Comments
 (0)