{ "cells": [ { "cell_type": "markdown", "id": "85e44075", "metadata": {}, "source": [ "Getting started\n", "===============\n", "\n", "Installation\n", "------------\n", "\n", "Folium can be installed using\n", "\n", "```\n", "$ pip install folium\n", "```\n", "\n", "If you are using the Conda package manager, the equivalent is\n", "\n", "```\n", "$ conda install folium -c conda-forge\n", "```\n", "\n", "\n", "### Dependencies\n", "\n", "Folium has the following dependencies, all of which are installed automatically\n", "with the above installation commands:\n", "\n", "- branca\n", "- Jinja2\n", "- Numpy\n", "- Requests\n", "\n", "Additional packages may be necessary for some functionality. It will say so in\n", "the documentation where that's the case.\n", "\n", "\n", "Creating a map\n", "---------------\n", "\n", "Here's a basic example of creating a map:" ] }, { "cell_type": "code", "execution_count": 1, "id": "f9cf0161", "metadata": { "execution": { "iopub.execute_input": "2024-02-29T08:58:59.159882Z", "iopub.status.busy": "2024-02-29T08:58:59.159720Z", "iopub.status.idle": "2024-02-29T08:58:59.558353Z", "shell.execute_reply": "2024-02-29T08:58:59.557869Z" } }, "outputs": [], "source": [ "import folium\n", "\n", "m = folium.Map(location=(45.5236, -122.6750))" ] }, { "cell_type": "markdown", "id": "71a02cbb", "metadata": {}, "source": [ "If you are in a Jupyter Notebook, you can display it by asking for the object representation:" ] }, { "cell_type": "code", "execution_count": 2, "id": "2562f91f", "metadata": { "execution": { "iopub.execute_input": "2024-02-29T08:58:59.560516Z", "iopub.status.busy": "2024-02-29T08:58:59.560251Z", "iopub.status.idle": "2024-02-29T08:58:59.568518Z", "shell.execute_reply": "2024-02-29T08:58:59.568129Z" } }, "outputs": [ { "data": { "text/html": [ "