From 30598f9ad4a9fc2e7a3873666a2937a81f5a3185 Mon Sep 17 00:00:00 2001 From: chfw Date: Mon, 3 Jun 2019 23:12:29 +0100 Subject: [PATCH] step 4: rendering using pyecharts inside jupyter-notebook --- The-Forbidden-City.ipynb | 144 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 The-Forbidden-City.ipynb diff --git a/The-Forbidden-City.ipynb b/The-Forbidden-City.ipynb new file mode 100644 index 0000000..8ce1da3 --- /dev/null +++ b/The-Forbidden-City.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "
\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from pyecharts import options as opts\n", + "from pyecharts.charts import Geo\n", + "from pyecharts.datasets import register_url\n", + "\n", + "register_url(\"http://127.0.0.1:8000\")\n", + "\n", + "g = (\n", + " Geo()\n", + " .add_schema(maptype=\"The Forbidden City\")\n", + " .set_global_opts(\n", + " title_opts=opts.TitleOpts(title=\"The Forbidden City in Beijing\"),\n", + " )\n", + ")\n", + "g.render_notebook()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "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.7.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}