Closed rackeranjani closed 7 years ago
Yeah we can use two option for dataset
This might be a solution: http://datapipes.okfnlabs.org/html/ . It's a tool by Open Knowledge International themselves.
For example, to show this data https://raw.githubusercontent.com/okfnepal/election-nepal-data/master/Political%20Parties%20Contact%20Info.csv
, we'll add this url to http://datapipes.okfnlabs.org/csv/html/?url=
and get the HTML table as output.
I think @sagargg just solved this issue, Is this done by using the solution proposed by @studenton or was done by using new way.
@nikeshbalami Not sure, but looking at the commits, I think he adopted some different approach. It's even better.
Yeah I also like it, Kudos @sagargg :1st_place_medal:
@sagargg The third column data on every table contains hyperlink. I tried but didn't found from where it was coming. May be you could fix that.
Ohh Yeah, I didn't noticed it previously :P
@sagargg The tracked down the problem to custom_formatting
. I think there is some reason you put it up there, so I haven't tried to fix it.
<script type="text/javascript">
function format_link(link) {
if (link)
return "<a href='" + link + "' target='_blank'>" + link + "</a>";
else
return "";
}
CsvToHtmlTable.init({
csv_path: '{{ dataset_id.GitHub_Link }}',
element: 'table-container',
allow_download: true,
csv_options: {separator: ',', delimiter: '"'},
datatables_options: {"paging": true},
custom_formatting: [[2, format_link]]
});
$(document).ready(function () {
$('#table-container-table_wrapper').DataTable();
});
As a user, i would like to see data on the website rather on git