<% if @coverage_results.size == 0 %>

You made Spout cry... :'-(

No CSVs found in <%= Dir.pwd %>/csvs/<%= @standard_version %>/

<% else %>
<% if @extra_variable_ids.size > 0 %> <% end %> <% @coverage_results.each do |csv, total_column_count, mapped_column_count| %> <% end %>
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 ) %>
<% @extra_variable_ids.each do |variable_id| %> <% end %> <% @matching_results.each do |csv_files, column, scr| %> <% end %>
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 ) %>
  • Value exists in dataset, and value exists in domain
  • Value does not exist in dataset, but value exists in domain
  • Value exists in dataset, but value does not exist in domain
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 %>
<% end %>
<%= 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 %>
<% end %>