From: Michael Hanke Date: Mon, 16 May 2011 18:16:03 +0000 (-0400) Subject: vmlist.txt, disambiguate the 'other' value X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bfd5c22188b65aa754168d5b4bfefa46562a95f8;p=neurodebian.git vmlist.txt, disambiguate the 'other' value --- diff --git a/survey/Makefile b/survey/Makefile index b532301..a3cc2e2 100644 --- a/survey/Makefile +++ b/survey/Makefile @@ -39,9 +39,13 @@ swlist.txt: survey.rst grep '"sw.*" value' survey.rst | sed -e 's/.*name="sw.*" value="//' -e 's," />,: ",' \ -e 's,$$,",' -e 's/ "$$/ "Other"/' > $@ +vmlist.txt: survey.rst + grep virt_prod survey.rst | sed -e 's/.*,: ",' -e 's,
.*$$,,' -e 's/ "$$/ "Other VM"/' > $@ + datamodlist.txt: survey.rst grep '"bg_datamod"' survey.rst | sed -e 's/.*name="bg_datamod" value="//' \ - -e 's," />,: ",' -e 's,
$$,",' -e 's/ "$$/ "Other"/' > $@ + -e 's," />,: ",' -e 's,
$$,,",' -e 's/ "$$/ "Other"/' > $@ # Generic rule to extract from drop-down selections %-dd-list.txt: survey.rst diff --git a/survey/makestats b/survey/makestats index d5642d1..b4b2328 100755 --- a/survey/makestats +++ b/survey/makestats @@ -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)') diff --git a/survey/survey.rst b/survey/survey.rst index fe1dde6..0a5f20a 100644 --- a/survey/survey.rst +++ b/survey/survey.rst @@ -122,7 +122,7 @@ What type of data are you working with? Please check all items that apply. PET/SPECT
Electrophysiology
Microspectroscopy
- + @@ -512,7 +512,7 @@ Which products for virtualization are you using? Virtual PC
Xen
KVM
- + @@ -713,7 +713,7 @@ Python bundles: `Enthought Python ` .. raw:: html - + @@ -930,7 +930,7 @@ Other .. raw:: html -
+ (comma-separated list)