-
Notifications
You must be signed in to change notification settings - Fork 76
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
adding bar
and pie
plot to %sqlplot
#417
Comments
What about pie charts? 👍 |
I've never been a fan of pie charts 😂, humans aren't good at judging areas. I like normalized bar charts better - they can help to visualize the same data. But I think @jorisroovers mention they use it. what do you think? |
Yes we use pie plots extensively. We even use the fancier donut/sunburst plots! I think different audiences like different types of charts. In a BI setting (target audience: managers) the visual aspect is key in my experience, i.e. making it simple yet pretty matters (you're telling a story or showing a quick snapshot of current state). In a Data Science context, I think density of information is much more important, and there might even be some aversion to "management charts". Long story short, my 2ct would be that JupySQL should support a wide range of chart types and let the user decide. Plotly and bokeh might provide good inspiration here: https://docs.bokeh.org/en/0.8.2/docs/user_guide/charts.html Hope this helps! |
ok so let's add @mehtamohit013: please write acceptance criteria. |
AC Criteria:
|
First ensure that the tests pass with duckdb, once that's done, we can evaluate which other DBs we'll support.
add the examples to the existing section in the docs btw, the commands should be in |
%sqlcmd plot
%sqlplot
%sqlplot
bar
and pie
plot to %sqlplot
@edublancas |
right. integrate it with
Yes, I'd say first get DuckDB working and once that's ready we can add a test to our integration tests to find out which ones are passing and which ones are failing, then we define what we do |
I was thinking more generic, letting the user pass the two columns Also, is there a need for a stacked bar graph (I don't know if that's a thing or not)? |
we want JupySQL to be a higher-level API than matplotlib. If you think from the perspective of a data analyst using JupySQL, they want to explore the data quickly to understand it, and computing the height is an extra step that we want to avoid. Users should only point us to a column and we should group and plot the bar/pie chart |
let's leave out stacked or multiple-column charts for now |
@edublancas |
same as bar chart. the command should only take a column as an argument, and we should compute the percentages, then pass this to the plotting function |
We should add
%sqlplot bar
to create bar plots.The SQL should be pretty simple:
then, we take the col, count pairs and use them to create the plot.
cc @jorisroovers - tagging you so you're in the loop!
The text was updated successfully, but these errors were encountered: