Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

1.3 KB
Raw Blame
{% extends "_base.html" %}
{% import "_tables.html" as tables %}
{% set breadcrumbs = [('Stats', url_for('stats')), ('Charts', None)] %}
{% block title %}Charts{% endblock %}
{% block content -%}
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.7.0.min.js"
        crossorigin="anonymous"></script>

<p>Plant data from before 2021-01-11 is backfilled from Taginfo and has no source.
    Granular data was intermittently sampled between 2021 and 2025.</p>

<h3>Lines</h3>
  <div class="chart" id="lines_plot"></div>

<h3>Plants</h3>
  <div class="chart" id="plants_plot"></div>

<h3>Plant Output</h3>
  <div class="chart" id="output_plot"></div>

<h3>Substations</h3>
  <div class="chart" id="substations_plot"></div>

<script>
    document.addEventListener('DOMContentLoaded', function() {
      var linesItem = JSON.parse('{{lines_plot|safe}}');
      Bokeh.embed.embed_item(linesItem, "lines_plot");

      var plantsItem = JSON.parse('{{plants_plot|safe}}');
      Bokeh.embed.embed_item(plantsItem, "plants_plot");

      var outputItem = JSON.parse('{{output_plot|safe}}');
      Bokeh.embed.embed_item(outputItem, "output_plot");

      var substationItem = JSON.parse('{{substation_plot|safe}}');
      Bokeh.embed.embed_item(substationItem, "substations_plot");
    });
</script>
{% endblock %}