From 1fb6514c45e06e0f834f2aec142f3b9d96d9056a Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Wed, 26 Oct 2016 19:51:58 +0000 Subject: [PATCH] added tile example notebook --- examples/test_tiles.ipynb | 260 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 examples/test_tiles.ipynb diff --git a/examples/test_tiles.ipynb b/examples/test_tiles.ipynb new file mode 100644 index 0000000000..aa6e2f9fad --- /dev/null +++ b/examples/test_tiles.ipynb @@ -0,0 +1,260 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/home/jsignell/miniconda2/envs/folium3/lib/python3.5/site-packages/folium/__init__.py\n", + "0.2.1\n" + ] + } + ], + "source": [ + "import folium\n", + "\n", + "print(folium.__file__)\n", + "print(folium.__version__)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "lon, lat = -38.625, -12.875\n", + "zoom_start = 8" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"OpenStreetMap\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Mapbox Bright\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Mapbox Control Room\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Stamen Terrain\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Stamen Toner\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Stamen Watercolor\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Cartodb Positron\", zoom_start=zoom_start)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "folium.Map(location=[lat, lon], tiles=\"Cartodb dark_matter\", zoom_start=zoom_start)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.2" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +}