CSV to html – filter data

If you need to apply a filter on the generated table, then you will have to use some different settings. filter_data tells which data you want to use. filter_col is used to tell which column or columns you should filter the data from.

Original

20112012201320142015
Sweden1.6%2.2%3.2%4.5%6.9%
Norway-6.6%1.2%1.4%1.9%2.0%
Finland-16.6%-14.2%10.2%11.0%13.2%
Iceland6.6%6.2%7.2%11.0%16.2%
Denmark-2.6%0%2.6%2.9%2.11%

Filter data

This example below shows filtered data (Sweden) from column 1

Shortcode
[csvtohtml_create source_type="visualizer_plugin" path="csvfiles" source_files="sweden;norway;finland;iceland;denmark" filter_data="Sweden" filter_col="1"]
20112012201320142015
Sweden1.6%2.2%3.2%4.5%6.9%

Probably you might need some kind of operator to tell more specific data you want filtered. If you for example want to show data that has more or equal (filter_operator=”mequal”) to 3.2% in a specific column (you can only choose one column and in this case it’s the ”2013 – column” and that’s why filter_col=”4″ is used) you could do this (filter_removechars excludes the % char in this case when using filtering (e.g. filtering on value 7.2 instead of value ”7.2%”):

Shortcode
[csvtohtml_create source_type="visualizer_plugin" path="csvfiles" source_files="sweden.csv;norway;finland;iceland;denmark" filter_data="3.2" filter_col="4" filter_operator="mequal" filter_removechars="%"]

20112012201320142015
Sweden1.6%2.2%3.2%4.5%6.9%
Finland-16.6%-14.2%10.2%11.0%13.2%
Iceland6.6%6.2%7.2%11.0%16.2%

This example below shows filtered data (11) from the columns 5-6 (filter_col=”5-6″). It also uses the filter_operator wildcard so it filters 11 independently where in the value it exists (11.0% and 2.11% in this example).

Shortcode
[csvtohtml_create source_type="visualizer_plugin" path="csvfiles" source_files="sweden;norway;finland;iceland;denmark" filter_data="11" filter_col="5-6" filter_operator="wildcard"]
20112012201320142015
Finland-16.6%-14.2%10.2%11.0%13.2%
Iceland6.6%6.2%7.2%11.0%16.2%
Denmark-2.6%0%2.6%2.9%2.11%

In some cases you would like to filter data based on logged in id or name, then you will have to use some special variables:%userid% and %userlogin% in filter_data.