English localization

Static list of correct answers in English.


In [ ]:
%run "../Functions/0.0 RedMetrics data preparation.ipynb"

In [ ]:
# string constants

csvEncoding = 'utf-8'
gformPath = "../../data/Google forms/"
genericFormName = '-gform'

# dataFilesNamesStem, versionSuffix, csvSuffix are created in 0.0 RedMetrics data preparation.ipynb
mergedPath                     = gformPath + dataFilesNamesStem + genericFormName     + version1522Suffix + "merged" + csvSuffix

enLanguageID = 'en'
enSuffix = '-' + enLanguageID
enPath                         = gformPath + dataFilesNamesStem + genericFormName     + version1522Suffix + enSuffix + csvSuffix

frLanguageID = 'fr'
frSuffix = '-' + frLanguageID
frPath                         = gformPath + dataFilesNamesStem + genericFormName     + version1522Suffix + frSuffix + csvSuffix
frTranslationsPath             = gformPath                      + 'translations'      + version1522Suffix + frSuffix + csvSuffix
frCorrectScientificAnswersPath = gformPath                      + 'CorrectScientific' + version1522Suffix + frSuffix + csvSuffix
frDemographicAnswersPath       = gformPath                      + 'Demographic-'      + version1522Suffix + frSuffix + csvSuffix



# tz='Europe/Berlin' time
dateparseGForm = lambda x: pd.Timestamp(x.split(' GMT')[0], tz='Europe/Berlin').tz_convert('utc')    
# when did the user answer the questionnaire? After playing, before playing, undefined?
answerTemporalities = ['pretest', 'posttest', 'undefined'];

In [ ]:
processGForm = not ('gform' in globals())
if processGForm:
    try:
        gform = pd.read_csv(\
                            mergedPath,\
                            dtype=str,\
                            parse_dates=['Timestamp'],\
                            date_parser=dateparseGForm,\
                             )
        print("gform read_csv success")
        # a redundant column is created during the process
        gform = gform.iloc[:,1:]
        processGFormEN = False
    except FileNotFoundError:
        print("gform read_csv failed")
        processGFormEN = True

In [ ]:
if processGFormEN:    
    try:
        gformEN1522 = pd.read_csv(\
                            enPath,\
                            dtype=str,\
                            parse_dates=['Timestamp'],\
                            date_parser=dateparseGForm,\
                             )
        print("gformEN read_csv success")
    except FileNotFoundError:
        print("gformEN read_csv failed")

Additional columns

Language column


In [ ]:
if processGFormEN:
    gformEN1522['Language'] = pd.Series(enLanguageID, index=gformEN1522.index)

Preparation for temporalities


In [ ]:
if processGFormEN:
    gformEN1522['Temporality'] = pd.Series(answerTemporalities[2], index=gformEN1522.index)

Displays all unique answers to every question

printIndex = -12 avoidIndexes = [-12, -9, 28, 29, 30, 31] for question in gform.columns: if (printIndex not in avoidIndexes): print("Q" + str(printIndex) + " " + question \

         + "\n" + str(gform[question].unique()) + "\n\n")
printIndex = printIndex + 1

Renaming

Labels are made more explicit. Their naming was done automatically by Google forms.


In [ ]:
# Timestamp
#'Timestamp', #01
QTimestamp = 'Timestamp'

# Basic engagement questions
#'Are you interested in learning more about...Biology', #02
QCuriosityBiology = 'Want to learn more about Biology'
#'Are you interested in learning more about...Synthetic biology', #03
QCuriositySyntheticBiology = 'Want to learn more about Synthetic biology'
#'Are you interested in learning more about...Video games', #04
QCuriosityVideoGames = 'Want to learn more about Video games'
#'Are you interested in learning more about...Engineering', #05
QCuriosityEngineering = 'Want to learn more about Engineering'

# Experience with Hero.Coli
#'Have you ever played Hero.Coli?', #06
QPlayed = 'Played Hero.Coli'

# Basic demographics questions
#'How old are you?', #07
QAge = 'Age'
#'What is your gender?', #08
QGender = 'Gender'
#'Are you interested in video games?', #09
QInterestVideoGames = 'Interested in video games'
#'Are you interested in biology?', #10
QInterestBiology = 'Interested in biology'
#'How long have you studied biology?', #11
QStudiedBiology = 'Studied biology'
#'Do you play video games?', #12
QPlayVideoGames = 'Play video games'

