]> git.donarmstrong.com Git - neurodebian.git/commitdiff
vmlist.txt, disambiguate the 'other' value
authorMichael Hanke <michael.hanke@gmail.com>
Mon, 16 May 2011 18:16:03 +0000 (14:16 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Mon, 16 May 2011 18:16:03 +0000 (14:16 -0400)
survey/Makefile
survey/makestats
survey/survey.rst

index b532301d9c7d3e82732b5fdc19bc1eaaa22e7100..a3cc2e27ed44cd8a9bf3d9cff0cc311a20fc1161 100644 (file)
@@ -39,9 +39,13 @@ swlist.txt: survey.rst
        grep '"sw.*" value' survey.rst | sed -e 's/.*name="sw.*" value="//' -e 's," />,: ",' \
                -e 's,</td>$$,",' -e 's/ "$$/ "Other"/' > $@
 
+vmlist.txt: survey.rst
+       grep virt_prod survey.rst | sed -e 's/.*<input.*value="//' \
+               -e 's," />,: ",' -e 's,<br />.*$$,,' -e 's/ "$$/ "Other VM"/' > $@
+
 datamodlist.txt: survey.rst
        grep '"bg_datamod"' survey.rst | sed -e 's/.*name="bg_datamod" value="//' \
-               -e 's," />,: ",' -e 's,<br />$$,",' -e 's/ "$$/ "Other"/' > $@
+               -e 's," />,: ",' -e 's,<br />$$,,",' -e 's/ "$$/ "Other"/' > $@
 
 # Generic rule to extract from drop-down selections
 %-dd-list.txt: survey.rst
index d5642d1a7e8a254bd41cf3267b54cea9f68e0a21..b4b2328cdc2d61f601d1c9b6f1c54293e1d0d0d5 100755 (executable)
@@ -110,6 +110,7 @@ class DB(dict):
     position_dict = load_list2dict('position-dd-list.txt')
     employer_dict = load_list2dict('employer-dd-list.txt')
     ratings_dict = load_list2dict('ratingslist.txt')
+    vm_dict = load_list2dict('vmlist.txt')
 
     def __init__(self, srcdir):
         # eats the whole directory
@@ -178,7 +179,8 @@ class DB(dict):
     def get_nice_name(self, id):
         srcs = [DB.os_dict, os_cat_names, DB.sw_dict, sw_categories,
                 resource_categories, time_categories,
-                DB.datamod_dict, DB.position_dict, DB.employer_dict]
+                DB.datamod_dict, DB.position_dict, DB.employer_dict,
+                DB.vm_dict]
         for src in srcs:
             if id in src:
                 return src[id]
@@ -269,10 +271,10 @@ def mkpic_submissions_per_key(db, destdir, key, title, sortby='name',
         else:
             raise ValueError("Specify either name or count for sortby")
         x = np.arange(len(stats))
-        pl.barh(x + (1./8), [s[1] for s in stats], height=0.75, color = '#008200')
+        pl.barh(x + (1./8), [s[1] for s in stats[::-1]], height=0.75, color = '#008200')
         pl.yticks(x + 0.5,  ['' for s in stats])
         text_offset = pl.gca().get_xlim()[1] / 30.
-        for i, s in enumerate(stats):
+        for i, s in enumerate(stats[::-1]):
             pl.text(text_offset, i+.5, db.get_nice_name(s[0]),
                     horizontalalignment='left',
                     verticalalignment='center',
@@ -330,6 +332,10 @@ def main(srcdir, destdir):
     if not os.path.exists(destdir):
         os.makedirs(destdir)
 
+    mkpic_submissions_per_key(
+        db, destdir, 'virt_prod', sortby='name',
+        title='Virtualization product popularity\n(multiple choices per submission possible)')
+
     mkpic_submissions_per_key(
         db, destdir, 'bg_datamod', sortby='count',
         title='Submissions per data modality\n(multiple choices per submission possible)')
index fe1dde663f9487a91fa6aab6d6463ddce45f0f3b..0a5f20ad74418ad44c1b5e715398f07d04ec665d 100644 (file)
@@ -122,7 +122,7 @@ What type of data are you working with? Please check all items that apply.
    <input type="checkbox" name="bg_datamod" value="pet" />PET/SPECT<br />
    <input type="checkbox" name="bg_datamod" value="ephys" />Electrophysiology<br />
    <input type="checkbox" name="bg_datamod" value="spectro" />Microspectroscopy<br />
-   <input type="checkbox" name="bg_datamod" value="other" />
+   <input type="checkbox" name="bg_datamod" value="otherdm" />
    <input name="bg_datamod_other" type="text" size="20" maxlength="40">
    </td></tr></table>
    </td></tr><tr class="oddrow"><td>
@@ -512,7 +512,7 @@ Which products for virtualization are you using?
    <input type="checkbox" name="virt_prod" value="virtualpc" />Virtual PC<br />
    <input type="checkbox" name="virt_prod" value="xen" />Xen<br />
    <input type="checkbox" name="virt_prod" value="kvm" />KVM<br />
-   <input type="checkbox" name="virt_prod" value="other" />
+   <input type="checkbox" name="virt_prod" value="othervm" />
    <input name="virt_other" type="text" size="20" maxlength="40">
    </td></tr></table>
    </td></tr><tr class="oddrow"><td>
@@ -713,7 +713,7 @@ Python bundles: `Enthought Python <http://www.enthought.com/products/index.php>`
 
 .. raw:: html
 
-   </td></tr><tr class="oddrow"><td class="response"><input type="checkbox" name="software_resource" value="other" /></td><td>
+   </td></tr><tr class="oddrow"><td class="response"><input type="checkbox" name="software_resource" value="otherres" /></td><td>
    <input name="software_resource_other" type="text" size="40" maxlength="200">
    </td></tr></table>
 
@@ -930,7 +930,7 @@ Other
 .. raw:: html
 
    <table class="questionaire"><tr>
-   <td class="response"><input type="checkbox" name="sw_other" value="other" />
+   <td class="response"><input type="checkbox" name="sw_other" value="othersw" />
    <input name="sw_other_name" type="text" size="40" maxlength="200"> <span style="font-size:70%">(comma-separated list)</span></td>
    </tr></table>