atorus-research / datasetjson

Read and write CDISC Dataset JSON files
https://atorus-research.github.io/datasetjson/
Apache License 2.0
12 stars 2 forks source link

Closes #8: Introduce and test capability to read files from URLs #15

Closed mstackhouse closed 11 months ago

mstackhouse commented 11 months ago

Example code:

> validate_dataset_json("https://github.com/cdisc-org/DataExchange-DatasetJson/raw/master/examples/sdtm/ti.json")
File is valid per the Dataset JSON v1.0.0 schema

[1] instancePath schemaPath   keyword      params       message      schema       parentSchema dataPath    
<0 rows> (or 0-length row.names)
> head(read_dataset_json("https://github.com/cdisc-org/DataExchange-DatasetJson/raw/master/examples/sdtm/ti.json"))
       STUDYID DOMAIN IETESTCD
1 CDISCPILOT01     TI   INCL01
2 CDISCPILOT01     TI   INCL02
3 CDISCPILOT01     TI   INCL03
4 CDISCPILOT01     TI   INCL04
5 CDISCPILOT01     TI   INCL05
6 CDISCPILOT01     TI   INCL06
                                                                                                                  IETEST
1                                                             Males and postmenopausal females at least 50 years of age.
2                                                Diagnosis of probable AD as defined by NINCDS and the ADRDA guidelines.
3                                                                                                MMSE score of 10 to 23.
4                                                                       Modified Hachinski Ischemic Scale score of <= 4.
5 CNS imaging (CT scan or MRI of brain) compatible with AD within past 1 year. (See Protocol for incompatible findings.)
6   Investigator has obtained informed consent signed by the patient (and/or legal representative) and by the caregiver.
      IECAT   TIVERS
1 INCLUSION ORIGINAL
2 INCLUSION ORIGINAL
3 INCLUSION ORIGINAL
4 INCLUSION ORIGINAL
5 INCLUSION ORIGINAL
6 INCLUSION ORIGINAL