<?php
    $json = file_get_contents('https://stats.andrewheiss.com/wt_data/');
    $data = json_decode($json);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <!-- These can all be generated with htmlwidgets::saveWidget(..., selfcontained=FALSE) -->
    <script src="../js/htmlwidgets-0.5/htmlwidgets.js"></script>
    <script src="../js/plotlyjs-1.2.1/plotly-latest.min.js"></script>
    <script src="../js/plotly-binding-2.1.0/plotly.js"></script>
</head>
<body>

<div id="htmlwidget_container">
    <div id="htmlwidget-1" style="width:960px;height:500px;" class="plotly"></div>
</div>

<!-- Data and settings for the plot -->
<script type="application/json" data-for="htmlwidget-1"><?php echo(json_encode($data)); ?></script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-1">{"viewer":{"width":450,"height":350,"padding":5,"fill":true},"browser":{"width":960,"height":500,"padding":5,"fill":true}}</script>

</body>
</html>
