From: Yaroslav Halchenko Date: Wed, 25 May 2011 17:58:02 +0000 (-0400) Subject: Adding plot per virt guest OS + commented out snippets for different explorations X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5635c5fb8f291c53b4c900cdd492b3814ba03477;p=neurodebian.git Adding plot per virt guest OS + commented out snippets for different explorations --- diff --git a/survey/makestats b/survey/makestats index 91faaca..15eb1ab 100755 --- a/survey/makestats +++ b/survey/makestats @@ -175,6 +175,22 @@ class DB(dict): match[k] = v return match + def select_match_exactly(self, key, values): + # return a db with all submissions were a field id has value + # equal to the supplied + match = DB(None) + set_values = set(values) + for k, v in self.items(): + if not key in v: + continue + el = v[key] + if isinstance(el, list): + if set(el) == set_values: + match[k] = v + elif set([el]) == set_values: + match[k] = v + return match + def get_nice_name(self, id): srcs = [DB.os_dict, os_cat_names, DB.sw_dict, sw_categories, resource_categories, time_categories, @@ -404,6 +420,18 @@ def mkpic_rating_by_os_hor_joined(db, env, items, destdir, title, def main(srcdir, destdir): db = DB(srcdir) + + ## db2 = db + # custom selection for people dealing more with hardware + # any electrophys + ## db = db2.select_match('bg_datamod', (('ephys'),)) + # or only selected ones (so no fmri/pet etc) + ## db = db2.select_match_exactly('bg_datamod', (('ephys'), ('behav'),)) + ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'),))) + ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('genetic'),))) + ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('simulation'),))) + ## db.update(db2.select_match_exactly('bg_datamod', (('ephys'), ('meeg'),))) + if not os.path.exists(destdir): os.makedirs(destdir) @@ -429,12 +457,20 @@ def main(srcdir, destdir): for pic in [mkpic_os_per_env, mkpic_software, mkpic_time_per_env]: pic(db, destdir) + + mkpic_rating_by_os_hor_joined(db, 'pers_os', ['pers_r%i' % i for i in range(1, 9)], destdir, "Personal environment", "I prefer this particular scientific software environment because ...") mkpic_rating_by_os_hor_joined(db, 'man_os', ['man_r%i' % i for i in range(1, 6)], destdir, "Managed environment") mkpic_rating_by_os_hor_joined(db, 'virt_host_os', ['virt_r%i' % i for i in range(1, 5)], destdir, "Virtual environment (by host OS)") + mkpic_rating_by_os_hor_joined(db, 'virt_guest_os', ['virt_r%i' % i for i in range(1, 5)], destdir, + "Virtual environment (by guest OS)") + + ## mkpic_rating_by_os_hor_joined(db.select_match('virt_prod', (('vmware'),)), + ## 'virt_host_os', ['virt_r%i' % i for i in range(1, 5)], destdir, + ## "Virtualbox virtual environment (by host OS)") # submission stats: this is RST statsfile = open('%s/stats.txt' % destdir, 'w') diff --git a/survey/results.rst b/survey/results.rst index 34966c9..689adba 100644 --- a/survey/results.rst +++ b/survey/results.rst @@ -27,6 +27,7 @@ frequency of individual rating options (from *definitely disagree* to .. include:: figures/ratings_pers_os.rst .. include:: figures/ratings_man_os.rst .. include:: figures/ratings_virt_host_os.rst +.. include:: figures/ratings_virt_guest_os.rst Software resources