Embed our Calculators

Bill Impact Calculator

Rewiring America provides a pre-built bill impact calculator that you can embed on your website. It uses the Residential Electrification Model API to estimate the energy bill and emissions impacts of electric home upgrades.

A live demo of the calculator is available here.

The calculator's code is open source, under the Apache License 2.0.

Usage

Include the following markup in your page's <head> tag:

Code(html)
<script src="https://embed.rewiringamerica.org/bill-impact-calculator.js"></script> <link rel="stylesheet" type="text/css" href="https://embed.rewiringamerica.org/rewiring-fonts.css" />

Then put the following markup in the body of your page, where you want the calculator to appear:

Code(html)
<rewiring-america-bill-impact-calculator api-key="YOUR_KEY_HERE" />

Be sure to replace YOUR_KEY_HERE with an API key generated on our developer portal homepage. Sign up on our API website to accept the API Terms and Acceptable Use Policy. Contact us to discuss increased rate limits, SLAs, or additional feature requests.

Layout

We recommend making the calculator component take up the entire width of the page, or as close to it as possible. It adapts its layout based on the viewport width, which may result in awkward layouts at some widths if the component is significantly narrower than the viewport.

Customization

There are several supported ways to customize the calculator, including:

  • Changing the language
  • Changing certain colors
  • Receiving JavaScript events on certain actions

Please see the README file in the open-source repo for full details.

Last modified on