-
Notifications
You must be signed in to change notification settings - Fork 1
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
CrunchCube.N #4
Comments
Looks like def N(self, weighted=False):
'''Return the overall N of the cube.
'''
if weighted:
# return weighted N (derive from cube._cube['result']['measures']['count']['data'] ?)
else:
return self._cube['result']['n'] |
What do you expect I would expect that what you actually want is @jamesrkg ☝️ |
@slobodan-ilic i'm looking at a multiXmulti cube which in Crunch looks like this: But I'm having trouble getting the
*Updated the As these questions relate to the original ticket I wanted to ask here but we can create separate tickets if this also looks suspect to you @slobodan-ilic . |
Can you paste the link to the actual cube in the app? Also, which version of cube are you using (is it pinned)? I'll look into this as soon as I get the link, so that I can grab the cube... @jamesrkg ☝️ |
Here is the cube I'm looking at: I'm working from the current master branch. |
I'm on it, will report here shortly. |
Btw, the reason behind the margin being a 2D np array is that the cube type is MR x MR. This translates to the actual dimensions (under the hood) being: MR(items) x MR(selected) x MR(items) x MR(selected). So it's actually a 4D cube (that comes from zz9 DB). So when you do a margin across a dimension (in the direction of the axis), you're actually summing across the selected dimension (the items is never summed across, because the items are independent). When this happens for all the possible dimensions, it collapses all the selections, but the MR items always remain. Now, the thing that we show as a margin is only one row (or one column) of this. The right name for this would be the |
@slobodan-ilic that's exactly what I'm currently doing with the margin I get back from these kinds of cubes. 👍 It's just the total margin, in this case |
Hmm... Can't figure it out now. Will give it a shot first thing tomorrow... |
Ok, so you can get it like this:
I'm not sure what this number represents though, because it's adding across subvariables (if I'm not mistaken). That's why we don't have it in @jamesrkg ☝️ P.S. |
I had assumed it would be the number of people who had any
My guess is that where both Regardless, |
I think we're awaiting confirmation of what, from Crunch's POV, the cube.N involving a |
I can't see this anywhere yet. It would be handy to have access to the overall
N
of the cube. Unsure if there are any edge cases that would make it more complicated than:The text was updated successfully, but these errors were encountered: