Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat/candlesticks#289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
jonasvdd wants to merge12 commits intomain
base:main
Choose a base branch
Loading
fromfeat/candlesticks
Draft

Feat/candlesticks#289

jonasvdd wants to merge12 commits intomainfromfeat/candlesticks

Conversation

jonasvdd
Copy link
Member

@jonasvddjonasvdd commentedJan 13, 2024
edited
Loading

related:#288,#98

TODO:

  • do we need to lock tsdownsample version (as we now have a hard lock-in on tsdownsample's m4 implementation)?
  • maybe allow the users to configure the candlestick position? (middle of bucket, begin (as it is now), or end)
  • write docs (and focus on limitations)
  • create examples
  • write tests (few datapoints, large zoom-in); how does it behave with different aggregators?

Minimal example:

importpandasaspd;importnumpyasnpimportplotly.graph_objectsasgofromplotly_resamplerimportFigureResamplerfromplotly_resampler.aggregationimportM4# 1. Create dummy datax=np.arange(2_000_000)x_time=pd.date_range("2020-01-01",periods=len(x),freq="1min")noisy_sin= (3+np.sin(x/ (len(x)/55))+np.random.randn(len(x))/10)*x/1_000# 2. Create a figurefig=FigureResampler(default_n_shown_samples=1000,verbose=False)fig.add_trace(go.Scattergl(name="Original",mode="lines",visible="legendonly"),hf_x=x_time,hf_y=noisy_sin,)fig.add_trace(go.Candlestick(name="OHLC"),hf_x=x_time,hf_y=noisy_sin,downsampler=M4(parallel=True),max_n_samples=400,)fig.update_layout(title="OHLC Downsampling",showlegend=True)fig.update_xaxes(rangeslider_visible=False)fig

Peek 2024-01-13 19-58

@jonasvddjonasvdd requested a review fromjvddJanuary 13, 2024 18:59
@codecov-commenter
Copy link

codecov-commenter commentedJan 13, 2024
edited
Loading

Codecov Report

Attention:33 lines in your changes are missing coverage. Please review.

Comparison is base(46e629f) 96.42% compared to head(5cdb8f4) 93.75%.
Report is 2 commits behind head on main.

FilesPatch %Lines
...ler/figure_resampler/figure_resampler_interface.py21.05%30 Missing⚠️
plotly_resampler/aggregation/aggregators.py50.00%3 Missing⚠️

❗ Your organization needs to install theCodecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@##             main     #289      +/-   ##==========================================- Coverage   96.42%   93.75%   -2.67%==========================================  Files          14       14                Lines        1146     1185      +39     ==========================================+ Hits         1105     1111       +6- Misses         41       74      +33

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

jonasvddand others added6 commitsJanuary 14, 2024 19:32
* ✨ fix for#275* 🧹 review code* ✨ new example* 🔍 reviewing examples* 🖍️ docs-fix for#275* 🔍 review---------Co-authored-by: Jeroen Van Der Donckt <boebievdd@gmail.com>
@jonasvdd
Copy link
MemberAuthor

@jvdd,
I suppose we should rebase this branch on main? (so we can fix theNanM4 issue in this PR as well?

@jonasvddjonasvdd added enhancementNew feature or request new featureA new feature (request) labelsMar 12, 2024
@jonasvddjonasvdd self-assigned thisMar 12, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jvddjvddAwaiting requested review from jvdd

Assignees

@jonasvddjonasvdd

Labels
enhancementNew feature or requestnew featureA new feature (request)
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jonasvdd@codecov-commenter@jvdd

[8]ページ先頭

©2009-2025 Movatter.jp