You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/07 17:36:53 UTC

[GitHub] [superset] serenajiang opened a new issue #17020: Time series charts show all data missing if one group by category is missing

serenajiang opened a new issue #17020:
URL: https://github.com/apache/superset/issues/17020


   When you create a time series viz with a groupby and contribution `Total`, if at least one of the categories is missing a value for the date, no data points for that date are shown.
   
   This is sort of reasonable - technically, the data could be missing for the missing category, so it is not clear how to calculate contribution. However, in most cases, the missing data point corresponds to the value 0, and removing all the other data points is very confusing. In older charts (ex. line chart), contribution assumes 0 if data is missing, so we should provide some way to interpolate 0 for feature parity.
   
   I think there are two ways 
   * Assume 0 whenever data is missing (similar to legacy line chart)
   * Have users use `resample` to fill missing values with 0. This is not possible yet because resample doesn't work if there's a group by - the error message is: `cannot reindex from a duplicate axis` and occurs [here](https://github.com/apache/superset/blob/fd8461406d62e818c4bc88075ac25ddf44ba9caf/superset/utils/pandas_postprocessing.py#L981)
   
   #### How to reproduce the bug
   
   1. Go to SQL Lab
   2. Run query:
   ```sql
   SELECT DATE('2021-09-01') AS ds, 'a' AS x
   UNION ALL SELECT DATE('2021-09-02') AS ds, 'a' AS x
   UNION ALL SELECT DATE('2021-09-01') AS ds, 'c' AS x
   ```
   3. -> explore chart
   4. Use time series bar chart v2 viz
   5. Group by `x`, metric `count`, contribution `total`
   6. Note the missing data point for (`2021-09-02`, `a`)
   
   ### Expected results
   
   Two bars should be shown for 09-01, one bar should be shown for 09-02
   
   ### Actual results
   
   No bars are shown for 09-02, even though there is a data point
   
   ![image](https://user-images.githubusercontent.com/14146019/136434143-10bdd24f-82d7-405b-ae5c-25649928c7a0.png)
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: chrome
   - superset version: up to date with master as of 2021-10-01
   - python version: 3.8
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [X] I have reproduced the issue with at least the latest released version of superset.
   - [X] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   This is somewhat related to this issue: https://github.com/apache/superset/issues/15036
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] serenajiang commented on issue #17020: Time series charts show all data missing if one group by category is missing

Posted by GitBox <gi...@apache.org>.
serenajiang commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-938010959


   @zhaoyongjie Any suggestions on how to proceed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] serenajiang commented on issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
serenajiang commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-992973469


   @zhaoyongjie Any updates on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] serenajiang commented on issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
serenajiang commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-938164171


   fyi @junlincc this was one of the asks from our users when giving echarts feedback


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] yousoph closed issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
yousoph closed issue #17020:
URL: https://github.com/apache/superset/issues/17020


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-983274092


   > @zhaoyongjie did you get a chance to work on this?
   
   Got it. I will ship it after monorepo project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] serenajiang commented on issue #17020: Time series charts show all data missing if one group by category is missing

Posted by GitBox <gi...@apache.org>.
serenajiang commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-938010959






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] etr2460 commented on issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
etr2460 commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-983024013


   @zhaoyongjie did you get a chance to work on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #17020: New time series charts show all data missing if one part of "contribution" is missing

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #17020:
URL: https://github.com/apache/superset/issues/17020#issuecomment-938290226


   > @zhaoyongjie Any suggestions on how to proceed?
   
   I will follow up resample operator to support groupby. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org