# Basic biology questions
#'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
QHeardSynBioOrBioBricks = 'Heard about Synthetic biology or BioBricks'

# Basic engagement questions
#'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
QVolunteer = 'Volunteered to answer more questions'
#'Did you enjoy playing the game?', #15
QEnjoyed = 'Enjoyed playing'

# General mechanics of the game
#'In order to modify the abilities of the bacterium, you have to...', #16
QGenotypePhenotype = 'Genotype and phenotype'
#'What are BioBricks and devices?', #17
QBioBricksDevicesComposition = 'BioBricks and devices composition'
#'Find the antibiotic:', #18
QAmpicillin = 'Ampicillin antibiotic'

# BioBrick names and functions
#'Plasmid is...', #19
QBBNamePlasmid = 'Name: Plasmid'
#'Represents the end of a device... TER', #20
QBBFunctionTER = 'Function: TER'
#'Promoter is...', #21
QBBNamePromoter = 'Name: PR'
#'Represents the ability given... CDS', #22
QBBFunctionGameCDS = 'Function - game: CDS'
#'Terminator is...', #23
QBBNameTerminator = 'Name: TER'
#'Codes a protein... CDS', #24
QBBFunctionBiologyCDS = 'Function - biology: CDS'
#'RBS is...', #25
QBBNameRBS = 'Name: RBS'
#'Can represent GFP... CDS', #26
QBBExampleCDS = 'Example: CDS'
#'Coding Sequence is...', #27
QBBNameCDS = 'Name: CDS'
#'Controls when the device is active... PR', #28
QBBFunctionPR = 'Function: PR'
#'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
QBBFunctionRBS = 'Function: RBS'
#'Makes it possible to equip an additional device. Plasmid', #30
QBBFunctionPlasmid = 'Function: Plasmid'
#'Operator is... XXX', #31
QBBNameOperator = 'Name: Operator XXX'

# Device symbols
#'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
QDeviceRbsPconsFlhdcTer = 'Device: RBS:PCONS:FLHDC:TER XXX'
#'What does this device do? PCONS:RBS:FLHDC:TER', #33
QDevicePconsRbsFlhdcTer = 'Device: PCONS:RBS:FLHDC:TER'
#'What does this device do? PBAD:RBS:GFP:TER', #34
QDevicePbadRbsGfpTer = 'Device: PBAD:RBS:GFP:TER'
#'What does this device do? PBAD:GFP:RBS:TER XXX', #35
QDevicePbadGfpRbsTer = 'Device: PBAD:GFP:RBS:TER XXX'
#'What does this device do? GFP:RBS:PCONS:TER XXX', #36
QDeviceGfpRbsPconsTer = 'Device: GFP:RBS:PCONS:TER XXX'
#'What does this device do? PCONS:GFP:RBS:TER XXX', #37
QDevicePconsGfpRbsTer = 'Device: PCONS:GFP:RBS:TER XXX'
#'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
QDeviceAmprRbsPconsTer = 'Device: AMPR:RBS:PCONS:TER XXX'
#'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
QDeviceRbsPconsAmprTer = 'Device: RBS:PCONS:AMPR:TER XXX'

# Beyond the game
#'When does green fluorescence happen?', #40
QGreenFluorescence = 'Green fluorescence'
#'What happens when you unequip the movement device?', #41
QUnequipDevice = 'Unequip the movement device: effect'
#'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
QDevicePbadRbsAraTer = 'Device: PBAD:RBS:ARA:TER'

# Remarks
#'You can write down remarks here.', #43
QRemarks = 'Remarks'

# Technical data
#'userId', #44
QUserId = 'userId'
#'Language', #45
QLanguage = 'Language'
#'Temporality' #46
QTemporality = 'Temporality'

In [ ]:
gformColumns = pd.Index([
        
            # Timestamp
        #'Timestamp', #01
            QTimestamp,

# Basic engagement questions
        #'Are you interested in learning more about...Biology', #02
            QCuriosityBiology,
        #'Are you interested in learning more about...Synthetic biology', #03
            QCuriositySyntheticBiology,
        #'Are you interested in learning more about...Video games', #04
            QCuriosityVideoGames,
        #'Are you interested in learning more about...Engineering', #05
            QCuriosityEngineering,

# Experience with Hero.Coli
        #'Have you ever played Hero.Coli?', #06
            QPlayed,

# Basic demographics questions
        #'How old are you?', #07
            QAge,
        #'What is your gender?', #08
            QGender,
        #'Are you interested in video games?', #09
            QInterestVideoGames,
        #'Are you interested in biology?', #10
            QInterestBiology,
        #'How long have you studied biology?', #11
            QStudiedBiology,
        #'Do you play video games?', #12
            QPlayVideoGames,

# Basic biology questions
        #'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
            QHeardSynBioOrBioBricks,

# Basic engagement questions
        #'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
            QVolunteer,
        #'Did you enjoy playing the game?', #15
            QEnjoyed,

# General mechanics of the game
        #'In order to modify the abilities of the bacterium, you have to...', #16
            QGenotypePhenotype,
        #'What are BioBricks and devices?', #17
            QBioBricksDevicesComposition,
        #'Find the antibiotic:', #18
            QAmpicillin,

# BioBrick names and functions
        #'Plasmid is...', #19
            QBBNamePlasmid,
        #'Represents the end of a device... TER', #20
            QBBFunctionTER,
        #'Promoter is...', #21
            QBBNamePromoter,
        #'Represents the ability given... CDS', #22
            QBBFunctionGameCDS,
        #'Terminator is...', #23
            QBBNameTerminator,
        #'Codes a protein... CDS', #24
            QBBFunctionBiologyCDS,
        #'RBS is...', #25
            QBBNameRBS,
        #'Can represent GFP... CDS', #26
            QBBExampleCDS,
        #'Coding Sequence is...', #27
            QBBNameCDS,
        #'Controls when the device is active... PR', #28
            QBBFunctionPR,
        #'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
            QBBFunctionRBS,
        #'Makes it possible to equip an additional device. Plasmid', #30
            QBBFunctionPlasmid,
        #'Operator is... XXX', #31
            QBBNameOperator,

# Device symbols
        #'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
            QDeviceRbsPconsFlhdcTer,
        #'What does this device do? PCONS:RBS:FLHDC:TER', #33
            QDevicePconsRbsFlhdcTer,
        #'What does this device do? PBAD:RBS:GFP:TER', #34
            QDevicePbadRbsGfpTer,
        #'What does this device do? PBAD:GFP:RBS:TER XXX', #35
            QDevicePbadGfpRbsTer,
        #'What does this device do? GFP:RBS:PCONS:TER XXX', #36
            QDeviceGfpRbsPconsTer,
        #'What does this device do? PCONS:GFP:RBS:TER XXX', #37
            QDevicePconsGfpRbsTer,
        #'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
            QDeviceAmprRbsPconsTer,
        #'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
            QDeviceRbsPconsAmprTer,

# Beyond the game
        #'When does green fluorescence happen?', #40
            QGreenFluorescence,
        #'What happens when you unequip the movement device?', #41
            QUnequipDevice,
        #'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
            QDevicePbadRbsAraTer,

# Remarks
        #'You can write down remarks here.', #43
            QRemarks,

# Technical data
        #'userId', #44
            QUserId,
        #'Language', #45
            QLanguage,
        #'Temporality' #46
            QTemporality,
        ])

In [ ]:
if processGFormEN:
    gformEN1522.columns = gformColumns

List of answers

All possible answers


In [ ]:
# The first translated element is the correct answer when applicable
# Options that are deprecated are listed last

interestPossibleAnswersEN = [\
	"Not at all",
	"Slightly",
	"Moderately",
	"A lot",
	"Extremely",
	]
        
everPlayedPossibleAnswersEN = [\
     "I just played for the first time",
     "I played it multiple times recently on this computer",
     "I played recently on an other computer",
     "I played it some time ago",
     "No / not yet",
    
    # deprecated
     "I played it multiple times recently",
    ]

genderPossibleAnswersEN = [\
	"Female",
	"Male",
	"Other",
	"Prefer not to say",
    ]

biologyStudyPossibleAnswersEN = [\
	"Not even in middle school",
	"Until the end of middle school",
	"Until the end of high school",
	"Until bachelor's degree",
	"At least until master's degree",
	]

