Skip to content

This python script is able to transform the content in an RQDA database into a gephi friendly format. It is also able to find pairs, triples, quadruples (or more) overlaping tags. The idea is doing some quantitive analysis out of qualitative tagged data.

Notifications You must be signed in to change notification settings

robertour/RQDA-to-CSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RQDA-to-CSV: Overlapped RQDA Codes Finder (Version 1.0.0)

This code take as an input an RQDA project file generated with the RQDA Package (https://rqda.r-forge.r-project.org/) for Qualitative Data Analysis in R.

The code will search for tags that overlap in the text. Each time there is an overlap of n tags, a csv line is added to an external file, specifying the information of each tag. Let's take the following tagged file:

Lorem ipsum <tagA> dolor sit amet, <tagB>consectetur adipiscing elit,</tagA>sed do eiusmod tempor</tagB> incididunt ut labore et dolore magna aliqua.

In this case, tagA and tagB are overlapped, so a row is produced in the CSV file output, with the following format

filename, file_categories ..., tagA, tagA_categories... , tagB, tagB_categories, tagA-tagB

A new row is created each time tagA and tagB appear together. Currently, the script is able to find up to 11 overlapping tags.

The script can also convert the RQDA database into a CSV Gephi friendly format (https://gephi.github.io/).

A. How to use it?

A.1. Python Code

A.1.i. Run the provided example

  1. Install Python
  2. Go to the python directory
  3. Run the scripts with python run.py (in the command line)
  4. In the python folder, the scripts will generate three folders containing overlapped codes for 1, 2 and 3 codes respectively

The script open the RQDA project file (called db.rqda), and look for the specified combinations in the file configuration.py

A.1.ii. Configure your RQDA database

In order to configure your own RQDA data to be processed, you will need to deal with two files.

  1. Open the configuration.py in a text editor. By defaut, configuration.py contain the configuration to process the default db.rqda
  2. Open the default db.rqda project file with RQDA, and get familiar with the example.
  3. Now you can adapt the configuration.py to you data. You can also check the configuration_template file that contains more details of how to input the corresponding information.
  4. Replace the db.rqda with your own RQDA project file
  5. Finally, run the scripts with python run.py. Folders with the results will be created accoding to the configuration.

A.2. R Code

A.2.i. Run the provided example

  1. Make sure you run the Python provided example first (See A.1.i.)
  2. Install R
  3. Install the car library
  4. Set the working directory of R to R-scrips folder.
  5. Run the codings1.R, codings2.R and codings3.R to see the graph examples.

A.2.ii. Configure your project

  1. Make sure you run the Python scripts with you RQDA database (See A.1.ii.)

  2. Open the codings2.R (or any of the other two examples)

  3. Modify the filename line according to the folder generated by the python script:

     filename = "../python/1-fairytales,others--focus,sentence,style,valence-/codings1.csv"
    
  4. Specify the filename categories that are going to be compared in the graphs

     filename_columns <- c("fairytales", "others")
    
  5. Add as many colors as categories you need

     bar_colors <- c("white","gray")
    
  6. Specifify the codes combination that you are interested in

     select_codes = c( 
         # 1st code
         "valence_positive|valence_negative", 
         # 2nd code
         "focus_maincharacter|focus_other"
     )
    
  7. Run the R-Script

B. Questions

Please feel free to contact me if you have any questions.

C. How do I reference this code?

If you want to reference this code please use the following:

Ulloa, R. (2015). RQDA-to-CSV: First Release. Zenodo. 10.5281/zenodo.16647

DOI

About

This python script is able to transform the content in an RQDA database into a gephi friendly format. It is also able to find pairs, triples, quadruples (or more) overlaping tags. The idea is doing some quantitive analysis out of qualitative tagged data.

Resources

Stars

Watchers

Forks

Packages

No packages published