{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", " \n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Plotly\n", "\n", "\n", "Geo Chart from Plotly.JS [component](00_components.ipynb) in Epyk will be using the property plotly from the ui.charts property.\n", "\n", "\n", "## Two main categories are available\n", "\n", "- [Bubble](./geo_bubble.ipynb)\n", "- [Choropleth](./geo_choropleth.ipynb)\n", "\n", "with for each of them the below dimensions:\n", "\n", "- USA\n", "- Europe\n", "- Asia\n", "- Africa\n", "- North America\n", "- South America\n", "- World\n", "\n", "the ui entry point will give you access to all the registered components.\n", "Different flavour of buttons are available in the framework." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from epyk.core.Page import Report\n", "rptObj = Report()\n", "\n", "records = [\n", " {'countries': 'FRA', 'size': 20},\n", " {'countries': 'GBR', 'size': 50},\n", " {'countries': 'DEU', 'size': 30},\n", " {'countries': 'RUS', 'size': 15},\n", " {'countries': 'ESP', 'size': 15},\n", "]\n", "\n", "europe = rptObj.ui.geo.plotly.choropleths.europe(records, size_col='size', country_col='countries')\n", "asai = rptObj.ui.geo.plotly.choropleths.asia(records, size_col='size', country_col='countries')\n", "\n", "rptObj.ui.row([europe, asai])\n", "\n", "rptObj.outs.jupyter()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Go back to the Chart Home page\n", "
\n", "Do not forget that this is a collaborative framework so do not hesitate to give feedbacks and like the different repository to get more visbility.\n", "\n", "Also any help is more than welcome !" ] }, { "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.8.2" } }, "nbformat": 4, "nbformat_minor": 2 }