Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating a bubble chart with information on six dimensions

    I have to plot a bubble chart for representing the contribution of my sector (in terms of 7 dimensions) viz contribution to India's GDP, employment, Industrial growth, trade, FDI, and productivity. The datasheet is attached here. Two of these could be plotted on the x-axis and y-axis respectively. One may be represented by the size of the bubble, one by the widhth of the outline of the bubble, and one may be by some colour coding. I wanted to write a stata code for that. It would be really helpful if someone could help me with the coding. Thank you so much
    Attached Files

  • #2
    Please do read our FAQ Advice which explains why .dta attachments are deprecated here, surprising though that may seem.
    https://www.statalist.org/forums/help#stata

    There is no reason here not to use dataex as directly suggested there.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str3 category byte e_share float(em_s g_sh) double vaxx float(st_share f_dh)
    "a1"  50  3.807546  10.81776 93.47589706 .154  1
    "a2"  20  5.953617  19.72111 91.05067009 .583  2
    "a3"  10  13.84562  8.342796   83.824722 .376  3
    "a4"   8         8  1.784556  96.3318791   .6  4
    "a5"   3        40        25 94.30264938 .313  5
    "a6"   2 4.0844584 .25008574           .   .2  6
    "a7"   2  2.803738  9.468395 94.23717116 .427  7
    "a8"   2  .3807546 2.1839714  82.8629677 .271  8
    "a9"   1        .9 1.4752562 94.23717116 .481  9
    "a10"  2  .3115265  .7215882 85.24697759 .259 10
    "a11"  5 10.557286   8.27778 95.13451631   .3 11
    "a12"  0         5  11.10397           .   .4 12
    "a13"  0   5.12288  2.666191 90.93397569   .5 13
    "a14"  0  4.257529         1 93.44467641   .3 14
    "a15"  0  .4499827  .4054584   87.343441 .493 15
    end
    Sorry, but I have no interest in trying to code such a bizarre design, or of making suggestions along the way. Just working backwards, the reader is expected to consult a legend that explains which of 15 colours encodes distinct values of one variable, chosen arbitrarily? Such a legend would already take up about half the available space.

    Here f_dh looks like an identifier variable.

    Here we have, it seems, variables on quite different scales. To have a go in a more positive spirit I tried multidot from SSC.

    https://www.statalist.org/forums/for...ailable-on-ssc

    Code:
     multidot e_share em_s g_sh  vaxx st_share, over(category) by(row(1) imargin(vsmall)) ms(O) xla(#5)
    
    multidot e_share em_s g_sh  vaxx st_share, over(category) by(row(1) imargin(vsmall)) ms(O) xla(#5) recast(connected)
    Click image for larger version

Name:	multidot.png
Views:	1
Size:	83.5 KB
ID:	1770804

    Click image for larger version

Name:	multidot2.png
Views:	1
Size:	112.9 KB
ID:	1770805


    That naturally that still needs a lot of work, including intelligible category text and variable names.

    Someone else may want to address your question directly.


    Comment


    • #3
      An elementary point -- which as in logic and physics means fundamental as much as introductory -- in graphics is that

      whatever you encode as a graph element has to be decoded, easily and effectively, by your readers.

      Otherwise you just have data art.

      It is perhaps interesting that the jargon of encoding and decoding jumped from cryptography through to information or communication theory when Claude Shannon realised that transmitting information so that almost no one can read it and transmitting information so that anyone can read it are just limiting cases of the same challenge.

      Comment


      • #4
        Yes, thank you so much

        Comment

        Working...
        X