frequencyPossibleAnswersEN = [\
	"Not at all",
	"Rarely",
	"Moderately",
	"A lot",
	"Extremely",
	]

heardAboutBioBricksPossibleAnswersEN = [\
     "No",
     "Yes, but I don't exactly know what it means",
     "Yes, and I know what it means",
	]

yesNoPossibleAnswersEN = [\
	"Yes",
	"No",
	]

enjoyedTheGamePossibleAnswersEN = [\
     "Not applicable: not played yet",
     "Not at all",
     "A bit",
     "Moderately",
     "A lot",
     "Extremely",
    ]

#Q16PossibleAnswers
QGenotypePhenotypePossibleAnswersEN = [\
	"Edit the DNA of the bacterium",
	"Gather nanobots",
	"Move the bacterium",
	"Divide the bacterium",
	"I don't know",
	]

#Q17PossibleAnswers
QBioBricksDevicesCompositionPossibleAnswersEN = [\
	"RNA sequences",
	"Amino-acids",
	"Proteins",
	"DNA sequences",
	"I don't know",
	]

#Q18PossibleAnswers
QAmpicillinPossibleAnswersEN = [\
	"Ampicillin",
	"Arabinose",
	"GFP",
	"Terminator",
	"I don't know",
	]

BioBrickAnswersPossibleAnswersEN = [\
	"None of these",
	"TER",
	"PR",
	"CDS",
	"RBS",
	"Plasmid",
	"I don't know",
	]

DeviceAnswersPossibleAnswersEN = [\
	"The bricks are not well-ordered",
	"It generates green fluorescence",
	"It generates green fluorescence in presence of arabinose inducer",
	"It makes it possible to move faster",
	"It generates antibiotic resistance",
	"I don't know",
	]

#Q40PossibleAnswers
QGreenFluorescencePossibleAnswersEN = [\
	"Under blue light, when the GFP device is equipped",
	"Under blue light, all the time",
	"In front of the doors, when the GFP device is equipped",
	"In front of the doors, all the time",
	"I don't know",
	]

#Q41PossibleAnswers
QUnequipDevicePossibleAnswersEN = [\
	"The bacterium glows",
	"The bacterium dies",
	"Flagella quickly disappear one by one",
	"Nothing",
	"I don't know",
	]

#Q42PossibleAnswers
QDevicePbadRbsAraTerPossibleAnswersEN = [\
	"It produces arabinose all the time",
	"It is active only in arabinose clouds",
	"It produces more and more arabinose after being induced, because it induces itself",
	"It produces nothing since it induces itself",
	"I don't know",
	]

languagePossibleAnswers = [enLanguageID, frLanguageID]

temporalityPossibleAnswers = [\
    answerTemporalities[0],\
    answerTemporalities[1],\
    answerTemporalities[2],\
    ]

In [ ]:
possibleAnswersEN = pd.Series(
    [
# Timestamp
    #'Timestamp', #01
        [],

# Basic engagement questions
    #'Are you interested in learning more about...Biology', #02
        interestPossibleAnswersEN,
    #'Are you interested in learning more about...Synthetic biology', #03
        interestPossibleAnswersEN,
    #'Are you interested in learning more about...Video games', #04
        interestPossibleAnswersEN,
    #'Are you interested in learning more about...Engineering', #05
        interestPossibleAnswersEN,

# Experience with Hero.Coli
    #'Have you ever played Hero.Coli?', #06
        everPlayedPossibleAnswersEN,

# Basic demographics questions
    #'How old are you?', #07
        [],
    #'What is your gender?', #08
        genderPossibleAnswersEN,
    #'Are you interested in video games?', #09
        interestPossibleAnswersEN,
    #'Are you interested in biology?', #10
        interestPossibleAnswersEN,
    #'How long have you studied biology?', #11
        biologyStudyPossibleAnswersEN,
    #'Do you play video games?', #12
        frequencyPossibleAnswersEN,

# Basic biology questions
    #'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
        heardAboutBioBricksPossibleAnswersEN,

# Basic engagement questions
    #'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
        yesNoPossibleAnswersEN,
    #'Did you enjoy playing the game?', #15
        enjoyedTheGamePossibleAnswersEN,

# General mechanics of the game
    #'In order to modify the abilities of the bacterium, you have to...', #16
        QGenotypePhenotypePossibleAnswersEN,
    #'What are BioBricks and devices?', #17
        QBioBricksDevicesCompositionPossibleAnswersEN,
    #'Find the antibiotic:', #18
        QAmpicillinPossibleAnswersEN,

# BioBrick names and functions
    #'Plasmid is...', #19
        BioBrickAnswersPossibleAnswersEN,
    #'Represents the end of a device... TER', #20
        BioBrickAnswersPossibleAnswersEN,
    #'Promoter is...', #21
        BioBrickAnswersPossibleAnswersEN,
    #'Represents the ability given... CDS', #22
        BioBrickAnswersPossibleAnswersEN,
    #'Terminator is...', #23
        BioBrickAnswersPossibleAnswersEN,
    #'Codes a protein... CDS', #24
        BioBrickAnswersPossibleAnswersEN,
    #'RBS is...', #25
        BioBrickAnswersPossibleAnswersEN,
    #'Can represent GFP... CDS', #26
        BioBrickAnswersPossibleAnswersEN,
    #'Coding Sequence is...', #27
        BioBrickAnswersPossibleAnswersEN,
    #'Controls when the device is active... PR', #28
        BioBrickAnswersPossibleAnswersEN,
    #'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
        BioBrickAnswersPossibleAnswersEN,
    #'Makes it possible to equip an additional device. Plasmid', #30
        BioBrickAnswersPossibleAnswersEN,
    #'Operator is... XXX', #31
        BioBrickAnswersPossibleAnswersEN,

# Device symbols
    #'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? PCONS:RBS:FLHDC:TER', #33
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? PBAD:RBS:GFP:TER', #34
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? PBAD:GFP:RBS:TER XXX', #35
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? GFP:RBS:PCONS:TER XXX', #36
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? PCONS:GFP:RBS:TER XXX', #37
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
        DeviceAnswersPossibleAnswersEN,
    #'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
        DeviceAnswersPossibleAnswersEN,

# Beyond the game
    #'When does green fluorescence happen?', #40
        QGreenFluorescencePossibleAnswersEN,
    #'What happens when you unequip the movement device?', #41
        QUnequipDevicePossibleAnswersEN,
    #'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
        QDevicePbadRbsAraTerPossibleAnswersEN,

# Remarks
    #'You can write down remarks here.', #43
        [],

# Technical data
    #'userId', #44
        [],
    #'Language', #45
        languagePossibleAnswers,
    #'Temporality' #46
        temporalityPossibleAnswers,

    ], index = gformColumns
)
#possibleAnswersEN

Scientific questions


