Who needs dimensions anyway?











up vote
1
down vote

favorite












This is half a question, as I have this 'sort of' thought through. Still, I'd like to have some confirmation. Here it goes:



From what I've seen so far, a group holds all the information necessary for a plot. Let's imagine a bar chart for the 'canonical' dc data array. We define a dimension on type and then a group. The group data will give us all the necessary coordinates for drawing the bars.



Why do we need dimensions, then? Is this for plotting, or just for keeping track of the filters and dynamically updating the chart?










share|improve this question




























    up vote
    1
    down vote

    favorite












    This is half a question, as I have this 'sort of' thought through. Still, I'd like to have some confirmation. Here it goes:



    From what I've seen so far, a group holds all the information necessary for a plot. Let's imagine a bar chart for the 'canonical' dc data array. We define a dimension on type and then a group. The group data will give us all the necessary coordinates for drawing the bars.



    Why do we need dimensions, then? Is this for plotting, or just for keeping track of the filters and dynamically updating the chart?










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      This is half a question, as I have this 'sort of' thought through. Still, I'd like to have some confirmation. Here it goes:



      From what I've seen so far, a group holds all the information necessary for a plot. Let's imagine a bar chart for the 'canonical' dc data array. We define a dimension on type and then a group. The group data will give us all the necessary coordinates for drawing the bars.



      Why do we need dimensions, then? Is this for plotting, or just for keeping track of the filters and dynamically updating the chart?










      share|improve this question















      This is half a question, as I have this 'sort of' thought through. Still, I'd like to have some confirmation. Here it goes:



      From what I've seen so far, a group holds all the information necessary for a plot. Let's imagine a bar chart for the 'canonical' dc data array. We define a dimension on type and then a group. The group data will give us all the necessary coordinates for drawing the bars.



      Why do we need dimensions, then? Is this for plotting, or just for keeping track of the filters and dynamically updating the chart?







      dc.js crossfilter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 9 at 15:41









      Gordon

      12.7k32158




      12.7k32158










      asked Nov 9 at 15:09









      Ricardo

      112




      112
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          This is only half an answer. :)



          Yes, there is some redundancy between dimensions and groups for sure.




          1. The group key function needs to be a refinement of (and must be consistent with) the dimension key function.
            There's only one place where I've found it's helpful to refine the group key function more than the dimension key function: when the dimension is time and the group is some quantization of time like months or hours. Otherwise there is no need to specify the group key function at all. I haven't seen too many people create sets of time-series charts where different charts are quantized at different levels, so I am not sure if that's the motivation.


          2. Filtering happens through the dimension, not the group, and a group does not observe its dimension's filters - so you might want them to be different objects so you that you can optionally have the chart respond to its own filters. That's pretty rare, though - usually a chart will read data from a group on the dimension it filters.



          Any other reasons? Please add to this list!






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228321%2fwho-needs-dimensions-anyway%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            This is only half an answer. :)



            Yes, there is some redundancy between dimensions and groups for sure.




            1. The group key function needs to be a refinement of (and must be consistent with) the dimension key function.
              There's only one place where I've found it's helpful to refine the group key function more than the dimension key function: when the dimension is time and the group is some quantization of time like months or hours. Otherwise there is no need to specify the group key function at all. I haven't seen too many people create sets of time-series charts where different charts are quantized at different levels, so I am not sure if that's the motivation.


            2. Filtering happens through the dimension, not the group, and a group does not observe its dimension's filters - so you might want them to be different objects so you that you can optionally have the chart respond to its own filters. That's pretty rare, though - usually a chart will read data from a group on the dimension it filters.



            Any other reasons? Please add to this list!






            share|improve this answer



























              up vote
              0
              down vote













              This is only half an answer. :)



              Yes, there is some redundancy between dimensions and groups for sure.




              1. The group key function needs to be a refinement of (and must be consistent with) the dimension key function.
                There's only one place where I've found it's helpful to refine the group key function more than the dimension key function: when the dimension is time and the group is some quantization of time like months or hours. Otherwise there is no need to specify the group key function at all. I haven't seen too many people create sets of time-series charts where different charts are quantized at different levels, so I am not sure if that's the motivation.


              2. Filtering happens through the dimension, not the group, and a group does not observe its dimension's filters - so you might want them to be different objects so you that you can optionally have the chart respond to its own filters. That's pretty rare, though - usually a chart will read data from a group on the dimension it filters.



              Any other reasons? Please add to this list!






              share|improve this answer

























                up vote
                0
                down vote










                up vote
                0
                down vote









                This is only half an answer. :)



                Yes, there is some redundancy between dimensions and groups for sure.




                1. The group key function needs to be a refinement of (and must be consistent with) the dimension key function.
                  There's only one place where I've found it's helpful to refine the group key function more than the dimension key function: when the dimension is time and the group is some quantization of time like months or hours. Otherwise there is no need to specify the group key function at all. I haven't seen too many people create sets of time-series charts where different charts are quantized at different levels, so I am not sure if that's the motivation.


                2. Filtering happens through the dimension, not the group, and a group does not observe its dimension's filters - so you might want them to be different objects so you that you can optionally have the chart respond to its own filters. That's pretty rare, though - usually a chart will read data from a group on the dimension it filters.



                Any other reasons? Please add to this list!






                share|improve this answer














                This is only half an answer. :)



                Yes, there is some redundancy between dimensions and groups for sure.




                1. The group key function needs to be a refinement of (and must be consistent with) the dimension key function.
                  There's only one place where I've found it's helpful to refine the group key function more than the dimension key function: when the dimension is time and the group is some quantization of time like months or hours. Otherwise there is no need to specify the group key function at all. I haven't seen too many people create sets of time-series charts where different charts are quantized at different levels, so I am not sure if that's the motivation.


                2. Filtering happens through the dimension, not the group, and a group does not observe its dimension's filters - so you might want them to be different objects so you that you can optionally have the chart respond to its own filters. That's pretty rare, though - usually a chart will read data from a group on the dimension it filters.



                Any other reasons? Please add to this list!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 12 at 12:03


























                community wiki





                2 revs
                Gordon































                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228321%2fwho-needs-dimensions-anyway%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Landwehr

                    Reims

                    Schenkenzell