Created
April 25, 2021 17:15
-
-
Save imgVOID/31c9daa4375aae86927322d11130293a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Указание ссылки на библиотеку D3: | |
d3_lib_url = "https://d3js.org/d3.v3.min.js" | |
# Загрузка локальных библиотек: | |
with open("radial_bar.css", "r") as f: | |
radial_bar_css = f.read() | |
with open ("radial_bar_lib.js", "r") as f: | |
radial_bar_lib = f.read() | |
# Загрузка набора данных: | |
import pandas as pd | |
energy = pd.read_csv("energy.csv").to_dict(orient="records") | |
# Построение диаграммы с помощью notebookJS: | |
from notebookjs import execute_js | |
execute_js(library_list=[d3_lib_url, radial_bar_lib], main_function="radial_bar", | |
data_dict=energy, css_list=[radial_bar_css]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment