Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates on the rolling correlation #50

Closed
drlima opened this issue Dec 30, 2019 · 4 comments
Closed

Updates on the rolling correlation #50

drlima opened this issue Dec 30, 2019 · 4 comments

Comments

@drlima
Copy link

drlima commented Dec 30, 2019

@mindlessbrain v1.6.5 is available which includes the rolling correlation functionality. Will keep you posted on the other features I mentioned earlier.

Originally posted by @aschonfeld in #45 (comment)

@drlima
Copy link
Author

drlima commented Dec 30, 2019

Hi, @aschonfeld.

As mentioned earlier, I am testing the rolling correlation functionality from the release v1.6.5, and I have some suggestions. This is all linked to previous issues #43 and #45.

Scatter Plot - improvements

  1. The scatter is showing the full dataset. It should display only the data on the selected window, e.g.:

    • date: '2019-12-01'
    • window: 4
    • range: ['2019-11-28' : '2019-12-01']

    This is similar to pandas' index.iloc[:-window] but you'd also have to apply a logic for querying the specified date.

  2. The tooltip on the scatter should show the date, not the index number
    image

  3. The scatter plot title should also include the date range. This will be relevant once topic 1 is implemented.

Line Plot - bugs

  1. I believe you are not only expecting a datetime like column but also a column named as 'date'.
    image

  2. It looks like it can't handle multi index
    image

The same errors happens for str multi indexes
image

image

Code

import pandas as pd
import numpy as np
import dtale

ii = pd.date_range(start='2018-01-01', end='2019-12-01', freq='D')
ii = pd.Index(ii, name='date') 

n = ii.shape[0]
c = 5
data = np.random.random((n, c))

df = pd.DataFrame(data, index=ii)

d = dtale.show(df)

# change columns names
c = [(c, c) for c in df.columns]
df.columns = c
dtale.show(df)

# change columns with strings
c = [(str(c), str(c)) for c in range(5)]
df.columns = c
dtale.show(df)

# properly creating multi index
c = pd.MultiIndex.from_tuples(c)
df.columns = c
dtale.show(df)

@aschonfeld
Copy link
Collaborator

@mindlessbrain just finished work on a new version which includes stuff in the chart builder like:

  • support for multi-column selection on the y-axis
  • using rolling aggregations
  • scatter charts

I will start working on these issues next, will keep you posted

@aschonfeld
Copy link
Collaborator

@mindlessbrain I have fixes coded for the line chart failures you were seeing. Good catch on your part! I'll work on re-working the scatter chart for the rolling correlations tomorrow morning.

aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
aschonfeld pushed a commit that referenced this issue Jan 3, 2020
@aschonfeld
Copy link
Collaborator

Fixed in v1.6.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants