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
console.log("hiplot 1"); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import altair as alt | |
import pandas as pd | |
import panel as pn | |
pn.extension("vega", sizing_mode="stretch_width") | |
data = pd.read_json( | |
"https://raw.githubusercontent.com/vega/vega/master/docs/data/penguins.json" | |
) |
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
# run: pip install pandas panel hvplot | |
import panel as pn | |
import pandas as pd, numpy as np | |
import hvplot.pandas # noqa | |
primary_color="#3E5F8A" | |
secondary_color="#EA899A" | |
idx = pd.date_range('1/1/2000', periods=1000) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import numpy as np | |
import pandas as pd | |
from matplotlib.figure import Figure | |
data_url = "https://cdn.jsdelivr.net/gh/holoviz/panel@master/examples/assets/occupancy.csv" | |
data = pd.read_csv(data_url, parse_dates=["date"]).set_index("date") | |
primary_color = "#0072B5" | |
secondary_color = "#94EA84" |
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
import ast | |
import requests | |
url = 'http://localhost:5006/rest/post_data' | |
def post(value): | |
data = {'data': value} | |
response = requests.post(url, data = data) | |
if response.status_code==200: | |
print(ast.literal_eval(response.text)) |
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
//Formatter to generate line chart | |
var lineFormatter = function(cell, formatterParams, onRendered){ | |
onRendered(function(){ //instantiate sparkline after the cell element has been aded to the DOM | |
$(cell.getElement()).sparkline(cell.getValue(), {width:"100%", type:"line", disableTooltips:true}); | |
}); | |
}; | |
//generate bar chart | |
var barFormatter = function(cell, formatterParams, onRendered){ | |
onRendered(function(){ //instantiate sparkline after the cell element has been aded to the DOM |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import pandas as pd | |
import hvplot.pandas | |
import panel as pn | |
pn.extension(sizing_mode="stretch_width") | |
PALETTE = [ | |
"#ff6f69", | |
"#ffcc5c", | |
"#88d8b0", |
NewerOlder