No CSVs found in <%= Dir.pwd %>/csvs/<%= @standard_version %>/
CSV | Coverage | Total | Columns Defined | Columns Missed |
---|---|---|---|---|
Variables Not Found in Any CSV | <%= number_with_delimiter( @extra_variable_ids.size ) %> |
|||
<%= csv %> | <% if total_column_count.to_i > 0 %> <%= "%0.02f %" % (mapped_column_count * 100.0 / total_column_count) %> <% else %> --- <% end %> | <%= number_with_delimiter( total_column_count ) %> |
<%= number_with_delimiter( mapped_column_count ) %> |
<%= number_with_delimiter( total_column_count - mapped_column_count ) %> |
CSV | Column | JSON File | Variable ID | Variable Type | Variable Domain | Values |
---|---|---|---|---|---|---|
Coverage |
<%= total_count = @matching_results.count %> |
<% matched = @matching_results.count{|csv_files, column, scr| scr.file_name_test} %>
<% matched_percent = (total_count == 0 ? 0 : (matched * 100.0 / total_count).floor) %>
<% missing_percent = 100 - matched_percent %>
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
<% matched = @matching_results.count{|csv_files, column, scr| scr.json_id_test} %>
<% matched_percent = (total_count == 0 ? 0 : (matched * 100.0 / total_count).floor) %>
<% missing_percent = 100 - matched_percent %>
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
<% matched = @matching_results.count{|csv_files, column, scr| scr.variable_type_test} %>
<% matched_percent = (total_count == 0 ? 0 : (matched * 100.0 / total_count).floor) %>
<% missing_percent = 100 - matched_percent %>
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
<% matched = @matching_results.count{|csv_files, column, scr| scr.json['type'] == 'choices' and scr.domain_test} %>
<% total_count = @matching_results.count{|csv_files, column, scr| scr.json['type'] == 'choices'} %>
<% matched_percent = (total_count == 0 ? 0 : (matched * 100.0 / total_count).floor) %>
<% missing_percent = 100 - matched_percent %>
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
|
Not in any CSV file | <%= variable_id %> | <%= variable_id %>.json |
Recommend to remove this variable from data dictionary as this variable does not exist in any CSV. | |||
<% csv_files.each do |csv_file| %>
<%= csv_file %> |
<%= column %> |
<% if scr.file_name_test %>
<% else %>
<%= column %>.json missing
<% end %>
|
<% if scr.file_name_test %>
<% if scr.json_id_test %>
"id": "<%= column %>"
<% else %>
"id": <%= scr.json['id'].inspect %>
<% end %>
<% end %>
|
<% if scr.file_name_test %>
"type": <%= scr.json['type'].inspect %>
<% end %>
|
<% if scr.json['type'] == 'choices' and scr.file_name_test %>
<% if scr.domain_test or scr.json['domain'].to_s.strip == '' %>
"domain": <%= scr.json['domain'].inspect %>
<% else %>
<%= scr.json['domain'] %>.json missing
<% end %>
<% end %>
|
<% if scr.json['type'] == 'choices' %>
<% unused_values = scr.valid_values - scr.csv_values %>
<% if scr.values_test and unused_values.size == 0 %>
<% else %>
<% (scr.valid_values + scr.csv_values.compact.sort).uniq.each do |value| %>
<% class_type = '' %>
<% class_type = 'success' if scr.valid_values.include?(value) %>
<% class_type = 'default' if unused_values.include?(value) %>
<%= value %>
<% end %>
<% end %>
<% end %>
|