development

Harmony R released!

Please select all the ways you would like to hear from Harmony project:

Harmony R released!

We have developed the R package for Harmony and open sourced it. To get started, you need R installed on your system.

Click here to try an example in Google Colab.

Here’s a Jupyter Notebook with an example using Harmony in R

Installing R library

We are currently submitting the R library to CRAN.

In the meantime, you can install the development version of harmonydata from GitHub (documentation in the README file):

You also need devtools which will already be there if you are using R Studio. If not, you can install devtools with the following command in the R console:

install.packages("devtools") # If you don't have devtools installed already.

Next, to install Harmony, run:

library(devtools)
devtools::install_github("harmonydata/harmony_r")

Parsing a raw file into an Instrument

Let’s import Harmony and harmonise an instrument.

If you want to read in a raw (unstructured) PDF or Excel file, you can do this via a POST request to the REST API. This will convert the file into an Instrument object in JSON.It returns the instrument as a list.

library(harmonydata)
instrument = load_instruments_from_file(path = "examples/GAD-7.pdf")
names(instrument[[1]])
#>  [1] "file_id"         "instrument_id"   "instrument_name" "file_name"      
#>  [5] "file_type"       "file_section"    "study"           "sweep"          
#>  [9] "metadata"        "language"        "questions"

You can also input a url containing the questionnaire.

instrument_2 = load_instruments_from_file("https://medfam.umontreal.ca/wp-content/uploads/sites/16/GAD-7-fran%C3%A7ais.pdf") 
names(instrument_2[[1]])
#>  [1] "file_id"         "instrument_id"   "instrument_name" "file_name"      
#>  [5] "file_type"       "file_section"    "study"           "sweep"          
#>  [9] "metadata"        "language"        "questions"

Matching instruments

You can get a list containing the results of the match.Here we can see a list of similarity score for each question comapred to all the other questions in th other questionaire.

instruments = append(instrument, instrument_2)
match = match_instruments(instruments)
names(match)
#> [1] "questions"        "matches"          "query_similarity"

Related Posts

Harmony in the spotlight: Sense about Science recognises need for responsible AI in research

Harmony in the spotlight: Sense about Science recognises need for responsible AI in research

How are research funders reacting to the AI governance vacuum? A recent article by Sense about Science, a leading independent charity that promotes the public interest in sound science and evidence, highlights the growing need for responsible AI governance in research. The article, titled Research funders tackle AI governance vacuum with pragmatic guidance, discusses the alarming gap between the rapid development and adoption of AI tools, and the lack of clear frameworks for their safe and ethical use.

Harmony at AI|DL meetup

Harmony at AI|DL meetup

Tech Talk at the AI|DL AI Meetup (London) Artificial Intelligence and Deep Learning for Enterprise Thomas Wood presents the Harmony project at the 19th AI and Deep Learning for Enterprise meetup on 8 October 2024. In case you missed the talk about Harmony on Tuesday at Civo Tech Junction with AI and Deep Learning for Enterprise sponsored by Daemon, you can now watch the recording of the live stream on AI|DL’s channel.

Signup to our newsletter

The latest news on data harmonisation project.

Please select all the ways you would like to hear from Harmony project:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website. We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices.