pfund-plot 0.0.2__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/PKG-INFO +2 -2
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/README.md +1 -1
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/pyproject.toml +1 -1
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/cli/commands/gallery/gallery_marimo.py +20 -5
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/js_tap/components/candlestick.js +1851 -1395
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/candlestick/svelte.py +3 -1
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/plot.py +5 -1
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/__main__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/cli/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/cli/commands/gallery/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/cli/commands/serve.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/cli/main.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/config.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/dataframe_backend.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/display_mode.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/panel_design.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/panel_theme.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/enums/plotting_backend.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/mixins/streaming_market_feed_mixin.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/altair.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/area/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/area/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/bar/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/bar/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/candlestick/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/candlestick/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/holoviews.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/label/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/label/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/layout/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/layout/layout.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/layout/panel.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/layout/tabs/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/layout/tabs/panel.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/lazy.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/line/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/line/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/matplotlib.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/plotly.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/scatter/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/scatter/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/scatter/marker.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/plots/ta.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/renderers/base.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/renderers/browser.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/renderers/desktop.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/renderers/notebook.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/typing.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/utils/__init__.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/utils/bokeh.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/widgets/base.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/widgets/datetime_widget.py +0 -0
- {pfund_plot-0.0.2 → pfund_plot-0.0.3}/src/pfund_plot/widgets/ticker_widget.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pfund-plot
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: A library for financial data visualization
|
|
5
5
|
Keywords: financial data,plotting,dashboards,charts,data visualization,graphs,plots
|
|
6
6
|
Author: Stephen Yau
|
|
@@ -47,7 +47,7 @@ Provides-Extra: matplotlib
|
|
|
47
47
|
Provides-Extra: plotly
|
|
48
48
|
Description-Content-Type: text/markdown
|
|
49
49
|
|
|
50
|
-
#
|
|
50
|
+
# `pfund-plot`: Financial Charts in One Line of Code
|
|
51
51
|
|
|
52
52
|
[](https://discord.gg/vqpS94tpdp)
|
|
53
53
|
[](https://x.com/pfund_ai)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `pfund-plot`: Financial Charts in One Line of Code
|
|
2
2
|
|
|
3
3
|
[](https://discord.gg/vqpS94tpdp)
|
|
4
4
|
[](https://x.com/pfund_ai)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import marimo
|
|
4
4
|
|
|
5
|
-
__generated_with = "0.23.
|
|
5
|
+
__generated_with = "0.23.9"
|
|
6
6
|
app = marimo.App(width="columns")
|
|
7
7
|
|
|
8
8
|
with app.setup:
|
|
@@ -47,7 +47,7 @@ with app.setup:
|
|
|
47
47
|
# FIXME: use pfund-sampledata when its ready
|
|
48
48
|
for product in products:
|
|
49
49
|
for func in [feed.retrieve, feed.download]:
|
|
50
|
-
|
|
50
|
+
result = func(
|
|
51
51
|
product=product,
|
|
52
52
|
resolution=resolution,
|
|
53
53
|
start_date=date,
|
|
@@ -56,6 +56,7 @@ with app.setup:
|
|
|
56
56
|
storage=storage,
|
|
57
57
|
),
|
|
58
58
|
).run()
|
|
59
|
+
df = result.data
|
|
59
60
|
if df is not None:
|
|
60
61
|
break
|
|
61
62
|
|
|
@@ -352,7 +353,7 @@ def _():
|
|
|
352
353
|
@app.cell
|
|
353
354
|
def _():
|
|
354
355
|
def get_df(product, resolution):
|
|
355
|
-
|
|
356
|
+
result = feed.retrieve(
|
|
356
357
|
product=product,
|
|
357
358
|
resolution=resolution,
|
|
358
359
|
start_date=date,
|
|
@@ -361,6 +362,7 @@ def _():
|
|
|
361
362
|
storage=storage,
|
|
362
363
|
),
|
|
363
364
|
).run()
|
|
365
|
+
return result.data
|
|
364
366
|
|
|
365
367
|
reactive_candlestick = plt.ohlc(
|
|
366
368
|
get_df(products[0], resolution),
|
|
@@ -399,12 +401,24 @@ def _():
|
|
|
399
401
|
mo.md(r"""
|
|
400
402
|
# Layout + Streaming
|
|
401
403
|
> put streaming plot inside layout so that we can stop them both at the same time
|
|
404
|
+
|
|
405
|
+
These spawn background threads (streaming feeds / browser / desktop windows) that
|
|
406
|
+
auto-run on load and slow the notebook down. Click a button below to run them on demand.
|
|
402
407
|
""")
|
|
403
408
|
return
|
|
404
409
|
|
|
405
410
|
|
|
406
411
|
@app.cell
|
|
407
|
-
def _(
|
|
412
|
+
def _():
|
|
413
|
+
run_browser_streaming = mo.ui.run_button(label="▶ Run browser layout + streaming")
|
|
414
|
+
run_desktop_streaming = mo.ui.run_button(label="▶ Run desktop plot")
|
|
415
|
+
mo.hstack([run_browser_streaming, run_desktop_streaming])
|
|
416
|
+
return run_browser_streaming, run_desktop_streaming
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
@app.cell
|
|
420
|
+
def _(altair_fig, plotly_fig, run_browser_streaming, tabs):
|
|
421
|
+
mo.stop(not run_browser_streaming.value)
|
|
408
422
|
browser_thread = (
|
|
409
423
|
plt.layout(
|
|
410
424
|
plt.ohlc(prepare_streaming_feed())
|
|
@@ -435,7 +449,8 @@ def _(altair_fig, plotly_fig, tabs):
|
|
|
435
449
|
|
|
436
450
|
|
|
437
451
|
@app.cell
|
|
438
|
-
def _():
|
|
452
|
+
def _(run_desktop_streaming):
|
|
453
|
+
mo.stop(not run_desktop_streaming.value)
|
|
439
454
|
desktop_thread = (
|
|
440
455
|
plt.line(df, x="date", y="close")
|
|
441
456
|
.style(color="orange")
|