Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to graph this.


From   Amadou DIALLO <[email protected]>
To   [email protected]
Subject   Re: st: How to graph this.
Date   Mon, 3 Feb 2014 18:47:30 +0100

Dear Nick,
Indeed I've seen some java code for tree maps on google. But
translating this into stata/mata is way beyond my limited skills. I
think this is something for StataCorp or you, if you plan to develop
such tool (:-)).
Nonetheless, this thread has directed me to other important tools and
I want to thank the group for its help.

2014-02-03, Nick Cox <[email protected]>:
> I have no short-cut here. You might need to specify the corner
> coordinates for each tile. I wouldn't rule out running into limits
> within -graph-.
>
> I really wouldn't recommend trying to do this in Stata without an
> algorithm to do the tiling, but conversely source code for tree maps
> should be accessible somewhere and should be translatable into Stata
> or Mata.
>
> Nick
> [email protected]
>
>
> On 3 February 2014 16:43, Amadou DIALLO <[email protected]> wrote:
>> Many thanks for your replies. I'll try both tableau and treemap.
>> Coming back to stata, Nick we wanted a static version, as it seems to
>> me stata' graphs are not dynamic, and this is fine for us as far as
>> the graphs are concerned. You said, I need to assemble calls to plot
>> individual tiles. How do I do that? Thanks in advance.
>>
>> 2014-02-03, Alan Neustadtl <[email protected]>:
>>> Amadou,
>>>
>>> This looks like a treemap, developed by Ben Shneiderman
>>> (http://www.cs.umd.edu/hcil/treemap/).  I don't know if these can
>>> easily be created in Stata, but I think people have had some success
>>> using Microsoft Excel
>>> (http://research.microsoft.com/en-us/projects/msrdatavis/treemap.aspx).
>>>
>>> Best,
>>> Alan
>>>
>>> On Mon, Feb 3, 2014 at 9:48 AM, Michael Barker
>>> <[email protected]>
>>> wrote:
>>>> I've heard of people using Tableau for data visualization, though I
>>>> have not used it personally.
>>>>
>>>> On Mon, Feb 3, 2014 at 9:34 AM, Amadou DIALLO <[email protected]>
>>>> wrote:
>>>>> Indeed, I believe this might be rather difficult to implement. We're
>>>>> working on economic complexity for African products and my boss wants
>>>>> me to reproduce graphs like this
>>>>> (http://atlas.media.mit.edu/explore/tree_map/export/usa/all/show/2010/).
>>>>> So far, I am using stacked graph bars (each one representing the share
>>>>> of total value but with over 200 products, this is not well
>>>>> rendering). I believe Hausmann and Hidalgo and their team might be
>>>>> using a dedicated software to plot such graphs, but we have no clue of
>>>>> which one they are using. If not doable in stata, does any one know
>>>>> which tool is better appropriate? I wish you a good night.
>>>>>
>>>>> 2014-02-03, Nick Cox <[email protected]>:
>>>>>> I agree with Maarten. -spineplot- was written up in Stata Journal
>>>>>> 8(1)
>>>>>> 2008 but it's not for arbitrary tilings with area proportional to
>>>>>> value.
>>>>>>
>>>>>> If you have identifiers for the incomes, and the number is modest, I
>>>>>> find it hard to see advantages in your design over -graph hbar- or
>>>>>> -graph dot-. Otherwise, some kind of quantile, distribution or Lorenz
>>>>>> plot seems indicated.
>>>>>>
>>>>>> Nick
>>>>>> [email protected]
>>>>>>
>>>>>>
>>>>>> On 3 February 2014 12:08, Maarten Buis <[email protected]>
>>>>>> wrote:
>>>>>>> That looks like a mosaic plot. As far as I know, the only version of
>>>>>>> a
>>>>>>> mosaic plot that has been implemented in Stata is Nick Cox's
>>>>>>> -spineplot- (available from SSC), However that is for
>>>>>>> two-dimensional
>>>>>>> problems, i.e. involving two variables, and you seem to have a
>>>>>>> one-dimensional problem, i.e. one variable. I don't think that what
>>>>>>> you were asked to do is a very good idea: look at how your
>>>>>>> information
>>>>>>> is stored in the graph. It is there in terms of the area of
>>>>>>> different
>>>>>>> blocks. Humans are pretty bad at interpretating areas, so your graph
>>>>>>> is not a very efficient way of conveying information.
>>>>>>>
>>>>>>> Hope this helps,
>>>>>>> Maarten
>>>>>>>
>>>>>>> On Mon, Feb 3, 2014 at 10:49 AM, Amadou DIALLO
>>>>>>> <[email protected]>
>>>>>>> wrote:
>>>>>>>> Dear statlisters,
>>>>>>>> I've been asked to produce the following graph, but couldn't find a
>>>>>>>> way to do it.
>>>>>>>> Let's say you have 3 individuals whose income are
>>>>>>>>
>>>>>>>> obs inc
>>>>>>>> 1    75
>>>>>>>> 2    12.5
>>>>>>>> 3    12.5
>>>>>>>>
>>>>>>>> I want to have the following graph: a matrix of total income, where
>>>>>>>> each individual's share will be plotted.
>>>>>>>>
>>>>>>>> ---------------------------------------------
>>>>>>>> |                              |             |
>>>>>>>> |                              |     12.5  |
>>>>>>>> |         75                  |  --------   |
>>>>>>>> |                              | 12.5      |
>>>>>>>> |                              |             |
>>>>>>>> ---------------------------------------------
>>>>>>>>
>>>>>>>> If possible, I want to add labels and plot each box with a
>>>>>>>> different
>>>>>>>> color. Of course, in my sample, I have more observations.
>>>>>>>>
>>>>>>>> Best regards and thanks for usual support.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Amadou B. DIALLO, PhD.
>>>>>>>> Senior Economist, AfDB.
>>>>>>>> [email protected]
>>>>>>>> +21671101789
>>>>>>>> *
>>>>>>>> *   For searches and help try:
>>>>>>>> *   http://www.stata.com/help.cgi?search
>>>>>>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>>>>>>> *   http://www.ats.ucla.edu/stat/stata/
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> ---------------------------------
>>>>>>> Maarten L. Buis
>>>>>>> WZB
>>>>>>> Reichpietschufer 50
>>>>>>> 10785 Berlin
>>>>>>> Germany
>>>>>>>
>>>>>>> http://www.maartenbuis.nl
>>>>>>> ---------------------------------
>>>>>>> *
>>>>>>> *   For searches and help try:
>>>>>>> *   http://www.stata.com/help.cgi?search
>>>>>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>>>>>> *   http://www.ats.ucla.edu/stat/stata/
>>>>>> *
>>>>>> *   For searches and help try:
>>>>>> *   http://www.stata.com/help.cgi?search
>>>>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>>>>> *   http://www.ats.ucla.edu/stat/stata/
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Amadou B. DIALLO, PhD.
>>>>> Senior Economist, AfDB.
>>>>> [email protected]
>>>>> +21671101789
>>>>> *
>>>>> *   For searches and help try:
>>>>> *   http://www.stata.com/help.cgi?search
>>>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>>>> *   http://www.ats.ucla.edu/stat/stata/
>>>> *
>>>> *   For searches and help try:
>>>> *   http://www.stata.com/help.cgi?search
>>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>>> *   http://www.ats.ucla.edu/stat/stata/
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>>> *   http://www.ats.ucla.edu/stat/stata/
>>>
>>
>>
>> --
>> Amadou B. DIALLO, PhD.
>> Senior Economist, AfDB.
>> [email protected]
>> +21671101789
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
[email protected]
+21671101789
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index