Dynamic data table from external json feed

For the first question you could try with the following gist in the github

https://gist.github.com/phpkidindia/a448e9b8132d3634bdebfa70a8d20c03

For the second option you should create a form with two fields date and distance and on the change event of those two fields you should create ajax request. and bind the result to the data table.

Hope this helps.