Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 22, 2024
1 parent 9a08fb1 commit dceddc4
Showing 1 changed file with 63 additions and 79 deletions.
142 changes: 63 additions & 79 deletions docs/maplibre/geojson_points.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -48,124 +48,108 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "39710eb583cc491d82401844315fc35a",
"version_major": 2,
"version_minor": 1
},
"text/plain": [
"Map(height='600px', map_options={'bearing': 0.0, 'center': (0, 0), 'pitch': 0.0, 'style': 'https://api.maptile…"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"m = leafmap.Map(center=[0, 0], zoom=1, style=style)\n",
"image = \"https://maplibre.org/maplibre-gl-js/docs/assets/osgeo-logo.png\"\n",
"m.add_image(\"custom-marker\", image)\n",
"source = {\n",
" 'type': 'geojson',\n",
" 'data': {\n",
" 'type': 'FeatureCollection',\n",
" 'features': [\n",
" \"type\": \"geojson\",\n",
" \"data\": {\n",
" \"type\": \"FeatureCollection\",\n",
" \"features\": [\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [100.4933, 13.7551]},\n",
" 'properties': {'year': '2004'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [100.4933, 13.7551]},\n",
" \"properties\": {\"year\": \"2004\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [6.6523, 46.5535]},\n",
" 'properties': {'year': '2006'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [6.6523, 46.5535]},\n",
" \"properties\": {\"year\": \"2006\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-123.3596, 48.4268]},\n",
" 'properties': {'year': '2007'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-123.3596, 48.4268]},\n",
" \"properties\": {\"year\": \"2007\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [18.4264, -33.9224]},\n",
" 'properties': {'year': '2008'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [18.4264, -33.9224]},\n",
" \"properties\": {\"year\": \"2008\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [151.195, -33.8552]},\n",
" 'properties': {'year': '2009'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [151.195, -33.8552]},\n",
" \"properties\": {\"year\": \"2009\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [2.1404, 41.3925]},\n",
" 'properties': {'year': '2010'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [2.1404, 41.3925]},\n",
" \"properties\": {\"year\": \"2010\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-104.8548, 39.7644]},\n",
" 'properties': {'year': '2011'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-104.8548, 39.7644]},\n",
" \"properties\": {\"year\": \"2011\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-1.1665, 52.9539]},\n",
" 'properties': {'year': '2013'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-1.1665, 52.9539]},\n",
" \"properties\": {\"year\": \"2013\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-122.6544, 45.5428]},\n",
" 'properties': {'year': '2014'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-122.6544, 45.5428]},\n",
" \"properties\": {\"year\": \"2014\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [126.974, 37.5651]},\n",
" 'properties': {'year': '2015'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [126.974, 37.5651]},\n",
" \"properties\": {\"year\": \"2015\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [7.1112, 50.7255]},\n",
" 'properties': {'year': '2016'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [7.1112, 50.7255]},\n",
" \"properties\": {\"year\": \"2016\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-71.0314, 42.3539]},\n",
" 'properties': {'year': '2017'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-71.0314, 42.3539]},\n",
" \"properties\": {\"year\": \"2017\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [39.2794, -6.8173]},\n",
" 'properties': {'year': '2018'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [39.2794, -6.8173]},\n",
" \"properties\": {\"year\": \"2018\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [26.0961, 44.4379]},\n",
" 'properties': {'year': '2019'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [26.0961, 44.4379]},\n",
" \"properties\": {\"year\": \"2019\"},\n",
" },\n",
" {\n",
" 'type': 'Feature',\n",
" 'geometry': {'type': 'Point', 'coordinates': [-114.0879, 51.0279]},\n",
" 'properties': {'year': '2020'},\n",
" \"type\": \"Feature\",\n",
" \"geometry\": {\"type\": \"Point\", \"coordinates\": [-114.0879, 51.0279]},\n",
" \"properties\": {\"year\": \"2020\"},\n",
" },\n",
" ],\n",
" },\n",
"}\n",
"\n",
"m.add_source(\"conferences\", source)\n",
"layer = {\n",
" 'id': 'conferences',\n",
" 'type': 'symbol',\n",
" 'source': 'conferences',\n",
" 'layout': {\n",
" 'icon-image': 'custom-marker',\n",
" 'text-field': ['get', 'year'],\n",
" 'text-font': ['Open Sans Semibold', 'Arial Unicode MS Bold'],\n",
" 'text-offset': [0, 1.25],\n",
" 'text-anchor': 'top',\n",
" \"id\": \"conferences\",\n",
" \"type\": \"symbol\",\n",
" \"source\": \"conferences\",\n",
" \"layout\": {\n",
" \"icon-image\": \"custom-marker\",\n",
" \"text-field\": [\"get\", \"year\"],\n",
" \"text-font\": [\"Open Sans Semibold\", \"Arial Unicode MS Bold\"],\n",
" \"text-offset\": [0, 1.25],\n",
" \"text-anchor\": \"top\",\n",
" },\n",
"}\n",
"\n",
Expand Down

0 comments on commit dceddc4

Please sign in to comment.