research_client.lsbq.dataschema

Data schema implementing the LSBQe questionnaire.

Classes

Response

Class for representing the data of an LSBQe questionnaire response.

class Response[source]

Bases: DataSchema

Class for representing the data of an LSBQe questionnaire response.

__init__(id_=None)[source]

Instantiates a new LSBQe response object.

Parameters:

id_ (Optional[str])

__schema = {'club': {'childhood_friends': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with friends in childhood'}, 'childhood_grandparents': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with grandparents in childhood'}, 'childhood_neighbours': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with neighbours in childhood'}, 'childhood_other_relatives': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with other relatives in childhood'}, 'childhood_parents': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with parents in childhood'}, 'childhood_siblings': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with siblings in childhood'}, 'children': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with children'}, 'commercial': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for commercial activities'}, 'emailing': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for emailing'}, 'flatmates': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with flat/housemates'}, 'friends': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with friends'}, 'grandparents': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with grandparents'}, 'home': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use at home'}, 'infancy_age': {'constraint': (-9223372036854775808, 9223372036854775807), 'type_': <class 'float'>, 'typedesc': 'proportion of language use in infancy age'}, 'internet': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for internet'}, 'leisure': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for leisure activities'}, 'neighbours': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with neighbours'}, 'notes': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for notes'}, 'nursery_age': {'constraint': (-9223372036854775808, 9223372036854775807), 'type_': <class 'float'>, 'typedesc': 'proportion of language use in nursery age'}, 'other_relatives': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with other relatives'}, 'parents': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with parents'}, 'partner': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with partner'}, 'praying': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for praying'}, 'primary_age': {'constraint': (-9223372036854775808, 9223372036854775807), 'type_': <class 'float'>, 'typedesc': 'proportion of language use in primary age'}, 'public': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for public affairs'}, 'reading': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for reading'}, 'religion': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for religion'}, 'school': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use at school'}, 'secondary_age': {'constraint': (-9223372036854775808, 9223372036854775807), 'type_': <class 'float'>, 'typedesc': 'proportion of language use in secondary age'}, 'siblings': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use with siblings'}, 'social_media': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for social media'}, 'socialising': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use when socialising'}, 'switching_friends': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'frequency of code switching with friends'}, 'switching_parents_and_family': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'frequency of code switching with parents and family'}, 'switching_social_media': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'frequency of code switching on social media'}, 'texting': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for texting'}, 'traditional_media': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use for traditional media'}, 'work': {'constraint': (-9223372036854775808, 9223372036854775807), 'required': False, 'type_': <class 'float'>, 'typedesc': 'proportion of language use at work'}}, 'id': {'constraint': '[0-9a-fA-F]{8}-?(?:[0-9a-fA-F]{4}-?){3}[0-9a-fA-F]{12}', 'type_': <class 'str'>, 'typedesc': 'LSBQe Response ID'}, 'ldb': {'father_education_level': {'constraint': (1, 5), 'required': False, 'type_': <class 'int'>, 'typedesc': 'education level'}, 'father_first_language': {'constraint': '[\\w][\\w\\-_ \\(\\)]{2,50}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'language or dialect name'}, 'father_occupation': {'constraint': '.{0,255}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'occupation'}, 'father_other_languages': {'constraint': '.*', 'required': False, 'type_': <class 'str'>, 'typedesc': 'list of language or dialect names'}, 'father_second_language': {'constraint': '[\\w][\\w\\-_ \\(\\)]{2,50}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'language or dialect name'}, 'languages_proficiency_reading': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'indication of proficiency'}, 'languages_proficiency_speaking': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'indication of proficiency'}, 'languages_proficiency_understanding': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'indication of proficiency'}, 'languages_proficiency_writing': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'indication of proficiency'}, 'languages_spoken_age': {'constraint': (0, 100), 'multiple': True, 'type_': <class 'int'>, 'typedesc': 'age of acquisition'}, 'languages_spoken_breaks': {'constraint': (0, 9223372036854775807), 'multiple': True, 'type_': <class 'int'>, 'typedesc': 'breaks during acquisition'}, 'languages_spoken_name': {'constraint': '[\\w][\\w\\-_ \\(\\)]{2,50}', 'multiple': True, 'type_': <class 'str'>, 'typedesc': 'language or dialect name'}, 'languages_spoken_source_community': {'constraint': ({'true', True, 'c', 'yes', '1', 'on', 'community'}, {False, 'false', 'school', 'o', 's', 'no', 'home', 'other', 'off', 'h', '0'}), 'multiple': True, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'language acquired in the community'}, 'languages_spoken_source_home': {'constraint': ({'true', True, 'yes', '1', 'home', 'on', 'h'}, {False, 'false', 'school', 'o', 's', 'no', 'c', 'other', 'community', 'off', '0'}), 'multiple': True, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'language acquired in the home'}, 'languages_spoken_source_other': {'constraint': ({'true', True, 'yes', '1', 'other', 'on', 'o'}, {False, 'false', 'school', 's', 'no', 'c', 'home', 'community', 'off', 'h', '0'}), 'multiple': True, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'language acquired in other ways'}, 'languages_spoken_source_other_detail': {'constraint': '.{0,255}', 'multiple': True, 'required': False, 'type_': <class 'str'>, 'typedesc': 'details of other source of language acquisition'}, 'languages_spoken_source_school': {'constraint': ({'true', True, 'yes', '1', 'on', 'school', 's'}, {False, 'false', 'o', 'no', 'c', 'home', 'other', 'community', 'off', 'h', '0'}), 'multiple': True, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'language acquired at school'}, 'languages_usage_listening': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'proportion of language use'}, 'languages_usage_reading': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'proportion of language use'}, 'languages_usage_speaking': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'proportion of language use'}, 'languages_usage_writing': {'constraint': (-9223372036854775808, 9223372036854775807), 'multiple': True, 'type_': <class 'float'>, 'typedesc': 'proportion of language use'}, 'mother_education_level': {'constraint': (1, 5), 'required': False, 'type_': <class 'int'>, 'typedesc': 'education level'}, 'mother_first_language': {'constraint': '[\\w][\\w\\-_ \\(\\)]{2,50}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'language or dialect name'}, 'mother_occupation': {'constraint': '.{0,255}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'occupation'}, 'mother_other_languages': {'constraint': '.*', 'required': False, 'type_': <class 'str'>, 'typedesc': 'list of language or dialect names'}, 'mother_second_language': {'constraint': '[\\w][\\w\\-_ \\(\\)]{2,50}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'language or dialect name'}}, 'lsb': {'date_of_birth': {'constraint': '[0-9]{1,4}\\-(0?[1-9]|1[0-2])\\-(0?[1-9]|[12][0-9]|3[01])', 'type_': <class 'str'>, 'typedesc': 'date of birth'}, 'education_level': {'constraint': (1, 5), 'type_': <class 'int'>, 'typedesc': 'education level'}, 'handedness': {'constraint': {'l': 'l', 'left': 'l', 'lefthanded': 'l', 'r': 'r', 'right': 'r', 'righthanded': 'r'}, 'type_': dict[typing.Any, typing.Any], 'typedesc': 'handedness'}, 'hearing_aid': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'required': False, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'indication of hearing aid use'}, 'hearing_impairment': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'indication of hearing impairment'}, 'occupation': {'constraint': '.{0,255}', 'type_': <class 'str'>, 'typedesc': 'occupation'}, 'place_of_birth': {'constraint': "[\\w,' \\(\\)\\.\\-]{1,50}", 'type_': <class 'str'>, 'typedesc': 'location name for a birth place'}, 'residencies_end': {'constraint': '[0-9]{1,4}\\-(0?[1-9]|1[0-2])', 'multiple': True, 'required': False, 'type_': <class 'str'>, 'typedesc': 'end month and year'}, 'residencies_location': {'constraint': "[\\w,' \\(\\)\\.\\-]{1,50}", 'multiple': True, 'required': False, 'type_': <class 'str'>, 'typedesc': 'location name for place of significant residence'}, 'residencies_start': {'constraint': '[0-9]{1,4}\\-(0?[1-9]|1[0-2])', 'multiple': True, 'required': False, 'type_': <class 'str'>, 'typedesc': 'start month and year'}, 'sex': {'constraint': {'f': 'f', 'female': 'f', 'he': 'm', 'm': 'm', 'male': 'm', 'miss': 'f', 'missus': 'f', 'mister': 'm', 'mr': 'm', 'mrs': 'f', 'ms': 'f', 'mx': 'o', 'o': 'o', 'other': 'o', 'she': 'f', 'they': 'o', 'x': 'o'}, 'type_': dict[typing.Any, typing.Any], 'typedesc': 'sex'}, 'sex_other': {'constraint': '.{0,255}', 'required': False, 'type_': <class 'str'>, 'typedesc': 'description of other sex'}, 'vision_aid': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'required': False, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'indication of vision aid use'}, 'vision_fully_corrected': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'required': False, 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'indication of whether vision is fully corrected'}, 'vision_impairment': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'indication of vision impairment'}}, 'meta': {'app_version': {'constraint': '(?:\\d+.)*\\d+\\w?\\w?\\d*', 'type_': <class 'str'>, 'typedesc': 'Version of app that last modified the Response'}, 'consent': {'constraint': ({'true', True, 'yes', '1', 'on'}, {False, 'false', 'off', 'no', '0'}), 'type_': typing.Union[tuple[typing.Iterable[typing.Any], typing.Iterable[typing.Any]], list[typing.Iterable[typing.Any]]], 'typedesc': 'consent confirmation'}, 'date': {'constraint': '[0-9]{1,4}\\-(0?[1-9]|1[0-2])\\-(0?[1-9]|[12][0-9]|3[01])', 'type_': <class 'str'>, 'typedesc': 'current date'}, 'participant_id': {'constraint': '[A-Za-z0-9]{3,10}', 'type_': <class 'str'>, 'typedesc': 'Participant ID'}, 'research_location': {'constraint': "[\\w,' \\(\\)\\.\\-]{1,50}", 'type_': <class 'str'>, 'typedesc': 'location name'}, 'researcher_id': {'constraint': '[A-Za-z0-9]{3,10}', 'type_': <class 'str'>, 'typedesc': 'Researcher ID'}, 'version_id': {'constraint': '\\w{13,17}', 'type_': <class 'str'>, 'typedesc': 'LSBQe version identifier'}, 'version_no': {'constraint': '(?:\\d+.)*\\d+\\w?\\w?\\d*', 'type_': <class 'str'>, 'typedesc': 'LSBQe version number'}}, 'notes': {'participant_note': {'required': False, 'type_': <class 'str'>, 'typedesc': 'participant note'}, 'researcher_note': {'required': False, 'type_': <class 'str'>, 'typedesc': 'researcher note'}}}

Type:    dict