d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Bar Plot Help > 4 Nominal And 2 Scale Variables
Add Reply New Topic New Poll
Member
Posts: 28,617
Joined: Aug 24 2005
Gold: 10,230.00
Oct 15 2013 02:50am
Hi

I want to create a special bar plot. I have four nominal variables, let's call them "Examination year", "Hospital", "Machine" and "Diagnosis". I have two scale variables, let's call them "Number of patients" and "Median weight". I want to create one bar plot for each unique hospital/machine combination. The example plot I have drawn is for one of these combinations (hospital one/machine one). On the y-axis I want the median weight, and I want the X-axis to group the different diagnoses for this hospital/machine combination, and the bars seperated for each year. Here is an example for one hospital/machine combination http://imageupload.co.uk/files/qq42oynyt0rklxf007fy.png

I know how to create this manually in Excel. But I have huge amounts of data so that option is not possible... Do you guys know any program or way to automatically create these plots?

Thanks for your help!
Member
Posts: 3,715
Joined: Mar 15 2011
Gold: 4,703.80
Oct 15 2013 06:31am
First thing to do is to draft out what the final product looks like. For example I would have next to the graph in Excel a table 3x3 containing the data to graph. The question is how to fill in these nine values in a least hands-on manner.

There are many ways to do this:

1) Excluding manual processing ( I presume you meant counting the items manually) in Excel, you may use some of the LOOKUP, IF, COUNT features in Excel. I would think this may easily be scalable to accommodate 10,000-20,000 lines.

2) You may export this data to an ASCII file with some form of delimiters like comma and <CR>. Then feed this data to a program to create a set of nine values in the same ASCII format with commas and <CR>. This could be read as is in Excel to fill in the 3x3 table above. This may easily work with millions of lines.

3) Create an SQL database with the data. You may then either feed it to excel or create a program to digest this data as in (2) above. This may be a bit more involving than the (1) and (2).

As for the programming language itself, it depends on what you have access to and what the users' demands are. I would think PERL, C++, PYTHON would be no problem.

It sounds like the approach (1) above may be your best choice.



Go Back To Homework Help Topic List
Add Reply New Topic New Poll