In [ ]:
correctAnswersEN = pd.Series(
        [
            # Timestamp
        #'Timestamp', #01
            [],

# Basic engagement questions
        #'Are you interested in learning more about...Biology', #02
            [],
        #'Are you interested in learning more about...Synthetic biology', #03
            [],
        #'Are you interested in learning more about...Video games', #04
            [],
        #'Are you interested in learning more about...Engineering', #05
            [],

# Experience with Hero.Coli
        #'Have you ever played Hero.Coli?', #06
            [],

# Basic demographics questions
        #'How old are you?', #07
            [],
        #'What is your gender?', #08
            [],
        #'Are you interested in video games?', #09
            [],
        #'Are you interested in biology?', #10
            [],
        #'How long have you studied biology?', #11
            [],
        #'Do you play video games?', #12
            [],

# Basic biology questions
        #'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
            [],

# Basic engagement questions
        #'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
            [],
        #'Did you enjoy playing the game?', #15
            [],

# General mechanics of the game
        #'In order to modify the abilities of the bacterium, you have to...', #16
            ["Edit the DNA of the bacterium"],
        #'What are BioBricks and devices?', #17
            ["DNA sequences"],
        #'Find the antibiotic:', #18
            ["Ampicillin"],

# BioBrick names and functions
        #'Plasmid is...', #19
            ["Plasmid"],
        #'Represents the end of a device... TER', #20
            ["TER"],
        #'Promoter is...', #21
            ["PR"],
        #'Represents the ability given... CDS', #22
            ["CDS"],
        #'Terminator is...', #23
            ["TER"],
        #'Codes a protein... CDS', #24
            ["CDS"],
        #'RBS is...', #25
            ["RBS"],
        #'Can represent GFP... CDS', #26
            ["CDS"],
        #'Coding Sequence is...', #27
            ["CDS"],
        #'Controls when the device is active... PR', #28
            ["PR"],
        #'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
            ["RBS"],
        #'Makes it possible to equip an additional device. Plasmid', #30
            ["Plasmid"],
        #'Operator is... XXX', #31
            ["None of these"],

# Device symbols
        #'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
            ["The bricks are not well-ordered"],
        #'What does this device do? PCONS:RBS:FLHDC:TER', #33
            ["It makes it possible to move faster"],
        #'What does this device do? PBAD:RBS:GFP:TER', #34
            ["It generates green fluorescence in presence of arabinose inducer"],
        #'What does this device do? PBAD:GFP:RBS:TER XXX', #35
            ["The bricks are not well-ordered"],
        #'What does this device do? GFP:RBS:PCONS:TER XXX', #36
            ["The bricks are not well-ordered"],
        #'What does this device do? PCONS:GFP:RBS:TER XXX', #37
            ["The bricks are not well-ordered"],
        #'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
            ["The bricks are not well-ordered"],
        #'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
            ["The bricks are not well-ordered"],

# Beyond the game
        #'When does green fluorescence happen?', #40
            ["Under blue light, when the GFP device is equipped"],
        #'What happens when you unequip the movement device?', #41
            ["Flagella quickly disappear one by one"],
        #'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
            ["It produces more and more arabinose after being induced, because it induces itself"],

# Remarks
        #'You can write down remarks here.', #43
            [],

# Technical data
        #'userId', #44
            [],
        #'Language', #45
            [],
        #'Temporality' #46
            [],
            
    ], index = gformColumns
)
#correctAnswersEN

Demographic questions


In [ ]:
interestPositives = [\
    "Moderately",\
    "A lot",\
    "Extremely",\
    ]

everPlayedPositives = [\
    "I just played for the first time",\
    "I played it multiple times recently on this computer",\
    "I played recently on an other computer",\
    "I played it some time ago",\
    ]

agePositives = [18,19,20,21,22,23]

genderPositives = ["Female"]

biologyStudyPositives = [\
    "Until bachelor's degree",\
    "At least until master's degree",\
    ]

frequencyPositives = [\
    "Moderately",\
    "A lot",\
    "Extremely",\
    ]

heardAboutBioBricksPositives = [\
    "Yes, and I know what it means",\
    ]

yesNoPositives = ["Yes"]

enjoyedTheGamePositives = [\
    "Moderately",\
    "A lot",\
    "Extremely",\
    ]

languagePossibleAnswers = [enLanguageID, frLanguageID]
languagePositives = [enLanguageID]

temporalityPossibleAnswers = [\
    answerTemporalities[0],\
    answerTemporalities[1],\
    answerTemporalities[2],\
    ]
temporalityPositives = [answerTemporalities[1]]


