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

Data Summary - Mean, Median and Standard Deviation usage #111

Open
MsSQLGirl opened this issue Dec 27, 2021 · 2 comments
Open

Data Summary - Mean, Median and Standard Deviation usage #111

MsSQLGirl opened this issue Dec 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MsSQLGirl
Copy link

Hello,

Data Summary works well in summarizing categorical data, i.e. showing the number of categories and which values are more popular. For example, below it shows the number of State values (i.e. 3 categories) and when you hover you get "TEXAS" as the most popular state.
image

In the above example, I do also have a numerical column, i.e. EventCount. However, it seems that descriptive stats (Mean, median and SD) are not applied to this. Is this expected?

Sample notebook for repro: https://github.com/MsSQLGirl/jubilant-data-wizards/blob/main/Simple%20Demo/DotNetInteractive%20Notebooks/DotNetConfDemo2021.ipynb

Thanks!

@RandomFractals RandomFractals added the bug Something isn't working label Dec 28, 2021
@RandomFractals
Copy link
Owner

RandomFractals commented Dec 28, 2021

I'll need to make sure numeric data is properly typed in that dataset passed to Data Summary view.

You should see those values and a bar chart similar to the lon/lat fields below instead: https://observablehq.com/@randomfractals/data-table-viewer?dataUrl=https://raw.githubusercontent.com/vega/vega-datasets/master/data/us-state-capitals.json

image

@MsSQLGirl I'll see if other sample datasets with typed data behave the same way. Most likely I'll have to infer date and numeric fields in JSON and CSV, or JSON array data when data is loaded in the Data Summary renderer by inspecting the first 10 rows or so and converting numeric string data fields to proper JS Date or number types for that to work.

I'll investigate. thanks for pointing this out.

@RandomFractals
Copy link
Owner

Will try using d3.autoType when parsing CSV data from cell output to create proper number and date type values:

https://github.com/d3/d3-dsv#autoType

RandomFractals added a commit that referenced this issue Jan 28, 2022
to get numbers and dates in the resulting JSON data array for Data Summary view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants