This message was deleted.
# help
s
This message was deleted.
a
Hi Tonya - I’m happy to take a look. Can you share the notebook?
t
Hi, @Allison (Observable Team)! You’re awesome.
I’m trying to generate a new array/table with data about pizza types by percentage. I assume I need to filter pizzaorders based on category or name contains, and then sum all orders by state.
d
If this helps, I use
parseFloat
here to infer the numeric value of the string like
50%
👀 1
t
I then want to create percentages of each, say, category, by state, so they add up to 100%. I was trying to do this with the extended bar charts.
But then I got distracted because they were just so pretty!
I thought a pie chart would be simple to do, but turns out it’s not.
I’m looking now at the recent share from @Matt Brodie on data wrangling translations.
d
Something like this https://observablehq.com/d/0eaf806c44806c17#totalSales Would give a breakdown of % by category
👍 2
🙏 1
a
I also wonder if some of the existing Plot options might work here (rather than additional wrangling)? Here’s an example where all within Plot, the proportions of male, female and NA penguins (by species) are visualized using
proportion-facet
in Plot: https://observablehq.com/@observablehq/plot-group#cell-272
🙌 1
👀 1
🙏 1
t
@Allison (Observable Team) and@David Marr — thanks!! I’ll dig around here and see what I can find! THANK YOU!
🎉 1
One unrelated question: Do you know what the auto sizing in this chart is showing? It’s an unexpected finding, but I don’t know what it means…! https://observablehq.com/d/2b38352ab79ecae3#cell-300
In the specialty category, the size of the dot for NV is larger--and the size of the dot for CA in vegetarian is MUCH larger. What is “auto” showing? I cannot replicate it by choosing any of the other options…
d
r
channel
Size in that component
t
ah-- I just googled it. Thanks!
But why is the specialty dot larger? If the proportion of specialty pizza consumption is the same across states?
Here’s what one site says: “If you don’t specify a quantitative scale’s domain, it is the extent (minimum and maximum) of associated channel values, except for the r (radius) scale where it goes from zero to the maximum.”
I feel like that might be relevant, but I’m not sure.