demographicAnswersEN = pd.Series(
    [

# Timestamp
    #'Timestamp', #01
        [],

# Basic engagement questions
    #'Are you interested in learning more about...Biology', #02
        interestPositives,
    #'Are you interested in learning more about...Synthetic biology', #03
        interestPositives,
    #'Are you interested in learning more about...Video games', #04
        interestPositives,
    #'Are you interested in learning more about...Engineering', #05
        interestPositives,

# Experience with Hero.Coli
    #'Have you ever played Hero.Coli?', #06
        everPlayedPositives,

# Basic demographics questions
    #'How old are you?', #07
        agePositives,
    #'What is your gender?', #08
        genderPositives,
    #'Are you interested in video games?', #09
        interestPositives,
    #'Are you interested in biology?', #10
        interestPositives,
    #'How long have you studied biology?', #11
        biologyStudyPositives,
    #'Do you play video games?', #12
        frequencyPositives,

# Basic biology questions
    #'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
        heardAboutBioBricksPositives,

# Basic engagement questions
    #'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
        yesNoPositives,
    #'Did you enjoy playing the game?', #15
        enjoyedTheGamePositives,

# General mechanics of the game
    #'In order to modify the abilities of the bacterium, you have to...', #16
        [],
    #'What are BioBricks and devices?', #17
        [],
    #'Find the antibiotic:', #18
        [],

# BioBrick names and functions
    #'Plasmid is...', #19
        [],
    #'Represents the end of a device... TER', #20
        [],
    #'Promoter is...', #21
        [],
    #'Represents the ability given... CDS', #22
        [],
    #'Terminator is...', #23
        [],
    #'Codes a protein... CDS', #24
        [],
    #'RBS is...', #25
        [],
    #'Can represent GFP... CDS', #26
        [],
    #'Coding Sequence is...', #27
        [],
    #'Controls when the device is active... PR', #28
        [],
    #'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
        [],
    #'Makes it possible to equip an additional device. Plasmid', #30
        [],
    #'Operator is... XXX', #31
        [],

# Device symbols
    #'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
        [],
    #'What does this device do? PCONS:RBS:FLHDC:TER', #33
        [],
    #'What does this device do? PBAD:RBS:GFP:TER', #34
        [],
    #'What does this device do? PBAD:GFP:RBS:TER XXX', #35
        [],
    #'What does this device do? GFP:RBS:PCONS:TER XXX', #36
        [],
    #'What does this device do? PCONS:GFP:RBS:TER XXX', #37
        [],
    #'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
        [],
    #'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
        [],

# Beyond the game
    #'When does green fluorescence happen?', #40
        [],
    #'What happens when you unequip the movement device?', #41
        [],
    #'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
        [],

# Remarks
    #'You can write down remarks here.', #43
        [],

# Technical data
    #'userId', #44
        [],
    #'Language', #45
        languagePositives,
    #'Temporality' #46
        temporalityPositives,

    ], index = gformColumns
)
#demographicAnswersEN

Language selection


In [ ]:
possibleAnswers = possibleAnswersEN

In [ ]:
correctAnswers = correctAnswersEN

In [ ]:
demographicAnswers = demographicAnswersEN

In [ ]:
scientificQuestions = correctAnswers[correctAnswers.apply(len) != 0].index.values.tolist()

In [ ]:
pretestScientificQuestions  = [answerTemporalities[0] + " " + q for q in scientificQuestions]
posttestScientificQuestions = [answerTemporalities[1] + " " + q for q in scientificQuestions]
deltaPrefix = "delta"
deltaScientificQuestions    = [deltaPrefix            + " " + q for q in scientificQuestions]

In [ ]:
pretestQuestions  = [answerTemporalities[0] + " " + q for q in gformColumns]
posttestQuestions = [answerTemporalities[1] + " " + q for q in gformColumns]
deltaQuestions    = [deltaPrefix            + " " + q for q in gformColumns]

In [ ]:
demographicQuestions = demographicAnswers[demographicAnswers.apply(len) != 0].index.values.tolist()

In [ ]:
questionCategories = [
'general biology',
'general biology',
'general biology',
'brick name',
'brick function',
'brick name',
'brick function',
'brick name',
'brick function',
'brick name',
'brick function',
'brick name',
'brick function',
'brick function',
'brick function',
'brick name',
'incorrect device',
'device function',
'advanced device function',
'incorrect device',
'incorrect device',
'incorrect device',
'incorrect device',
'incorrect device',
'general biology',
'general biology',
'advanced device function',
]

questionCategoriesDictionary = dict(zip(scientificQuestions, questionCategories))

Basic operations

Access

For instance, access to the correct answer to the 19th question.


In [ ]:
#correctAnswers.loc[gformColumns[19]]

Checkpoint / Question matching


