Skip to content

fairscape/REDCapDataDictionaryConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

REDCap to JSON-LD Converter

This repository contains code that converts a REDCap data dictionary CSV into JSON-LD metadata, adhering to the specifications outlined here. For instructions on how to export your data dictionary from REDCap, please refer to this guide.

Example Usage

The following example demonstrates how to use the RedCapSchema class to convert a REDCap data dictionary CSV into a JSON-LD schema:

from RedCapSchema import *

# Initialize the RedCapSchema object with a name and description
redcap_schema = RedCapSchema(
    name="Schema Name",
    description="Sample description for schema."
)

# Parse the REDCap data dictionary CSV
redcap_schema.parse_schema_csv('/path/to/red_cap_data_dictionary.csv')

# Save the converted schema as JSON-LD
redcap_schema.save_to_json('/output/path/converted_schema.json')

In this example, we first import the RedCapSchema class. We then create an instance of RedCapSchema by providing a schema name and description. The parse_schema_csv method is used to read and parse the REDCap data dictionary CSV file. Finally, the save_to_json method saves the converted schema in JSON-LD format to the specified output path.

Contribution

If you'd like to request a feature or report a bug, please create a GitHub Issue using one of the templates provided.

License

This project is licensed under the terms of the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages