Check out the working demo: http://jorellek.github.io/CapitalOneChallenge1/
Use csv file to calculate the price estimation given latitude and longitude. Then, add a link on html file to read csv file.
use iframe to embed maps to website
Use csv file to display Price depending on location. The user can sort the price.
<script>
CsvToHtmlTable.init({
csv_path: 'data/review.csv',
element: 'table-container',
allow_download: true,
csv_options: {separator: ',', delimiter: '"'},
datatables_options: {"paging": false}
});
</script>
csv_path
Path to your CSV file.element
The HTML element to render your table to. Defaults totable-container
allow_download
if true, shows a link to download the CSV file. Defaults tofalse
csv_options
jQuery CSV configuration. Use this if you want to use a customdelimiter
orseparator
in your input file. See their documentation.datatables_options
DataTables configuration. See their documentation.custom_formatting
New! A list of column indexes and custom functions to format your data (see below)
Use Splunk to produce a dashboard with some graphs visualization and link it to the html page.
Use CSS and Javscript to format the webpage
<script>
//my custom function that creates a hyperlink
function format_link(link){
if (link)
return "<a href='" + link + "' target='_blank'>" + link + "</a>";
else
return "";
}
//initializing the table
CsvToHtmlTable.init({
csv_path: 'data/review.csv',
element: 'table-container',
allow_download: true,
csv_options: {separator: ',', delimiter: '"'},
datatables_options: {"paging": false},
custom_formatting: [[4, format_link]] //execute the function on the 4th column of every row
});
</script>
GitHub pages Host it on GitHub pages for free! Then navigate to http://jorellek.github.io/CapitalOneChallenge1/
Web server This project should work on any web server.
- Bootstrap - Responsive HTML, CSS and Javascript framework
- jQuery - a fast, small, and feature-rich JavaScript library
- jQuery CSV - Parse CSV (Comma Separated Values) to Javascript arrays or dictionaries.
Copyright (c) 2017 Jorelle Kebeto. Released (https://github.com/jorellek/CapitalOneChallenge1/blob/master/LICENSE).