Skip to contents

Run this function before map_metadata

This function will read in the metadata file for a chosen dataset and save three summary outputs. The first is a table output, storing the name and description of the dataset, and each table within it. The second is a bar chart, summarising how many variables there are for each table, and whether these variables have a missing description. The third is a csv file storing the data that created this bar chart.

Usage

browse_metadata(json_file = NULL, output_dir = NULL)

Arguments

json_file

The metadata file. This should be a json download from the metadata catalogue. By default, the .json file within 'inst/inputs' is used.

output_dir

The path to the directory where the three output files will be saved. By default, the current working directory is used.

Value

The function will return three files, 'BROWSE_table...html', 'BROWSE_bar...html' and 'BROWSE_bar...csv' which gives summary information for this dataset. Open the two html output files in your browser and use these as reference when running the map_metadata function.

Examples

# Demo run requires no function inputs or user interaction
browse_metadata()
#> 
#>  Running browseMetadata in demo mode using package data files
#> 
#>  
#>  Processing Table 1 of 13 (EXAM)
#> 
#>  Processing Table 2 of 13 (CHILD)
#> 
#>  Processing Table 3 of 13 (REFR_IMM_VAC)
#> 
#>  Processing Table 4 of 13 (IMM)
#> 
#>  Processing Table 5 of 13 (BREAST_FEEDING)
#> 
#>  Processing Table 6 of 13 (PATH_BLOOD_TESTS)
#> 
#>  Processing Table 7 of 13 (CHE_HEALTHYCHILDWALESPROGRAMME)
#> 
#>  Processing Table 8 of 13 (BLOOD_TEST)
#> 
#>  Processing Table 9 of 13 (CHILD_TRUST)
#> 
#>  Processing Table 10 of 13 (PATH_SPCM_DETAIL)
#> 
#>  Processing Table 11 of 13 (CHILD_MEASUREMENT_PROGRAM)
#> 
#>  Processing Table 12 of 13 (CHILD_BIRTHS)
#> 
#>  Processing Table 13 of 13 (SIG_COND)
#> 
#>  Three outputs have been saved to your output directory.
#>  The two html files are shown in your Viewer tab. Open in your browser for full screen viewing.
#> 
#> $table_html
#> 
#> $barplot_html
#>