{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Using GeoJSON Point Features with Markers" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "import os\n", "import folium\n", "import geopandas as gpd" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "rootpath = os.path.abspath(os.getcwd())" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "gdf = gpd.read_file(os.path.join(rootpath, \"data\", \"subwaystations.geojson\"))" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | name | \n", "url | \n", "line | \n", "objectid | \n", "notes | \n", "geometry | \n", "
---|---|---|---|---|---|---|
0 | \n", "Astor Pl | \n", "http://web.mta.info/nyct/service/ | \n", "4-6-6 Express | \n", "1 | \n", "4 nights, 6-all times, 6 Express-weekdays AM s... | \n", "POINT (-73.99107 40.73005) | \n", "
1 | \n", "Canal St | \n", "http://web.mta.info/nyct/service/ | \n", "4-6-6 Express | \n", "2 | \n", "4 nights, 6-all times, 6 Express-weekdays AM s... | \n", "POINT (-74.00019 40.71880) | \n", "
2 | \n", "50th St | \n", "http://web.mta.info/nyct/service/ | \n", "1-2 | \n", "3 | \n", "1-all times, 2-nights | \n", "POINT (-73.98385 40.76173) | \n", "
3 | \n", "Bergen St | \n", "http://web.mta.info/nyct/service/ | \n", "2-3-4 | \n", "4 | \n", "4-nights, 3-all other times, 2-all times | \n", "POINT (-73.97500 40.68086) | \n", "
4 | \n", "Pennsylvania Ave | \n", "http://web.mta.info/nyct/service/ | \n", "3-4 | \n", "5 | \n", "4-nights, 3-all other times | \n", "POINT (-73.89489 40.66471) | \n", "