This file contains hidden or 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
# Import library | |
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Make particles | |
d3.particles('D3Blocks', collision=0.05, spacing=10, figsize=[1200, 500]) |
This file contains hidden or 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
# Import library | |
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# import example | |
df = d3.import_example('cancer') | |
# Tooltip |
This file contains hidden or 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
# Import library | |
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# import example | |
df = d3.import_example('cancer') | |
# x y age ... labels |
This file contains hidden or 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
# Import | |
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Import example | |
img_before, img_after = d3.import_example('unsplash') | |
print(img_before) |
This file contains hidden or 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
# Import library | |
from d3blocks import D3Blocks | |
# Set color scheme | |
d3 = D3Blocks() | |
# Generate random data with various states | |
df = d3.import_example('random_time', n=10000, c=500, date_start="1-1-2000 00:10:05", date_stop="1-1-2001 23:59:59") | |
# datetime sample_id state |
This file contains hidden or 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
# Import library. | |
from d3blocks import D3Blocks | |
# Initialize and set the datetime format | |
d3 = D3Blocks() | |
# Import climate dataset | |
df = d3.import_example('climate') | |
This file contains hidden or 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
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Import example | |
df = d3.import_example('energy') | |
# Create the heatmap | |
d3.heatmap(df, showfig=True, stroke='red', vmax=10, figsize=(700,700)) |
This file contains hidden or 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
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Import example | |
df = d3.import_example('energy') | |
# Link settings | |
d3.chord(df, filepath='chord_demo.html') |
This file contains hidden or 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
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Import example | |
df = d3.import_example('energy') | |
# Link settings | |
d3.sankey(df, link={"color": "source-target"}) |
This file contains hidden or 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
from d3blocks import D3Blocks | |
# Initialize | |
d3 = D3Blocks() | |
# Import example | |
df = d3.import_example('energy') | |
# Show the input data | |
print(df) |