From 6382e7aa94c08df95b1429be3aae0393af642253 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Tue, 9 Nov 2010 15:54:06 +0100 Subject: Numerous report improvments --- web/views/reports/characters_in_keys.erb | 150 ++++++++++++++++++++----------- 1 file changed, 99 insertions(+), 51 deletions(-) (limited to 'web/views/reports/characters_in_keys.erb') diff --git a/web/views/reports/characters_in_keys.erb b/web/views/reports/characters_in_keys.erb index 7c450dd..b54a0a4 100644 --- a/web/views/reports/characters_in_keys.erb +++ b/web/views/reports/characters_in_keys.erb @@ -1,61 +1,79 @@

<%= @title %>

Any valid Unicode character can appear in an OSM key but usually only lower -case latin letters (a-z) and the underscore (_) are used, sometimes the colon +case latin letters (a-z) and the underscore (_) are used. Sometimes the colon (:) is added as a separator character.

-

Statistics

- - - - - +

Statistics Overview

+
+

+
CountFractionDescription
<%= @db.stats('characters_in_keys_plain') %><%= sprintf '%.2f', @db.stats('characters_in_keys_plain') * 100.0 / @db.stats('num_keys') %>%
+ + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - +
A<%= @db.stats('characters_in_keys_plain') %><%= sprintf '%.2f', @db.stats('characters_in_keys_plain') * 100.0 / @db.stats('num_keys') %>% Only latin lowercase letters (a to z) and underscore (_), first and last characters are letters.
<%= @db.stats('characters_in_keys_colon') %><%= sprintf '%.2f', @db.stats('characters_in_keys_colon') * 100.0 / @db.stats('num_keys') %>%Like above but with one or more colons (:) inside.
<%= @db.stats('characters_in_keys_letters') %><%= sprintf '%.2f', @db.stats('characters_in_keys_letters') * 100.0 / @db.stats('num_keys') %>%Like above but with uppercase latin letters or letters from other alphabets.
<%= @db.stats('characters_in_keys_space') %><%= sprintf '%.2f', @db.stats('characters_in_keys_space') * 100.0 / @db.stats('num_keys') %>%Contain whitespace (space, tab, new line, carriage return, or whitespace characters from other alphabets).
<%= @db.stats('characters_in_keys_problem') %><%= sprintf '%.2f', @db.stats('characters_in_keys_problem') * 100.0 / @db.stats('num_keys') %>%Contain possibly problematic characters: =+/&<>;'"?%#@\,.
<%= @db.stats('characters_in_keys_rest') %><%= sprintf '%.2f', @db.stats('characters_in_keys_rest') * 100.0 / @db.stats('num_keys') %>%
B<%= @db.stats('characters_in_keys_colon') %><%= sprintf '%.2f', @db.stats('characters_in_keys_colon') * 100.0 / @db.stats('num_keys') %>%Like A but with one or more colons (:) inside.
C<%= @db.stats('characters_in_keys_letters') %><%= sprintf '%.2f', @db.stats('characters_in_keys_letters') * 100.0 / @db.stats('num_keys') %>%Like B but with uppercase latin letters or letters from other alphabets.
D<%= @db.stats('characters_in_keys_space') %><%= sprintf '%.2f', @db.stats('characters_in_keys_space') * 100.0 / @db.stats('num_keys') %>%Like C but contains at least one whitespace character (space, tab, new line, carriage return, or from other alphabets).
E<%= @db.stats('characters_in_keys_problem') %><%= sprintf '%.2f', @db.stats('characters_in_keys_problem') * 100.0 / @db.stats('num_keys') %>%Like C but contains possibly problematic characters: =+/&<>;'"?%#@\,.
F<%= @db.stats('characters_in_keys_rest') %><%= sprintf '%.2f', @db.stats('characters_in_keys_rest') * 100.0 / @db.stats('num_keys') %>% Everything else.

Keys With Whitespace

-

Keys that contain whitespace characters such as space, tab, new line, carriage return, or whitespace characters from other alphabets.

+

Keys that contain whitespace characters such as space, tab, new + line, carriage return, or whitespace characters from other + alphabets.
+ Whitespace in keys can be confusing, especially at the + beginning or end of the key, because they are invisible. Generally + the underscore (_) should be used instead.

Keys With Possibly Problematic Characters

-

Keys that contain possibly problematic characters: =+/&<>;'"?%#@\,.

+

Keys that contain possibly problematic characters: =+/&<>;'"?%#@\,. These characters + can be problematic, because they are used to quote strings in + different programming languages or have special meanings in XML, HTML, + URLs, and other places. The equal sign is used often as separator + between tag keys and values.
+ Keys that appear in this list are not necessarily wrong though. But + in many cases they are just results of some error.

@@ -64,16 +82,23 @@ case latin letters (a-z) and the underscore (_) are used, sometimes the colon + -- cgit v1.2.3