In [ ]:
checkpointQuestionMatching = pd.DataFrame(
    {
        'checkpoint' : [

        # Timestamp
            #'Timestamp', #01
            '',

        # Basic engagement questions
            #'Are you interested in learning more about...Biology', #02
            '',
            #'Are you interested in learning more about...Synthetic biology', #03
            '',
            #'Are you interested in learning more about...Video games', #04
            '',
            #'Are you interested in learning more about...Engineering', #05
            '',

        # Experience with Hero.Coli
            #'Have you ever played Hero.Coli?', #06
            '',

        # Basic demographics questions
            #'How old are you?', #07
            '',
            #'What is your gender?', #08
            '',
            #'Are you interested in video games?', #09
            '',
            #'Are you interested in biology?', #10
            '',
            #'How long have you studied biology?', #11
            '',
            #'Do you play video games?', #12
            '',

        # Basic biology questions
            #'Have you ever heard about synthetic biology or BioBricks, outside of Hero.Coli?', #13
            '',

        # Basic engagement questions
            #'Do you volunteer to contribute to our study by answering 9 more questions? (5 min)', #14
            '',
            #'Did you enjoy playing the game?', #15
            '',

        # General mechanics of the game
            #'In order to modify the abilities of the bacterium, you have to...', #16
            tutorialStem + checkpointStem + '00',
            #'What are BioBricks and devices?', #17
            tutorialStem + checkpointStem + '00',
            #'Find the antibiotic:', #18
            tutorialStem + checkpointStem + '02',

        # BioBrick names and functions
            #'Plasmid is...', #19
            tutorialStem + checkpointStem + '05',
            #'Represents the end of a device... TER', #20
            tutorialStem + checkpointStem + '05',
            #'Promoter is...', #21
            tutorialStem + checkpointStem + '05',
            #'Represents the ability given... CDS', #22
            tutorialStem + checkpointStem + '02',
            #'Terminator is...', #23
            tutorialStem + checkpointStem + '05',
            #'Codes a protein... CDS', #24
            tutorialStem + checkpointStem + '02',
            #'RBS is...', #25
            tutorialStem + checkpointStem + '01',
            #'Can represent GFP... CDS', #26
            tutorialStem + checkpointStem + '02',
            #'Coding Sequence is...', #27
            tutorialStem + checkpointStem + '02',
            #'Controls when the device is active... PR', #28
            tutorialStem + checkpointStem + '05',
            #'Controls the level of expression, and thus how much the ability will be affected... RBS', #29
            tutorialStem + checkpointStem + '01',
            #'Makes it possible to equip an additional device. Plasmid', #30
            tutorialStem + checkpointStem + '05',
            #'Operator is... XXX', #31
            tutorialStem + checkpointStem + '13',

        # Device symbols
            #'What does this device do? RBS:PCONS:FLHDC:TER XXX', #32
            tutorialStem + checkpointStem + '01',
            #'What does this device do? PCONS:RBS:FLHDC:TER', #33
            tutorialStem + checkpointStem + '01',
            #'What does this device do? PBAD:RBS:GFP:TER', #34
            tutorialStem + checkpointStem + '05',
            #'What does this device do? PBAD:GFP:RBS:TER XXX', #35
            tutorialStem + checkpointStem + '01',
            #'What does this device do? GFP:RBS:PCONS:TER XXX', #36
            tutorialStem + checkpointStem + '01',
            #'What does this device do? PCONS:GFP:RBS:TER XXX', #37
            tutorialStem + checkpointStem + '01',
            #'What does this device do? AMPR:RBS:PCONS:TER XXX', #38
            tutorialStem + checkpointStem + '01',
            #'What does this device do? RBS:PCONS:AMPR:TER XXX', #39
            tutorialStem + checkpointStem + '01',

        # Beyond the game
            #'When does green fluorescence happen?', #40
            tutorialStem + checkpointStem + '02',
            #'What happens when you unequip the movement device?', #41
            tutorialStem + checkpointStem + '00',
            #'Last question. Next page only contains remarks.Guess: you have crafted a functional device containing an arabinose-induced promoter and an arabinose Coding Sequence (CDS). What will happen?', #42
            tutorialStem + checkpointStem + '05',

        # Remarks
            #'You can write down remarks here.', #43
            '',

        # Technical data
            #'userId', #44
            '',
            #'Language', #45
            '',
            #'Temporality' #46
            '',
        ]
    }, index = gformColumns
)
#checkpointQuestionMatching

In [ ]:
#checkpointQuestionMatching['checkpoint'][20]

In [ ]:
#checkpointQuestionMatching.loc[gformColumns[20], 'checkpoint']

In [ ]:
def getUniqueSortedCheckpoints( checkpoints ):
    result = checkpoints.unique()
    result = result[result!='']
    result = pd.Series(result)
    result = result.sort_values()
    result.index = range(0, len(result))
    return result

In [ ]:
validableCheckpoints = getUniqueSortedCheckpoints(checkpointQuestionMatching['checkpoint'])