Package: portableqda
portableQDAportableQDA facilitates round-trip information exchange using theREFI-QDAstandard: codebooks (QDC files) and QDPX projects. This portable information can be used by any Qualitative Research/Qualitative Data Analysis (CAQDAS) Softwareconforming to that XML-based standard.Import/Export formatsQDC and QDPXare:suitable for structured archiving of any kind of files, including:personal corpus of information analysis (text coding, cites, comments)the source documents themselves (any arbitrary format, including office docs, PDF, html, audio, surverys)well-defined and maintained by theREF-QDA working groupsupported and developed by a growing number of participantsQualitative Research, also known as QDA stands for Qualitative Data Analysis, as known in social sciences. Related Wikipedia article states: “Qualitative research relies on data obtained by the researcher by first-hand observation, interviews, recordings, […]. The data are generally non-numerical. Qualitative methods include ethnography, grounded theory, discourse analysis […]. These methods have been used in sociology, anthropology, and educational research.”InstallationpipinstallportableqdaBasic usageTesting (specially the output format)change your current directory to portableQDA's root, thenpoetryshell
pythontestsproduces various codebooks (QDC files) in your home directory, should be suitable for import by your CAQDAS software.Testing the input formatexport a codebook from the QDA software of your choiserun the following script:importportableqdacodebook=portableqda.codebookCls(output="portableQDA-output-test.qdc")codebook.readQdcFile(input="/path/to/file-from-first-step.qdc")codebook.writeQdcFile()should throw no errors, check the fileportableQDA-output-test.qdcat your home directory for completenesstry to import into your CAQDAS softwareDevelopingYou will find examples for many use cases at theexamplesdirectory. Some of them are:# examples/ex1_codesAndSets.pyimportportableqda#look for output in system loggingcodebook=portableqda.codebookCls(output="codebook_example.qdc")#create a codebook# create 3 codes and group them in two setsfornumberinrange(3):codebook.createElement(elementCls=portableqda.codeCls,name=f"code{number}",sets=["set1","set2"])# for error checking, see examples/ex2_flowControl.pycodebook.writeQdcFile()# export the codebook as a REFI-QDA 1.5 compliant QDC fileLook for the filecodebook_example.qdcat your home directory. You can see more of what's happening (portableQDA is a library thus not intended for direct use), inserting the following code where the comment "look for output in system logging" is, right after theimport portableqdastatement:importlogginghandler=logging.StreamHandler(sys.stdout)handler.setLevel(logging.DEBUG)formatter=logging.Formatter('%(name)s-%(levelname)s-%(message)s')handler.setFormatter(formatter)portableqda.log.addHandler(handler)portableqda.log.setLevel(logging.DEBUG)Output should look like this:portableqda.refi_qda - DEBUG - tree created, root node: 'CodeBook'. see REFI-QDA 1.5
portableqda.refi_qda - INFO - output is C:\Users\X\codebook_example.qdc
portableqda.refi_qda - DEBUG - added code code0 to set set1 
portableqda.refi_qda - DEBUG - added code code2 to set set2 
portableqda.refi_qda - INFO - exporting as REFI-QDC  codebook to file: C:\Users\X\codebook_example.qdcDocumentationContributingAcknowledgentsLMXL: portableQDA relies on the excellentlxml packagefor the  underlying tree data structure and  XML handlingREFI-QDA:working grouppushing interoperability and open standardsLicenseGNU Lesser General Public License v3 (LGPLv3)