conda create --name lightning-talk intake
conda activate lightning-talk
conda install -c intake us_crime
ipythonImport intake, inspect the metadata on your data source
| def look_for_class(panel, classname, items=None): | |
| """ | |
| Descend a panel object and find any instances of the given class | |
| """ | |
| if items is None: | |
| items = [] | |
| if isinstance(panel, pn.layout.ListPanel): | |
| for p in panel: | |
| items = look_for_class(p, classname, items) | |
| elif isinstance(panel, classname): |
| def make_dynamic(func): | |
| from collections import defaultdict | |
| from types import FunctionType | |
| import param | |
| try: | |
| import panel as pn | |
| panel_available = True | |
| except: | |
| panel_available = False |
| import panel as pn | |
| pn.extension() | |
| labels = [t[0] + t[1] + t[2] for t in zip('abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza', 'cdefghijklmnopqrstuvwxyzab')] | |
| options = dict(zip(labels, range(len(labels)))) | |
| multi = pn.widgets.MultiSelect(options=options) | |
| sort = pn.widgets.Button(name='▼', width=40) | |
| filt = pn.widgets.AutocompleteInput(options=list(options.keys()), placeholder='Filter') |
| import panel as pn | |
| pn.extension() | |
| labels = [t[0] + t[1] + t[2] for t in zip('abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza', 'cdefghijklmnopqrstuvwxyzab')] | |
| options = dict(zip(labels, range(len(labels)))) | |
| multi = pn.widgets.MultiSelect(options=options) | |
| sort = pn.widgets.Button(name='▼', width=40) | |
| filt = pn.widgets.AutocompleteInput(options=list(options.keys()), placeholder='Filter') |
| import os | |
| from collections import OrderedDict | |
| import panel as pn | |
| path = os.getcwd() | |
| down = '│' | |
| right = '└──' | |
| def expand_dir(event): |
| import os | |
| import panel as pn | |
| path = os.getcwd() | |
| def get(event): | |
| """When dir selected populate next pane, remove any extra panes""" | |
| got = event.new[0] | |
| if os.path.isdir(got): | |
| items = sorted(os.listdir(got)) |