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

Sweden
2010number
20111.6%
20122.2%
20133.2%
20144.5%
20156.9%
Norway
2010number
2011-6.6%
20121.2%
20131.4%
20141.9%
20152.0%
Finland
2010number
2011-16.6%
2012-14.2%
201310.2%
201411.0%
201513.2%
Iceland
2010number
20116.6%
20126.2%
20137.2%
201411.0%
201516.2%
Denmark
2010number
2011-2.6%
20120%
20132.6%
20142.9%
20152.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.