├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── environment-dash-3.12.yml ├── requirements.txt └── src ├── .gitkeep ├── __init__.py ├── app.py ├── assets ├── .gitkeep ├── 2024-08-24_11-14-19.gif ├── favicon.ico └── logo_files_forInsideEIAlogopage_bug.svg ├── data └── .gitkeep └── utils ├── .gitkeep ├── __init__.py ├── __pycache__ ├── __init__.cpython-312.pyc └── constants.cpython-312.pyc └── constants.py /.gitignore: -------------------------------------------------------------------------------- 1 | # *.py[ocd] 2 | 3 | # ipython files 4 | **/.ipynb_checkpoints 5 | */.ipynb_checkpoints/* 6 | 7 | # compressed / binary files 8 | *.bz2 9 | *.bzip2 10 | *.dmg 11 | *.gz 12 | *.iso 13 | *.png 14 | *.tar 15 | *.tgz 16 | *.zip 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | *This contribution file was created on 2024-08-29* 2 | [![banner](https://github.com/user-attachments/assets/2fb69506-7b5f-4a95-bebb-a3cb87f1c198)](https://www.eia.gov) 3 | 4 | Welcome to U.S. Energy Information Administration’s (EIA) Contributing Guide for the **dash-benchmark** repository. Thank you for investing your time to our projects! Please read our Code of Conduct which we hold very important to creating a positive environment for contributors. 5 | 6 | To get an overview of an individual project, please see the README.MD file for an individual repository. EIA's main profile README.md can be found [here](https://github.com/EIAgov/EIAgov/blob/main/README.md) and the README.md for the dash-benchmark can be found [here](https://github.com/EIAgov). 7 | 8 | The email address for each Project Team can be found in the README.md and/or CONTRIBUTE.md for each repository. 9 | 10 | EIA will provide written feedback to a contributor for any issue/bug/feature/change expressed. The process and reasons used to reach a decision will be described in each contribution resolution. The goal is to communicate a final decision within 30 days of submission, but larger contributions may require a design review and therefore require longer review periods. 11 | 12 | ## Do you have an issue? Did you find a bug? 13 | Please direct issues or bugs to [EIA-DASH-BENCHMARK-GITHUB@eia.gov](mailto:EIA-DASH-BENCHMARK-GITHUB@eia.gov?subject=[GitHub]%20bug). The EIA dash-benchmark Team will communicate all issues or bugs (status/resolution) via an ISSUES file within each repository. 14 | 15 | If you are unable to find an open issue addressing the problem or bug, please open a new one by emailing [EIA-DASH-BENCHMARK-GITHUB@eia.gov](mailto:EIA-DASH-BENCHMARK-GITHUB@eia.gov?subject=[GitHub]%20issue). Be sure to include a title and clear description, with as much relevant information as possible, and a code sample or an executable test case (e.g., a Minimal Reproducible Example or MRE) demonstrating the expected behavior that is not occurring. 16 | 17 | ## Do you intend to propose a new feature or change an existing one? 18 | Suggest your change by sending an email to EIA-DASH-BENCHMARK-GITHUB@eia.gov. By contributing your code, you agree to license your contribution under the [Apache 2.0](https://github.com/EIAgov/EIAgov/blob/main/LICENSE). 19 | 20 | ## Do you have questions/concerns about the source code? 21 | Ask any question or express any concerns about a project to EIA dash-benchmark Team via EIA-DASH-BENCHMARK-GITHUB@eia.gov. 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2024 U.S. Energy Information Administration 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://img.shields.io/badge/visualization-dash%20App-blue) 2 | ![](https://img.shields.io/badge/Projections-Energy%20Statistics%20and%20Analyses-orange) 3 | ![](https://img.shields.io/badge/Python-3.12-yellow) 4 | ![](https://img.shields.io/badge/Dash->=2.17.1-teal) 5 | [![banner](https://github.com/user-attachments/assets/2fb69506-7b5f-4a95-bebb-a3cb87f1c198)](https://www.eia.gov) 6 | 7 | # *dash-benchmark*, a Dash/Plotly application 8 | ![GitLab downloads](https://img.shields.io/github/downloads/EIAgov/dash-benchmark/total) 9 | ![GitLab forks](https://img.shields.io/github/forks/EIAgov/dash-benchmark?style=social) 10 | ![GitLab Repo stars](https://img.shields.io/github/stars/EIAgov/dash-benchmark?style=social) 11 | 12 | This public app is a fully interactive viz companion to the *Annual Energy Outlook* (AEO) released by the U.S. Energy Information Administration's (EIA) National Energy Modeling System (NEMS). It is not intended to be a live product hosted by EIA but rather an application to increase the transparency of our products to our customers, as well as display the linkages among EIA's many statistical, analytical, and informational products. 13 | 14 | ## Introduction 15 | We project U.S. energy production, consumption, and prices each year in the [*Annual Energy Outlook*](https://www.eia.gov/outlooks/aeo/) (AEO). We produce the AEO on an alternating cycle: in even years, we include complete documentation and several alternative cases, and in odd years, we include limited documentation and fewer alternative cases. Following an even year AEO, we also produce an [*Annual Energy Outlook Retrospective Review*](https://www.eia.gov/outlooks/aeo/retrospective/) (AEO Retrospective) which compares recent history with **Reference** case projections from previous editions of the AEO. The AEO Retrospective shows the relationship between past AEO projections and actual energy indicators from EIA's [*Monthly Energy Review*](https://www.eia.gov/totalenergy/data/monthly/), and it informs discussions about the underlying models. 16 | 17 | This application extends and expands on EIA's Retrospective Reviews. While the *AEO Retrospective Reviews* focus on **Reference** case projections, this new analytic tool supports a wider range of the AEO products and contains a range of cases, and this range explores some of the uncertainty inherent in long-term projections, as part of an effort to enhance transparency of AEO projections, as well as reveal realized values (that is, actual history) for projected data series. Note that we are doing so for a select number of key market indicators, rather than for the more than 16,000 data series produced from a single AEO release. 18 | 19 | Each year’s AEO typically includes **Low and High Economic Growth** cases, **Low and High Oil and Gas Supply** cases, **Low and High Oil Price** cases, and **Low and High Renewables Cost** cases, which could be construed as core side cases for AEO. Past AEOs have also included alternative cases examining the impact of proposed policy changes. For this visualization, the **Actual** case represents observed annual history from the *Monthly Energy Review*. 20 | 21 | ## Description 22 | The dash-benchmark repository explores the results from AEO2005 through AEO2023, using those data series from EIA's retrospective review products that also are available from our Open Data portal. We are committed to free and open data by making it available through our [website](https://www.eia.gov) as well as an [Application Programming Interface (API) and its open data tools](https://www.eia.gov/opendata/). EIA's API is multi-faceted and contains all of this application's time-series data sets organized by the main energy categories. 23 | 24 | ## Getting started 25 | These instructions will get a copy of the project up and running on your local machine for development and testing purposes. 26 | 27 | ### Installing and running (quick start) 28 | 1. Copy the repository https://github.com/EIAgov/dash-benchmark.git 29 | 2. Create a new virtual environment with your preferred tools 30 | 3. Install the dependencies (make certain your preferred virtual environment is activated) or complete as part of step 2 31 | 4. Download the [data in csv format](https://www.eia.gov/outlooks/aeo/retrospective/datafile/eia-aeo-mer-benchmark-nov2024.csv) and place csv file into the ```dash-benchmark\src\data``` folder 32 | 4. Navigate to the ```dash-benchmark\src``` directory with the app.py 33 | 5. Run the dashboard with the terminal command: 34 | 35 | ```powershell 36 | (dash-benchmark-env) $ python app.py 37 | ``` 38 | 39 | To close, first exit out of the browser and then hit ctrl-c twice in the terminal window. 40 | 41 | ### Python Requirements 42 | 43 | *dash-benchmark* runs on **Python version 3.12**. [Install anaconda 3](https://docs.anaconda.com/anaconda/install/) if there is not already a Python distribution installed. You also will need to create a Python virtual environment that runs Python 3.12. We have not tested earlier or later versions of Python but do provide a minimal environment.yml and requirements.txt in the dash-benchmark repository. 44 | 45 | ![](https://img.shields.io/badge/Python-3.12-yellow) 46 | 47 | Also, *dash-benchmark* most importantly requires **Dash version >=2.17.1**. As of version 2.0, Dash no longer supports Python 2. 48 | 49 | The `enviroment-dash-3.12.yml` and `requirements.txt` in the `dash-benchmark` root folder provide lists of Python packages and their versions needed to run *dash-benchmark*. 50 | 51 | Here are some of those key packages: 52 | 53 | ![](https://img.shields.io/badge/dash->=2.17.1-darkgrey) 54 | ![](https://img.shields.io/badge/dash_ag_grid->=31.3.0-darkgrey) 55 | ![](https://img.shields.io/badge/dash_bootstrap_components->=1.6.0-darkgrey) 56 | ![](https://img.shields.io/badge/dash_bootstrap_templates->=1.2.4-darkgrey) 57 | ![](https://img.shields.io/badge/dash_core_components->=2.0.0-darkgrey) 58 | ![](https://img.shields.io/badge/dash_html_components->=2.0.0-darkgrey) 59 | ![](https://img.shields.io/badge/flask->=3.0.3-darkgrey) 60 | ![](https://img.shields.io/badge/gunicorn->=20.0.4-darkgrey) 61 | ![](https://img.shields.io/badge/nodejs->=20.*-darkgrey) 62 | ![](https://img.shields.io/badge/numpy->=2.1.0-darkgrey) 63 | ![](https://img.shields.io/badge/openpyxl->=3.1.2-darkgrey) 64 | ![](https://img.shields.io/badge/pandas->=2.2.2-darkgrey) 65 | ![](https://img.shields.io/badge/pip->=24.2-darkgrey) 66 | 67 | 68 | ### Create an empty virtual environment 69 | 70 | You can use either [conda][conda-env] or [virtualenv][virtualenv] to create an empty virtual environment for development, e.g.: 71 | 72 | ```powershell 73 | $ conda create -n dash-benchmark-env python=3.12 74 | $ conda activate dash-benchmark-env 75 | ``` 76 | [conda-env]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands 77 | [virtualenv]: http://docs.python-guide.org/en/latest/dev/virtualenvs/ 78 | 79 | As an alternative, we provide a yml for creating the virtual environment (see below). As of September 2024 our dependencies have been tested against Python version 3.12. Here are some details on environments. 80 | ### Install requirements - (Windows + Conda) 81 | We suggest your environment reflect these packages. Below is some guidance on creating a conda enviroment from an environment.yml file 82 | 83 | 1. Create a predefined conda environment from a suitable environment.yml file, in our case environment-dash-3.12.yml 84 | ```powershell 85 | $ conda env create -f environment-dash-3.12.yml 86 | ``` 87 | 2. Verify the creation of the "dash-benchmark-env" environment 88 | ```powershell 89 | $ conda info --envs 90 | ``` 91 | If this command is run by an administrator, a list of all environments belonging to all users will be displayed. 92 | 93 | 3. Activate the "dash-benchmark-env" conda environment 94 | ```powershell 95 | $ conda activate dash-benchmark-env 96 | ``` 97 | ### Install requirements - (venv) 98 | Note that the dash-benchmark-env virtual environment is displayed as active. 99 | ```powershell 100 | (dash-benchmark-env) $ pip install -r requirements.txt 101 | ``` 102 | 103 | Dash offers a more extensive description of requirements at their [contribution][dash_contributing] page. 104 | 105 | [dash_contributing]: https://github.com/plotly/dash/blob/dev/CONTRIBUTING.md 106 | 107 | ### Run *dash-benchmark* locally 108 | 109 | First, clone the repository found at [https://github.com/EIAgov/dash-benchmark.git](https://github.com/EIAgov/dash-benchmark.git) 110 | 111 | **After activating the dash-benchmark or another suitable environment** in terminal (MacOS) or command prompt (Windows), navigate inside the `dash-benchmark\src` folder and run the application by typing and executing the following: 112 | 113 | ```powershell 114 | (dash-benchmark-env) $ python app.py 115 | ``` 116 | 117 | A URL with an IP address including `127.0.0.1` should appear that can be copied and pasted in a browser. `127.0.0.1` is the localhost of your local machine, and the `8050` is the port that is specified in the application: 118 | 119 | ``` 120 | Dash is running on http://127.0.0.1:8050/ 121 | 122 | * Serving Flask app 'app' 123 | * Debug mode: on 124 | ``` 125 | 126 | Second, after launching the application, you should see and be able to interact with *dash-benchmark* in the browser. This is only visible to you on your local machine for as long as you are running the script. 127 | 128 | ![](https://img.shields.io/badge/-localhost:8050-black) 129 | 130 | Note that execution may start in your default web browser; however, these starting options may be overridden when executing the 'app.py' on your terminal. That's all for use. 131 | 132 | Lastly, you may also run the app.py file from VS Code and open the IP address. Testing has not been completed with any other IDE other than VS Code. 133 | 134 | ## Screenshots of visualizations at EIA 135 | |**Examples**|**Descriptions**| 136 | |:---:|:---| 137 | | ![Benchmark tab of DataViz](src/assets/2024-08-24_11-14-19.gif "Looping sample"){width=85%} | Shows the relationship between past AEO projections and actual energy indicators.
Fully interactive components (including double-clicking legends) allow selection of data series, cases and range of years, as well as downloading of data and figures. | 138 | --- 139 | 140 | ## Data dictionary 141 | We produce a large volume of statistics and analyses at EIA, most of which are *free to download and use*. To help navigate the data used herein, we provide a small data dictionary of facets on the **Annual Energy Outlook** and **Total Energy** endpoints using EIA's [Open Data](https://www.eia.gov/opendata/browser/) to get users started. 142 | 143 | 144 | |**Series for
Annual Energy
Outlook**1 |**Series for
Total Energy**|**Labels**|**Retrospective
Review
Table
Numbers**2| 145 | |:---|:---|:---|:---:| 146 | |eci_NA_NA_NA_gdp_real_NA_blny09dlr|GDPRVUS|Real gross domestic product|3| 147 | |prce_NA_NA_NA_cr_imco_usa_ndlrpbrl|RAIMUUS|Imported refiner acquisition cost of crude oil (nominal $)|4b| 148 | |cnsm_NA_lfl_NA_tot_NA_usa_millbrlpdy|PATCPUS|Total petroleum and other liquids consumption|5| 149 | |sup_prd_NA_NA_cr_NA_usa_millbrlpdy|PAPRPUS|Domestic crude oil production|6| 150 | |trad_NA_lfl_tot_netimp_NA_usa_millbrlpdy|PANIPUS|Petroleum net imports|7| 151 | |prce_delv_elep_NA_ng_NA_usa_ndlrpmcf|NGEIUUS|Natural gas price, electric power sector (nominal $)|8b| 152 | |cnsm_NA_alls_NA_ng_tot_usa_trlcf|NGTCPUS|Total natural gas consumption|9| 153 | |sup_dpr_NA_NA_ng_tot_usa_trlcf|NGPRPUS|Dry natural gas production|10| 154 | |trad_netimp_NA_NA_ng_NA_usa_trlcf|NGNIPUS|Natural gas net imports|11| 155 | |prce_nom_elep_NA_stc_NA_NA_ndlrpmbtu|CLERDUS|Coal prices to electric generating plants (nominal $)|12b| 156 | |cnsm_NA_NA_NA_cl_NA_NA_millton|CLTCPUS|Total coal consumption|13| 157 | |sup_NA_NA_NA_cl_NA_NA_millton|CLPRPUS|Coal production excluding waste coal|14| 158 | |prce_NA_elep_NA_edu_NA_usa_ncntpkwh|ESTCUUS|Average electricity prices (nominal $)|15b| 159 | |cnsm_NA_elep_NA_els_NA_usa_blnkwh|ESTCPUS|Total electricity sales excluding direct use|16| 160 | |gen_NA_alls_NA_slr_NA_NA_blnkwh|SOETPUS|Solar net generation (all sectors)|17| 161 | |gen_NA_alls_NA_wnd_NA_NA_blnkwh|WYETPUS|Wind net generation (all sectors)|18| 162 | |gen_NA_elep_NA_hyd_cnv_NA_blnkwh|HVETPUS|Conventional hydroelectric power net generation (all sectors)|19| 163 | |gen_NA_elep_tge_cl_NA_usa_blnkwh|CLETPUS|Coal net generation (all sectors)|20| 164 | |gen_NA_elep_tge_ng_NA_usa_blnkwh|NGETPUS|Natural gas net generation (all sectors)|21| 165 | |gen_NA_elep_tge_nup_NA_usa_blnkwh|NUETPUS|Nuclear net generation (all sectors)|22| 166 | |cnsm_enu_ten_NA_tot_NA_NA_qbtu|TETCBUS|Total energy consumption (all sectors)|23| 167 | |cnsm_enu_res_NA_dele_NA_NA_qbtu|TERCBUS less
LORCBUS|Total delivered residential energy consumption|24| 168 | |cnsm_enu_comm_NA_dele_NA_NA_qbtu|TECCBUS less
LOCCBUS|Total delivered commercial energy consumption|25| 169 | |cnsm_enu_idal_NA_dele_NA_NA_qbtu|TEICBUS less
LOICBUS|Total delivered industrial energy consumption|26| 170 | |cnsm_enu_trn_NA_dele_NA_NA_qbtu|TEACBUS less
LOACBUS|Total delivered transportation energy consumption|27| 171 | |emi_co2_NA_NA_NA_NA_NA_millmtco2eq|TETCEUS|Total energy-related carbon dioxide emissions|28| 172 | |iny_NA_NA_NA_ten_NA_NA_thbtupdlrgdp|TETCBUS
devided by
GDPDIUS|Energy intensity|29| 173 | |dmg_pop_NA_NA_NA_NA_NA_mill|TPOPPUS|U.S. Population|NaN| 174 | |eci_indx_NA_NA_gdp_NA_NA_y09eq1d3z|GDPDIUS|Gross domestic product index|NaN| 175 | 176 | --- 177 | 1 Series are used to identify the history and projections in *dash-benchmark*. 178 | 2 Table number taken from the *Annual Energy Outlook Retrospective Review* report released on September 14, 2022. 179 | Notes: For some data series, EIA's Open Data API may have slight naming modifications. For real prices, we provide those series in 2012\$, which requires rebasing nominal dollars to real 2012$. For example, the data series *prce_delv_elep_NA_ng_NA_usa_rdlrpmcf*, *prce_nom_elep_NA_stc_NA_NA_rdlrpmbtu*, and *prce_NA_elep_NA_edu_NA_usa_rcntpkwh* are not found in EIA's Open Data portal, rather these series are computed and stored in our curated comma-seperated values data file for dash-benchmark. All the underlying data is publicly available. 180 | 181 | ## Licenses 182 | The dash-benchmark code, as distributed here, is governed by specific licenses. All EIA projects will be released under Apache 2.0, unless otherwise specifically noted within the project repository. [**Apache 2.0**](https://github.com/EIAgov/EIAgov/blob/main/LICENSE) is a permissive, well-recognized, and popular license, that gives users permission to reuse code for nearly any purpose, including using the code as part of proprietary software. 183 | 184 | ## Getting help 185 | You can direct questions about the dash-benchmark to [EIA dash-benchmark](mailto:EIA-DASH-BENCHMARK-GITHUB@eia.gov?subject=[GitHub]). 186 | 187 | ## Authors and acknowledgment 188 | We are eager to show our appreciation to those who have contributed to the project. 189 | 190 | ### Viz guides (an appreciation for Dash/Plotly) 191 | Although there are many offerings of visualization and dashboarding tools in the digital ecosystem, many of which are used internally and externally for EIA's products, we have initially selected Dash/Plotly for the dash-benchmark. Indeed, each of the digital visualization packages/libraries has a set of rich features. 192 | 193 | Built on top of [Plotly.js](https://github.com/plotly/plotly.js), [React](https://reactjs.org/) and [Flask](https://palletsprojects.com/p/flask/), Dash ties modern UI elements like dropdowns, sliders, and graphs directly to your analytical Python code. Read [their tutorial](https://dash.plotly.com/getting-started). 194 | 195 | - [Docs](https://dash.plotly.com/getting-started): Create your first Dash app in under 5 minutes 196 | 197 | - [dash.gallery](https://dash.gallery): Dash app gallery with Python & R code 198 | 199 | Note that there is a Dash Open Source and Dash Enterprise. Connection to the bigger cloud platforms is [documented by Dash Enterprise](https://plotly.com/dash/big-data-for-python/). 200 | 201 | We found the website [https://hellodash.pythonanywhere.com/](https://hellodash.pythonanywhere.com/) and [https://github.com/AnnMarieW](https://github.com/AnnMarieW) pages that are maintained by Ann Marie Ward to prove useful in generating layouts "out-of-the-box" and avoid unwanted customizations. Much thanks for those packages. 202 | 203 | ### How to contribute 204 | Federal employees, fellow agencies, and members of the public are encouraged to contribute to the success of EIA by sharing feedback and suggestions. Each code repository will have specific guidance on how to engage. You can direct questions about the dash-benchmark repository to [EIA dash-benchmark](mailto:EIA-DASH-BENCHMARK-GITHUB@eia.gov?subject=[GitHub]). 205 | 206 | ## Discussion and development 207 | As part of developing each AEO, EIA schedules working group meetings to gather input from various sectors of the industry. You can find more information on the [AEO Working Groups page](https://www.eia.gov/outlooks/aeo/workinggroup/). 208 | 209 | ## Code Of Conduct 210 | If you wish to engage with us, please review our main [**Code Of Conduct**](https://github.com/EIAgov/EIAgov/blob/main/CODE_OF_CONDUCT.md). 211 | -------------------------------------------------------------------------------- /environment-dash-3.12.yml: -------------------------------------------------------------------------------- 1 | name: dash-benchmark-env 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.12 6 | 7 | # runtime 8 | - dash-bootstrap-components 9 | - numpy 10 | - pandas >=1.2 11 | 12 | # tests 13 | - nodejs 20.* 14 | - openpyxl 15 | 16 | # examples 17 | - flask >=1.0 18 | 19 | # pip dependencies 20 | - pip 21 | - pip: 22 | - dash 23 | - dash-ag-grid 24 | - dash-bootstrap-templates -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | blinker==1.8.2 2 | Brotli==1.1.0 3 | certifi==2024.7.4 4 | cffi==1.17.0 5 | charset-normalizer==3.3.2 6 | click==8.1.7 7 | colorama==0.4.6 8 | dash==2.17.1 9 | dash_ag_grid==31.2.0 10 | dash-bootstrap-components==1.6.0 11 | dash-bootstrap-templates==1.2.4 12 | dash-core-components==2.0.0 13 | dash-html-components==2.0.0 14 | dash-table==5.0.0 15 | et-xmlfile==1.1.0 16 | Flask==3.0.3 17 | h2==4.1.0 18 | hpack==4.0.0 19 | hyperframe==6.0.1 20 | idna==3.8 21 | importlib_metadata==8.4.0 22 | itsdangerous==2.2.0 23 | Jinja2==3.1.4 24 | MarkupSafe==2.1.5 25 | nest_asyncio==1.6.0 26 | numpy==2.1.0 27 | openpyxl==3.1.5 28 | packaging==24.1 29 | pandas==2.2.2 30 | pip==24.2 31 | plotly==5.23.0 32 | pycparser==2.22 33 | PySocks==1.7.1 34 | python-dateutil==2.9.0 35 | pytz==2024.1 36 | requests==2.32.3 37 | retrying==1.3.3 38 | setuptools==72.2.0 39 | six==1.16.0 40 | tenacity==9.0.0 41 | typing_extensions==4.12.2 42 | tzdata==2024.1 43 | urllib3==2.2.2 44 | Werkzeug==3.0.4 45 | wheel==0.44.0 46 | win-inet-pton==1.1.0 47 | zipp==3.20.1 48 | zstandard==0.23.0 -------------------------------------------------------------------------------- /src/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/.gitkeep -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/__init__.py -------------------------------------------------------------------------------- /src/app.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from dash import Dash, dcc, html, Input, Output, State, callback, Patch, clientside_callback 4 | import dash_ag_grid as dag 5 | from dash_bootstrap_templates import ThemeChangerAIO, template_from_url 6 | import dash_bootstrap_components as dbc 7 | import pandas as pd 8 | from pathlib import Path 9 | import plotly.express as px 10 | import plotly.io as pio 11 | import plotly.graph_objs as go 12 | import numpy as np 13 | 14 | from utils.constants import (meta_tags, 15 | find_files, 16 | format_title, 17 | units_dict, 18 | titles_dict, 19 | case_name_labels_dict, 20 | colors_dict, 21 | sources_dict) 22 | 23 | import gc 24 | 25 | 26 | work_dir = Path.cwd() 27 | 28 | # Uncomment below line out to check your working directory 29 | #print(work_dir) 30 | 31 | for path in find_files("eia-aeo-mer-benchmark-nov2024.csv", Path(".")): 32 | dashboard_data_path = path 33 | 34 | 35 | # we setup the data but use find_files to locate the correct input data file 36 | df = pd.read_csv(dashboard_data_path) 37 | 38 | df['edition'] = df['edition'].astype(str) 39 | df = df.iloc[:,1:] 40 | 41 | 42 | # we standardize the data because of case/scenario labeling in EIA API v2 43 | df['case_name'] = df['case_name'].replace( 44 | { 45 | "REF2005": "REFERENCE", 46 | "REF2006": "REFERENCE", 47 | "REF2007": "REFERENCE", 48 | "REF2008": "REFERENCE", 49 | "REF2009": "REFERENCE", 50 | "REF2010R": "REFERENCE", 51 | "REF2010": "REFERENCE", 52 | "REF2011": "REFERENCE", 53 | "REF2012": "REFERENCE", 54 | "REF2013": "REFERENCE", 55 | "REF2014": "REFERENCE", 56 | "REF2015": "REFERENCE", 57 | "REF2016": "REFERENCE", 58 | "REF2017": "REFERENCE", 59 | "REF2018": "REFERENCE", 60 | "REF2019": "REFERENCE", 61 | "REF2020": "REFERENCE", 62 | "REF2021": "REFERENCE", 63 | "REF2022": "REFERENCE", 64 | "REF2023": "REFERENCE", 65 | "REF2025": "REFERENCE", 66 | "HM2010": "HIGHMACRO", 67 | "LM2010": "LOWMACRO", 68 | "HP2010": "HIGHPRICE", 69 | "LP2010": "LOWPRICE", 70 | "HM2011": "HIGHMACRO", 71 | "LM2011": "LOWMACRO", 72 | "HP2011HNO": "HIGHPRICE", 73 | "LP2011LNO": "LOWPRICE", 74 | "HEUR12": "HSHLEUR", 75 | "LEUR12": "LSHLEUR", 76 | "HM2012": "HIGHMACRO", 77 | "LM2012": "LOWMACRO", 78 | "HP2012": "HIGHPRICE", 79 | "LP2012": "LOWPRICE", 80 | }) 81 | 82 | df['case_name_labels'] = df['case_name'].map(case_name_labels_dict) 83 | 84 | 85 | # we focus on certain scenarios or side cases in the review 86 | df = df.loc[df.case_name.isin(['ACTUAL', 'HEUR', 'HIGHMACHIGHZTC', 'HIGHMACLOWZTC', 'HIGHMACRO', 'HIGHOGS', 87 | 'HIGHPRICE', 'HIGHRESOURCE', 'HIGHUPIRA', 'HIGHZTC', 'HM2011', 'HM2012', 88 | 'LOWMACHIGHZTC', 'LOWMACLOWZTC', 89 | 'HP2011HNO', 'HP2012', 'HSHLEUR', 'LEUR12', 'LM2011', 'LM2012', 90 | 'LOWMACRO', 'LOWOGS', 'LOWPRICE', 'LOWRESOURCE', 'LP2011LNO', 'LP2012', 91 | 'LSHLEUR', 'LOWUPIRA', 'LOWZTC', 'NOIRA', 'REFERENCE', 92 | ] 93 | ) 94 | ] 95 | 96 | # sorting helps with later figures 97 | years = np.sort(df.year.unique()) 98 | case_names = df.case_name.unique() 99 | 100 | # stylesheet with the .dbc class to style dcc, DataTable and AG Grid components with a Bootstrap theme 101 | dbc_css = "https://cdn.jsdelivr.net/gh/AnnMarieW/dash-bootstrap-templates/dbc.min.css" 102 | 103 | 104 | app = Dash(__name__, meta_tags=meta_tags, 105 | title='AEO Retrospective Review', 106 | external_stylesheets=[dbc.themes.LUX, dbc.icons.FONT_AWESOME, dbc_css]) 107 | 108 | 109 | color_mode_switch = html.Span( 110 | [ 111 | dbc.Label(className="fa fa-moon", html_for="switch"), 112 | dbc.Switch(id="switch", value=True, className="d-inline-block ms-1", persistence=True), 113 | dbc.Label(className="fa fa-sun", html_for="switch"), 114 | ] 115 | ) 116 | 117 | # The ThemeChangerAIO loads all 52 Bootstrap themed figure templates to plotly.io 118 | theme_controls = html.Div( 119 | [ThemeChangerAIO(aio_id="theme"), color_mode_switch], 120 | className="hstack gap-3 mt-2" 121 | ) 122 | 123 | logo = html.Img(src=r'assets/logo_files_forInsideEIAlogopage_bug.svg', width='60px', alt='U.S. Energy Information Administration logo') 124 | 125 | header = html.H4("Benchmarking EIA's Annual Energy Outlook: a review of select data series", className="bg-primary text-white p-2 mb-2 text-center" 126 | ) 127 | 128 | 129 | grid = dag.AgGrid( 130 | id="grid", 131 | columnDefs=[{"field": i} for i in df.columns], 132 | rowData=df.to_dict("records"), 133 | defaultColDef={"flex": 1, "minWidth": 120, "sortable": True, "resizable": True, "filter": True}, 134 | dashGridOptions={"rowSelection":"multiple"}, 135 | #csvExportParams= {"filename": "help.csv", "prependContent": "Help"}, 136 | ) 137 | 138 | 139 | grid_button = html.Button("Export to csv", id="btn-excel-csv") 140 | 141 | 142 | dropdown = html.Div( 143 | [ 144 | dbc.Label("Select indicator (y-axis)"), 145 | dcc.Dropdown([ 146 | {'label':'imported refiner acquisition cost of crude oil (real 2012$)','value':'PRCE_NA_NA_NA_CR_IMCO_USA_RDLRPBRL'}, 147 | {'label':'imported refiner acquisition cost of crude oil (nominal $)','value':'PRCE_NA_NA_NA_CR_IMCO_USA_NDLRPBRL'}, 148 | {'label':'total petroleum and other liquids consumption','value':'CNSM_NA_LFL_NA_TOT_NA_USA_MILLBRLPDY'}, 149 | {'label':'domestic crude oil production','value':'SUP_PRD_NA_NA_CR_NA_USA_MILLBRLPDY'}, 150 | {'label':'petroleum net imports','value':'TRAD_NA_LFL_TOT_NETIMP_NA_USA_MILLBRLPDY'}, 151 | {'label':'natural gas price (real 2012$), electric power sector','value':'PRCE_DELV_ELEP_NA_NG_NA_USA_RDLRPMCF'}, 152 | {'label':'natural gas price (nominal $), electric power sector','value':'PRCE_DELV_ELEP_NA_NG_NA_USA_NDLRPMCF'}, 153 | {'label':'total natural gas consumption','value':'CNSM_NA_ALLS_NA_NG_TOT_USA_TRLCF'}, 154 | {'label':'dry natural gas production','value':'SUP_DPR_NA_NA_NG_TOT_USA_TRLCF'}, 155 | {'label':'natural gas net imports','value':'TRAD_NETIMP_NA_NA_NG_NA_USA_TRLCF'}, 156 | {'label':'coal prices to electric generating plants (real 2012$)','value':'PRCE_NOM_ELEP_NA_STC_NA_NA_RDLRPMBTU'}, 157 | {'label':'coal prices to electric generating plants (nominal $)','value':'PRCE_NOM_ELEP_NA_STC_NA_NA_NDLRPMBTU'}, 158 | {'label':'total coal consumption','value':'CNSM_NA_NA_NA_CL_NA_NA_MILLTON'}, 159 | {'label':'coal production excluding waste coal','value':'SUP_NA_NA_NA_CL_NA_NA_MILLTON'}, 160 | {'label':'average electricity prices (real 2012$)','value':'PRCE_NA_ELEP_NA_EDU_NA_USA_RCNTPKWH'}, 161 | {'label':'average electricity prices (nominal $)','value':'PRCE_NA_ELEP_NA_EDU_NA_USA_NCNTPKWH'}, 162 | {'label':'total electricity sales excluding direct use','value':'CNSM_NA_ELEP_NA_ELS_NA_USA_BLNKWH'}, 163 | {'label':'solar net generation (all sectors)','value':'GEN_NA_ALLS_NA_SLR_NA_NA_BLNKWH'}, 164 | {'label':'wind net generation (all sectors)','value':'GEN_NA_ALLS_NA_WND_NA_NA_BLNKWH'}, 165 | {'label':'conventional hydroelectric power net generation (all sectors)','value':'GEN_NA_ELEP_NA_HYD_CNV_NA_BLNKWH'}, 166 | {'label':'coal net generation (all sectors)','value':'GEN_NA_ELEP_TGE_CL_NA_USA_BLNKWH'}, 167 | {'label':'natural gas net generation (all sectors)','value':'GEN_NA_ELEP_TGE_NG_NA_USA_BLNKWH'}, 168 | {'label':'nuclear net generation (all sectors)','value':'GEN_NA_ELEP_TGE_NUP_NA_USA_BLNKWH'}, 169 | {'label':'total energy consumption (all sectors)','value':'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU'}, 170 | {'label':'total delivered residential energy consumption','value':'CNSM_ENU_RES_NA_DELE_NA_NA_QBTU'}, 171 | {'label':'total delivered commercial energy consumption','value':'CNSM_ENU_COMM_NA_DELE_NA_NA_QBTU'}, 172 | {'label':'total delivered industrial energy consumption','value':'CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU'}, 173 | {'label':'total delivered transportation energy consumption','value':'CNSM_ENU_TRN_NA_DELE_NA_NA_QBTU'}, 174 | {'label':'total energy-related carbon dioxide emissions','value':'EMI_CO2_NA_NA_NA_NA_NA_MILLMTCO2EQ'}, 175 | {'label':'energy intensity','value':'INY_NA_NA_NA_TEN_NA_NA_THBTUPDLRGDP'}], 176 | "PRCE_NA_NA_NA_CR_IMCO_USA_RDLRPBRL", 177 | id="indicator", 178 | clearable=False, 179 | ), 180 | ], 181 | className="mb-4", 182 | ) 183 | 184 | 185 | checklist = html.Div( 186 | [ 187 | dbc.Label("Select AEO Case or MER Actual"), 188 | dcc.Dropdown([ 189 | {'label':'Actual','value':'ACTUAL'}, 190 | {'label':'Oil and Gas: High Shale EUR','value':'HSHLEUR'}, 191 | {'label':'High Macro and High Zero-Carbon Technology Cost','value':'HIGHMACHIGHZTC'}, 192 | {'label':'High Macro and Low Zero-Carbon Technology Cost','value':'HIGHMACLOWZTC'}, 193 | {'label':'High Economic Growth','value':'HIGHMACRO'}, 194 | {'label':'High Oil and Gas Supply','value':'HIGHOGS'}, 195 | {'label':'High Oil Price','value':'HIGHPRICE'}, 196 | {'label':'Oil and Gas: High Oil and Gas Resource','value':'HIGHRESOURCE'}, 197 | {'label':'High Uptake of Inflation Reduction Act','value':'HIGHUPIRA'}, 198 | {'label':'High Zero-Carbon Technology Cost','value':'HIGHZTC'}, 199 | {'label':'Low Macro and High Zero-Carbon Technology Cost','value':'LOWMACHIGHZTC'}, 200 | {'label':'Low Macro and Low Zero-Carbon Technology Cost','value':'LOWMACLOWZTC'}, 201 | {'label':'Oil and Gas: Low Shale EUR','value':'LSHLEUR'}, 202 | {'label':'Low Economic Growth','value':'LOWMACRO'}, 203 | {'label':'Low Oil and Gas Supply','value':'LOWOGS'}, 204 | {'label':'Oil and Gas: Low Oil and Gas Resource','value':'LOWRESOURCE'}, 205 | {'label':'Low Oil Price','value':'LOWPRICE'}, 206 | {'label':'Low Uptake of Inflation Reduction Act','value':'LOWUPIRA'}, 207 | {'label':'Low Zero-Carbon Technology Cost','value':'LOWZTC'}, 208 | {'label':'No Inflation Reduction Act','value':'NOIRA'}, 209 | {'label':'Reference case','value':'REFERENCE'}], 210 | case_names, 211 | id="case_names", 212 | clearable=False, 213 | multi=True, 214 | ) 215 | ], 216 | className="mb-4", 217 | ) 218 | 219 | slider = html.Div( 220 | [ 221 | dbc.Label("Select Years"), 222 | dcc.RangeSlider( 223 | years[0], 224 | years[-1], 225 | 1, 226 | id="years", 227 | marks=None, 228 | tooltip={"placement": "bottom", "always_visible": True}, 229 | value=[years[21], years[-1]], 230 | className="p-0", 231 | ), 232 | ], 233 | className="mb-4", 234 | ) 235 | 236 | 237 | theme_colors = [ 238 | "primary", 239 | "secondary", 240 | "success", 241 | "warning", 242 | "danger", 243 | "info", 244 | "light", 245 | "dark", 246 | "link", 247 | ] 248 | 249 | 250 | colors = html.Div( 251 | [dbc.Button(f"{color}", color=f"{color}", size="sm") for color in theme_colors] 252 | ) 253 | 254 | 255 | colors = html.Div(["Theme Colors:", colors], className="mt-2") 256 | colors = html.Div(f" ") 257 | 258 | 259 | controls = dbc.Card( 260 | [dropdown, checklist, slider], 261 | body=True, 262 | ) 263 | citation_controls = html.Div( 264 | [], id="fig-citation", className="mt-2") 265 | citation_controls = html.Div([citation_controls, html.A("Link to EIA's open data API for Annual Energy Outlooks ", href='https://www.eia.gov/opendata/browser/aeo', target="_blank"), 266 | html.Div([html.A("Link to EIA's open data API for Monthly Energy Reviews", href='https://www.eia.gov/opendata/browser/total-energy', target="_blank")]), 267 | ]) 268 | """ 269 | citations = dbc.Card( 270 | [citation], 271 | body=True, 272 | ) 273 | """ 274 | 275 | 276 | tab1 = dbc.Tab([dcc.Graph(id="line-chart", figure=px.line(template="simple_white"), style={'height': '85vh'})], label="Line Chart") 277 | tab2 = dbc.Tab([dcc.Graph(id="scatter-chart", figure=px.scatter(template="simple_white"), style={'height': '85vh'})], label=" ", disabled=True) 278 | tab3 = dbc.Tab([grid,grid_button], label="Grid", className="p-4") 279 | tabs = dbc.Card(dbc.Tabs([tab1, tab3, tab2])) 280 | 281 | 282 | app.layout = dbc.Container( 283 | [ 284 | header, 285 | dbc.Row([ 286 | dbc.Col([ 287 | controls, 288 | # ************************************ 289 | # Uncomment line below when running locally! 290 | # ************************************ 291 | theme_controls 292 | ], width=3), 293 | dbc.Col([tabs, citation_controls], width=9), 294 | ]), 295 | ], 296 | fluid=True, 297 | #style={"height": "100vh"}, 298 | className="dbc dbc-ag-grid", 299 | ) 300 | 301 | 302 | @callback( 303 | Output("line-chart", "figure" ), 304 | Output("scatter-chart", "figure"), 305 | Output("grid", "dashGridOptions"), 306 | Output("fig-citation", component_property='children'), 307 | Input("indicator", "value"), 308 | Input("case_names", "value"), 309 | Input("years", "value"), 310 | State(ThemeChangerAIO.ids.radio("theme"), "value"), 311 | State("switch", "value"), 312 | ) 313 | def update(indicator, case_name, yrs, theme, color_mode_switch_on): 314 | 315 | # Defining all the conditions inside a function 316 | def conditions_(x): 317 | if x=="2024": 318 | return fig.update_traces(line_color='purple') 319 | elif x=="2021": 320 | return fig.update_traces(line_color='green') 321 | else: 322 | return None 323 | 324 | def conditions_prefix(x): 325 | if x=="PRCE": 326 | return fig.update_layout(yaxis=dict(tickprefix= '$', separatethousands= True, tickfont_size=26)) 327 | else: 328 | return None 329 | 330 | 331 | if case_name == [] or indicator is None: 332 | return {}, {}, {} 333 | 334 | theme_name = template_from_url(theme) 335 | template_name = theme_name if color_mode_switch_on else theme_name + "_dark" 336 | 337 | dff = df[df.year.between(yrs[0], yrs[1])] 338 | dff = dff[dff.case_name.isin(case_name)] 339 | dff['PER_CAPITA'] = dff[indicator].div(dff['DMG_POP_NA_NA_NA_NA_NA_MILL']) 340 | dff['GDP_PER_CAPITA'] = (dff["ECI_NA_NA_NA_GDP_REAL_NA_BLNY09DLR"].div(dff['DMG_POP_NA_NA_NA_NA_NA_MILL'])).mul(1000) 341 | test_units = indicator.rsplit('_',1)[-1] 342 | 343 | fig = px.line( 344 | dff.sort_values(by=["edition","case_name_labels"],ascending=True), 345 | x="year", 346 | y=indicator, 347 | color="edition", 348 | line_group="case_name_labels", 349 | #line_dash="case_name", 350 | labels={"edition": "edition", "case_name_labels": "case"}, 351 | title=f"{titles_dict.get(indicator,'title not found')}
({units_dict.get(test_units,'units not found')})", 352 | template=template_name, 353 | ) 354 | 355 | fig.for_each_trace( 356 | lambda trace: trace.update(line_color="black", line_width=4) if trace.legendgroup == "2024" else (),) 357 | 358 | fig.update_layout(yaxis=dict(title=None, tickfont_size=26), 359 | xaxis=dict(tickfont_size=26, automargin=True), 360 | legend=dict(font=dict(size=26,)), title=dict(font=dict(size=26)), 361 | paper_bgcolor='rgba(0, 0, 0, 0)', 362 | plot_bgcolor='rgba(0, 0, 0, 0)', 363 | modebar=dict( 364 | orientation='h', 365 | bgcolor='#ffffff', 366 | color='red', 367 | activecolor='red', 368 | ) 369 | ) 370 | 371 | 372 | conditions_prefix(indicator[:4]) 373 | 374 | fig.update_xaxes( 375 | mirror=False, 376 | ticks='outside', 377 | showline=True, 378 | linecolor='black', 379 | linewidth=2, 380 | gridcolor='lightgrey', 381 | title_font = {"size": 26}, 382 | title_standoff = 1 383 | ) 384 | fig.update_yaxes( 385 | mirror=True, 386 | ticks=None, 387 | showline=False, 388 | linecolor='black', 389 | gridcolor='lightgrey' 390 | ) 391 | fig.update_traces(selector=dict(legendgroup="2005"), line=dict(color=colors_dict.get('dhs-dark-gray-70'))) 392 | fig.update_traces(selector=dict(legendgroup="2006"), line=dict(color=colors_dict.get('dhs-dark-gray-60'))) 393 | fig.update_traces(selector=dict(legendgroup="2007"), line=dict(color=colors_dict.get('dhs-dark-gray-40'))) 394 | fig.update_traces(selector=dict(legendgroup="2008"), line=dict(color=colors_dict.get('dhs-dark-gray-30'))) 395 | fig.update_traces(selector=dict(legendgroup="2009"), line=dict(color=colors_dict.get('dhs-dark-gray-20'))) 396 | fig.update_traces(selector=dict(legendgroup="2010"), line=dict(color=colors_dict.get('dhs-green-70'))) 397 | 398 | fig.update_traces(selector=dict(legendgroup="2011"), line=dict(color=colors_dict.get('dhs-green-60'))) 399 | fig.update_traces(selector=dict(legendgroup="2012"), line=dict(color=colors_dict.get('dhs-green-40'))) 400 | fig.update_traces(selector=dict(legendgroup="2013"), line=dict(color=colors_dict.get('dhs-green-30'))) 401 | fig.update_traces(selector=dict(legendgroup="2014"), line=dict(color=colors_dict.get('dhs-green-20'))) 402 | 403 | fig.update_traces(selector=dict(legendgroup="2015"), line=dict(color=colors_dict.get('dhs-red-70'))) 404 | fig.update_traces(selector=dict(legendgroup="2016"), line=dict(color=colors_dict.get('dhs-red-60'))) 405 | fig.update_traces(selector=dict(legendgroup="2017"), line=dict(color=colors_dict.get('dhs-red-40'))) 406 | fig.update_traces(selector=dict(legendgroup="2018"), line=dict(color=colors_dict.get('dhs-red-30'))) 407 | fig.update_traces(selector=dict(legendgroup="2019"), line=dict(color=colors_dict.get('dhs-red-20'))) 408 | fig.update_traces(selector=dict(legendgroup="2020"), line=dict(color=colors_dict.get('dhs-light-blue-70'))) 409 | fig.update_traces(selector=dict(legendgroup="2021"), line=dict(color=colors_dict.get('dhs-light-blue-60'))) 410 | fig.update_traces(selector=dict(legendgroup="2022"), line=dict(color=colors_dict.get('dhs-light-blue-40'))) 411 | fig.update_traces(selector=dict(legendgroup="2023"), line=dict(color=colors_dict.get('dhs-light-blue-30'))) 412 | 413 | 414 | textString = f"{sources_dict.get(indicator,'not found')}. Note: Dollars are adjusted to 2012$, unless noted otherwise." 415 | 416 | # Add the annotation text using paper reference. See: 417 | # https://stackoverflow.com/questions/76046269/how-to-align-annotation-to-the-edge-of-whole-figure-in-plotly 418 | # https://community.plotly.com/t/interactive-app-to-explain-legend-and-annotations-positioning/65160 419 | """ 420 | fig.add_annotation( 421 | text = textString, 422 | font = { 423 | 'size' : 14, 424 | 'color': 'gray', 425 | }, 426 | xref = "paper", 427 | yref = "paper", 428 | x = -0.01, 429 | y = -0.09, #yCord - yOffset, 430 | align='left', 431 | showarrow = False 432 | ) 433 | """ 434 | 435 | 436 | fig_scatter = px.scatter( 437 | dff[(dff.edition >= "2023")].sort_values(by=["year","edition"]), 438 | x="GDP_PER_CAPITA", 439 | y=indicator, 440 | color="case_name_labels", 441 | color_discrete_map={ 442 | 'High Macro and High Zero-Carbon Technology Cost': "#3182bd", 443 | 'High Macro and Low Zero-Carbon Technology Cost': "#31a354", 444 | 'High Economic Growth': "#e6550d", 445 | 'High Oil and Gas Supply': "#756bb1", 446 | 'High Oil Price': "#de2d26", 447 | 'High Uptake of Inflation Reduction Act': "#6e40aa", 448 | 'High Zero-Carbon Technology Cost': "#80cdc1", 449 | 'Low Macro and High Zero-Carbon Technology Cost': "#9ecae1", 450 | 'Low Macro and Low Zero-Carbon Technology Cost': "#a1d99b", 451 | 'Low Economic Growth': "#fdae6b", 452 | 'Low Oil and Gas Supply': "#bcbddc", 453 | 'Low Oil Price': "#fc9272", 454 | 'Low Uptake of Inflation Reduction Act': "#aff05b", 455 | 'Low Zero-Carbon Technology Cost': "#28ea8d", 456 | 'No Inflation Reduction Act': "#a6611a", 457 | 'Reference case': "#dfc27d", 458 | 'Actual': "black", 459 | }, 460 | symbol="edition", 461 | log_x=True, 462 | labels={indicator: f"{titles_dict.get(indicator,'title not found')} ", "GDP_PER_CAPITA": "real GDP per capita", "edition": "edition", "case_name_labels": "case"}, 463 | size_max=60, 464 | template=template_name, 465 | title=f"{titles_dict.get(indicator,'title not found')} vs. Real GDP per capita
({units_dict.get(test_units,'units not found')})", 466 | ) 467 | 468 | 469 | fig_scatter.update_traces(textposition="bottom right") 470 | fig_scatter.update_layout(yaxis=dict(title=None, exponentformat= None, separatethousands= True, tickfont_size=26), 471 | xaxis=dict(tickprefix= '$', separatethousands= True, tickfont_size=26) ) 472 | fig_scatter.for_each_trace( 473 | lambda trace: trace.update(marker=dict(size=10, color="black"), line=dict(width=2, color="DarkSlateGrey")) if trace.name == "Actual, 2024" else 474 | (trace.update(marker=dict(size=8), line=dict(width=2, color="DarkSlateGrey"))),) 475 | fig_scatter.update_xaxes(showline=True, linewidth=2, linecolor='black') 476 | 477 | 478 | # Add the annotation text using paper reference. See: 479 | # https://stackoverflow.com/questions/76046269/how-to-align-annotation-to-the-edge-of-whole-figure-in-plotly 480 | # https://community.plotly.com/t/interactive-app-to-explain-legend-and-annotations-positioning/65160 481 | fig_scatter.add_annotation( 482 | text = textString, 483 | font = { 484 | 'size' : 14, 485 | #'family' : 'Times New Roman', 486 | 'color': 'gray', 487 | }, 488 | xref = "paper", 489 | yref = "paper", 490 | x = -0.01, 491 | y = -0.15, 492 | align='left', 493 | showarrow = False 494 | ) 495 | 496 | 497 | grid_filter = f"{case_name}.includes(params.data.case_name) && params.data.year >= {yrs[0]} && params.data.year <= {yrs[1]}" 498 | dashGridOptions = { 499 | "isExternalFilterPresent": {"function": "true"}, 500 | "doesExternalFilterPass": {"function": grid_filter}, 501 | } 502 | fig_scatter.update_traces(visible='legendonly', selector=dict(name="d")) 503 | 504 | return fig, fig_scatter, dashGridOptions, textString 505 | 506 | 507 | # updates the Bootstrap global light/dark color mode 508 | clientside_callback( 509 | """ 510 | switchOn => { 511 | document.documentElement.setAttribute('data-bs-theme', switchOn ? 'light' : 'dark'); 512 | return window.dash_clientside.no_update 513 | } 514 | """, 515 | Output("switch", "id"), 516 | Input("switch", "value"), 517 | ) 518 | 519 | clientside_callback( 520 | """function (n) { 521 | if (n) { 522 | dash_ag_grid.getApi("grid").exportDataAsCsv(); 523 | } 524 | return dash_clientside.no_update 525 | }""", 526 | Output("btn-excel-csv", "n_clicks"), 527 | Input("btn-excel-csv", "n_clicks"), 528 | prevent_initial_call=True 529 | ) 530 | 531 | 532 | # This callback makes updating figures with the new theme much faster 533 | @callback( 534 | Output("line-chart", "figure", allow_duplicate=True ), 535 | Output("scatter-chart", "figure", allow_duplicate=True), 536 | Input(ThemeChangerAIO.ids.radio("theme"), "value"), 537 | Input("switch", "value"), 538 | prevent_initial_call=True 539 | ) 540 | def update_template(theme, color_mode_switch_on): 541 | theme_name = template_from_url(theme) 542 | template_name = theme_name if color_mode_switch_on else theme_name + "_dark" 543 | 544 | patched_figure = Patch() 545 | # When using Patch() to update the figure template, you must use the figure template dict 546 | # from plotly.io and not just the template name 547 | patched_figure["layout"]["template"] = pio.templates[template_name] 548 | return patched_figure, patched_figure 549 | 550 | 551 | if __name__ == "__main__": 552 | app.run_server(debug=True) -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/2024-08-24_11-14-19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/assets/2024-08-24_11-14-19.gif -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/assets/logo_files_forInsideEIAlogopage_bug.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 14 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/data/.gitkeep -------------------------------------------------------------------------------- /src/utils/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/utils/.gitkeep -------------------------------------------------------------------------------- /src/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/utils/__init__.py -------------------------------------------------------------------------------- /src/utils/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/utils/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /src/utils/__pycache__/constants.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EIAgov/dash-benchmark/dfe44dbd34c895237db7b5f9050c350a3e245032/src/utils/__pycache__/constants.cpython-312.pyc -------------------------------------------------------------------------------- /src/utils/constants.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from numpy import nan 4 | from pathlib import Path 5 | 6 | 7 | def format_title(title, subtitle=None, subtitle_font_size=14): 8 | title = f'{title}' 9 | if not subtitle: 10 | return title 11 | subtitle = f'({subtitle})' 12 | return f'{title}
{subtitle}' 13 | 14 | def find_files(name: str, path: Path): 15 | # if path is not a directory we do not need to iterate 16 | if all((path, path.is_file(), name in path.name)): 17 | yield path 18 | 19 | # if path is a folder iterate over all contained folders and files 20 | elif path and path.is_dir(): 21 | for p in path.iterdir(): 22 | # "yield from" is required for recursive generator functions (our find_files) 23 | yield from find_files(name=name, path=p.absolute()) 24 | 25 | indicators = [ 26 | 'PRCE_NA_NA_NA_CR_IMCO_USA_RDLRPBRL', 27 | 'PRCE_NA_NA_NA_CR_IMCO_USA_NDLRPBRL', 28 | 'CNSM_NA_LFL_NA_TOT_NA_USA_MILLBRLPDY', 29 | 'SUP_PRD_NA_NA_CR_NA_USA_MILLBRLPDY', 30 | 'TRAD_NA_LFL_TOT_NETIMP_NA_USA_MILLBRLPDY', # trad_NA_lfl_NA_netimp_netimp_usa_millbrlpdy 31 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_RDLRPMCF', 32 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_NDLRPMCF', 33 | 'CNSM_NA_ALLS_NA_NG_TOT_USA_TRLCF', 34 | 'SUP_DPR_NA_NA_NG_TOT_USA_TRLCF', 35 | 'TRAD_NETIMP_NA_NA_NG_NA_USA_TRLCF', 36 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_RDLRPMBTU', 37 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_NDLRPMBTU', 38 | 'CNSM_NA_NA_NA_CL_NA_NA_MILLTON', 39 | 'SUP_NA_NA_NA_CL_NA_NA_MILLTON', 40 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_RCNTPKWH', 41 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_NCNTPKWH', 42 | 'CNSM_NA_ELEP_NA_ELS_NA_USA_BLNKWH', # GEN_NA_ELEP_NAG_NAG_NA_USA_BLNKWH 43 | 'GEN_NA_ALLS_NA_SLR_NA_NA_BLNKWH', 44 | 'GEN_NA_ALLS_NA_WND_NA_NA_BLNKWH', 45 | 'GEN_NA_ELEP_NA_HYD_CNV_NA_BLNKWH', 46 | 'GEN_NA_ELEP_TGE_CL_NA_USA_BLNKWH', 47 | 'GEN_NA_ELEP_TGE_NG_NA_USA_BLNKWH', 48 | 'GEN_NA_ELEP_TGE_NUP_NA_USA_BLNKWH', 49 | 'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU', 50 | 'CNSM_ENU_RES_NA_DELE_NA_NA_QBTU', 51 | 'CNSM_ENU_COMM_NA_DELE_NA_NA_QBTU', 52 | 'CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU', 53 | 'CNSM_ENU_TRN_NA_DELE_NA_NA_QBTU', 54 | 'EMI_CO2_NA_NA_NA_NA_NA_MILLMTCO2EQ', 55 | 'INY_NA_NA_NA_TEN_NA_NA_THBTUPDLRGDP', 56 | ] 57 | 58 | indicators_labels = [ 59 | 'Imported refiner acquisition cost of crude oil (real 2012$)', 60 | 'Imported refiner acquisition cost of crude oil (nominal)', 61 | 'Total petroleum and other liquids consumption', 62 | 'Domestic crude oil production', 63 | 'Petroleum net imports', 64 | 'Natural gas price, electric power sector (real 2012$)', 65 | 'Natural gas price, electric power sector (nominal)', 66 | 'Total natural gas consumption', 67 | 'Dry natural gas production', 68 | 'Natural gas net imports', 69 | 'Coal prices to electric generating plants (real 2012$)', 70 | 'Coal prices to electric generating plants (nominal)', 71 | 'Total coal consumption', 72 | 'Coal production excluding waste coal', 73 | 'Average electricity prices (real 2012$)', 74 | 'Average electricity prices (nominal)', 75 | 'Total electricity sales excluding direct use', 76 | 'Solar net generation from all sectors', 77 | 'Wind net generation from all sectors', 78 | 'Conventional hydroelectric power net generation from all sectors', 79 | 'Coal net generation from all sectors', 80 | 'Natural gas net generation from all sectors', 81 | 'Nuclear net generation from all sectors', 82 | 'Total energy consumption from all sectors', 83 | 'Total delivered residential energy consumption', 84 | 'Total delivered commercial energy consumption', 85 | 'Total delivered industrial energy consumption', 86 | 'Total delivered transportation energy consumption', 87 | 'Total energy-related carbon dioxide emissions', 88 | 'Energy intensity', 89 | ] 90 | 91 | titles_dict = dict(zip(indicators,indicators_labels)) 92 | 93 | meta_tags = [ 94 | { 95 | "name": "author", 96 | "content": "U.S. Energy Information Administration (EIA)", 97 | }, 98 | { 99 | "name": "subject", 100 | "content": "official energy statistics, data, analysis and forecasting", 101 | }, 102 | { 103 | "name": "description", 104 | "content": "Energy Information Administration - EIA - Official Energy Statistics from the U.S. Government", 105 | }, 106 | { 107 | "name":"agency", 108 | "content": "EIA - Energy Information Administration", 109 | }, 110 | { 111 | "name": "viewport", 112 | "content": "width=device-width, initial-scale=1", 113 | }, 114 | { 115 | "property": "og:type", 116 | "content": "website", 117 | }, 118 | { 119 | "property": "og:title", 120 | "content": "EIA Benchmarking tool - U.S. Energy Information Administration (EIA)", 121 | }, 122 | { 123 | "property": "og:description", 124 | "content": " ", 125 | }, 126 | { 127 | "property": "og:image", 128 | "content": "https://www.eia.gov/about/images/eiabuglogo.jpg", 129 | }, 130 | { 131 | "name": "robots", 132 | "content": "all", 133 | }, 134 | { 135 | "property": "twitter:title", 136 | "content": "Tools to make life easier", 137 | }, 138 | { 139 | "property": "twitter:description", 140 | "content": "Automate repetitive data analysis tasks and perform predictions and optimizations", 141 | }, 142 | { 143 | "property": "twitter:image", 144 | "content": " ", 145 | }, 146 | ] 147 | 148 | units_dict = { 149 | 'BLNKWH': 'billion kilowatthours', # keep 150 | 'MILLBRLPDY': 'million barrels per day', # keep 151 | 'MILLMTCO2EQ': 'mmtco2eq', # keep 152 | 'MILLTON': 'million short tons', # keep 153 | 'NCNTPKWH': 'nominal cents per kilowatthour', # keep 154 | 'NDLRPBRL': 'nominal dollars per barrel', # keep 155 | 'NDLRPMCF': 'nominal dollars per thousand cubic feet', # keep 156 | 'NDLRPMBTU': 'nominal dollars per thousand Btu', # keep 157 | 'RCNTPKWH': 'real cents per kilowatthour in 2012$', # keep 158 | 'RDLRPBRL': 'real dollars per barrel in 2012$', # keep 159 | 'RDLRPMCF': 'real dollars per thousand cubic feet in 2012$', # keep 160 | 'RDLRPMBTU': 'real dollars per thousand Btu in 2012$', # keep 161 | 'QBTU': 'quadrillion Btu', # keep 162 | 'THBTUPDLRGDP': 'thousand Btu per dollar GDP', # keep 163 | 'TRLCF': 'trillion cubic feet', # keep 164 | } 165 | 166 | case_name_labels_dict = { 167 | 'ACTUAL': 'Actual', 168 | 'HEUR12': 'Oil and Gas: High Shale EUR', 169 | 'HIGHMACHIGHZTC': 'High Macro and High Zero-Carbon Technology Cost', 170 | 'HIGHMACLOWZTC': 'High Macro and Low Zero-Carbon Technology Cost', 171 | 'HIGHMACRO': 'High Economic Growth', 172 | 'HIGHOGS': 'High Oil and Gas Supply', 173 | 'HIGHPRICE': 'High Oil Price', 174 | 'HIGHRESOURCE': 'Oil and Gas: High Oil and Gas Resource', 175 | 'HIGHUPIRA': 'High Uptake of Inflation Reduction Act', 176 | 'HIGHZTC': 'High Zero-Carbon Technology Cost', 177 | 'HM2011': 'High Economic Growth', 178 | 'HM2012': 'High Economic Growth', 179 | 'HP2011HNO': 'High Oil Price', 180 | 'HP2012': 'High Oil Price', 181 | 'HSHLEUR': 'Oil and Gas: High Shale EUR', 182 | 'LEUR12': 'Oil and Gas: Low Shale EUR', 183 | 'LM2011': 'Low Economic Growth', 184 | 'LM2012': 'Low Economic Growth', 185 | 'LOWMACHIGHZTC': 'Low Macro and High Zero-Carbon Technology Cost', 186 | 'LOWMACLOWZTC': 'Low Macro and Low Zero-Carbon Technology Cost', 187 | 'LOWMACRO': 'Low Economic Growth', 188 | 'LOWOGS': 'Low Oil and Gas Supply', 189 | 'LOWPRICE': 'Low Oil Price', 190 | 'LOWRESOURCE': 'Oil and Gas: Low Oil and Gas Resource', 191 | 'LP2011LNO': 'Low Oil Price', 192 | 'LP2012': 'Low Oil Price', 193 | 'LSHLEUR': 'Oil and Gas: Low Shale EUR', 194 | 'LOWUPIRA': 'Low Uptake of Inflation Reduction Act', 195 | 'LOWZTC': 'Low Zero-Carbon Technology Cost', 196 | 'NOIRA': 'No Inflation Reduction Act', 197 | 'REFERENCE': 'Reference case', 198 | } 199 | 200 | sources_dict = { 201 | 'ECI_NA_NA_NA_GDP_REAL_NA_BLNY09DLR': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: GDPRVUS; projections: Annual Energy Outlook, case projections from various editions", 202 | 'PRCE_NA_NA_NA_CR_IMCO_USA_NDLRPBRL': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: RAIMUUS; projections: Annual Energy Outlook, case projections from various editions", 203 | 'PRCE_NA_NA_NA_CR_IMCO_USA_RDLRPBRL': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: RAIMUUS; projections: Annual Energy Outlook, case projections from various editions", 204 | 'CNSM_NA_LFL_NA_TOT_NA_USA_MILLBRLPDY': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: PATCPUS; projections: Annual Energy Outlook, case projections from various editions", 205 | 'SUP_PRD_NA_NA_CR_NA_USA_MILLBRLPDY': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: PAPRPUS; projections: Annual Energy Outlook, case projections from various editions", 206 | 'TRAD_NA_LFL_TOT_NETIMP_NA_USA_MILLBRLPDY': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: PANIPUS; projections: Annual Energy Outlook, case projections from various editions", 207 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_NDLRPMCF': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGEIUUS; projections: Annual Energy Outlook, case projections from various editions", 208 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_RDLRPMCF': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGEIUUS; projections: Annual Energy Outlook, case projections from various editions", 209 | 'CNSM_NA_ALLS_NA_NG_TOT_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGTCPUS; projections: Annual Energy Outlook, case projections from various editions", 210 | 'SUP_DPR_NA_NA_NG_TOT_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGPRPUS; projections: Annual Energy Outlook, case projections from various editions", 211 | 'TRAD_NETIMP_NA_NA_NG_NA_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGNIPUS; projections: Annual Energy Outlook, case projections from various editions", 212 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_NDLRPMBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: CLERDUS; projections: Annual Energy Outlook, case projections from various editions", 213 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_RDLRPMBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: CLERDUS; projections: Annual Energy Outlook, case projections from various editions", 214 | 'CNSM_NA_NA_NA_CL_NA_NA_MILLTON': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: CLTCPUS; projections: Annual Energy Outlook, case projections from various editions", 215 | 'SUP_NA_NA_NA_CL_NA_NA_MILLTON': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: CLPRPUS; projections: Annual Energy Outlook, case projections from various editions", 216 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_NCNTPKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: ESTCUUS; projections: Annual Energy Outlook, case projections from various editions", 217 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_RCNTPKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: ESTCUUS; projections: Annual Energy Outlook, case projections from various editions", 218 | 'CNSM_NA_ELEP_NA_ELS_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: ESTCPUS; projections: Annual Energy Outlook, case projections from various editions", 219 | 'GEN_NA_ALLS_NA_SLR_NA_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: SOETPUS; projections: Annual Energy Outlook, case projections from various editions", 220 | 'GEN_NA_ALLS_NA_WND_NA_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: WYETPUS; projections: Annual Energy Outlook, case projections from various editions", 221 | 'GEN_NA_ELEP_NA_HYD_CNV_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: HVETPUS; projections: Annual Energy Outlook, case projections from various editions", 222 | 'GEN_NA_ELEP_TGE_CL_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: CLETPUS; projections: Annual Energy Outlook, case projections from various editions", 223 | 'GEN_NA_ELEP_TGE_NG_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NGETPUS; projections: Annual Energy Outlook, case projections from various editions", 224 | 'GEN_NA_ELEP_TGE_NUP_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: NUETPUS; projections: Annual Energy Outlook, case projections from various editions", 225 | 'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 226 | 'EMI_CO2_NA_NA_NA_NA_NA_MILLMTCO2EQ': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TETCEUS; projections: Annual Energy Outlook, case projections from various editions", 227 | 'INY_NA_NA_NA_TEN_NA_NA_THBTUPDLRGDP': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 228 | 'DMG_POP_NA_NA_NA_NA_NA_MILL': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TPOPPUS; projections: Annual Energy Outlook, case projections from various editions", 229 | 'ECI_INDX_NA_NA_GDP_NA_NA_Y09EQ1D3Z': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: GDPDIUS; projections: Annual Energy Outlook, case projections from various editions", 230 | 'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 231 | 'CNSM_ENU_RES_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TERCBUS and LORCBUS; projections: Annual Energy Outlook, case projections from various editions", 232 | 'CNSM_ENU_COMM_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TECCBUS and LOCCBUS; projections: Annual Energy Outlook, case projections from various editions", 233 | 'CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TEICBUS and LOICBUS; projections: Annual Energy Outlook, case projections from various editions", 234 | 'CNSM_ENU_TRN_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data Application Programming Interface (API) (accessed June 2024; https://www.eia.gov/opendata/browser/total-energy), annual series: TEACBUS and LOACBUS; projections: Annual Energy Outlook, case projections from various editions", 235 | } 236 | 237 | sources_dict_old = { 238 | 'ECI_NA_NA_NA_GDP_REAL_NA_BLNY09DLR': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: GDPRVUS; projections: Annual Energy Outlook, case projections from various editions", 239 | 'PRCE_NA_NA_NA_CR_IMCO_USA_NDLRPBRL': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: RAIMUUS; projections: Annual Energy Outlook, case projections from various editions", 240 | 'PRCE_NA_NA_NA_CR_IMCO_USA_RDLRPBRL': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: RAIMUUS; projections: Annual Energy Outlook, case projections from various editions", 241 | 'CNSM_NA_LFL_NA_TOT_NA_USA_MILLBRLPDY': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: PATCPUS; projections: Annual Energy Outlook, case projections from various editions", 242 | 'SUP_PRD_NA_NA_CR_NA_USA_MILLBRLPDY': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: PAPRPUS; projections: Annual Energy Outlook, case projections from various editions", 243 | 'TRAD_NA_LFL_TOT_NETIMP_NA_USA_MILLBRLPDY': 'PANIPUS' "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: PANIPUS; projections: Annual Energy Outlook, case projections from various editions", 244 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_NDLRPMCF': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGEIUUS; projections: Annual Energy Outlook, case projections from various editions", 245 | 'PRCE_DELV_ELEP_NA_NG_NA_USA_RDLRPMCF': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGEIUUS; projections: Annual Energy Outlook, case projections from various editions", 246 | 'CNSM_NA_ALLS_NA_NG_TOT_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGTCPUS; projections: Annual Energy Outlook, case projections from various editions", 247 | 'SUP_DPR_NA_NA_NG_TOT_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGPRPUS; projections: Annual Energy Outlook, case projections from various editions", 248 | 'TRAD_NETIMP_NA_NA_NG_NA_USA_TRLCF': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGNIPUS; projections: Annual Energy Outlook, case projections from various editions", 249 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_NDLRPMBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: CLERDUS; projections: Annual Energy Outlook, case projections from various editions", 250 | 'PRCE_NOM_ELEP_NA_STC_NA_NA_RDLRPMBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: CLERDUS; projections: Annual Energy Outlook, case projections from various editions", 251 | 'CNSM_NA_NA_NA_CL_NA_NA_MILLTON': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: CLTCPUS; projections: Annual Energy Outlook, case projections from various editions", 252 | 'SUP_NA_NA_NA_CL_NA_NA_MILLTON': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: CLPRPUS; projections: Annual Energy Outlook, case projections from various editions", 253 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_NCNTPKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: ESTCUUS; projections: Annual Energy Outlook, case projections from various editions", 254 | 'PRCE_NA_ELEP_NA_EDU_NA_USA_RCNTPKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: ESTCUUS; projections: Annual Energy Outlook, case projections from various editions", 255 | 'CNSM_NA_ELEP_NA_ELS_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: ESTCPUS; projections: Annual Energy Outlook, case projections from various editions", 256 | 'GEN_NA_ALLS_NA_SLR_NA_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: SOETPUS; projections: Annual Energy Outlook, case projections from various editions", 257 | 'GEN_NA_ALLS_NA_WND_NA_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: WYETPUS; projections: Annual Energy Outlook, case projections from various editions", 258 | 'GEN_NA_ELEP_NA_HYD_CNV_NA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: HVETPUS; projections: Annual Energy Outlook, case projections from various editions", 259 | 'GEN_NA_ELEP_TGE_CL_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: CLETPUS; projections: Annual Energy Outlook, case projections from various editions", 260 | 'GEN_NA_ELEP_TGE_NG_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NGETPUS; projections: Annual Energy Outlook, case projections from various editions", 261 | 'GEN_NA_ELEP_TGE_NUP_NA_USA_BLNKWH': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: NUETPUS; projections: Annual Energy Outlook, case projections from various editions", 262 | 'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 263 | 'EMI_CO2_NA_NA_NA_NA_NA_MILLMTCO2EQ': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TETCEUS; projections: Annual Energy Outlook, case projections from various editions", 264 | 'INY_NA_NA_NA_TEN_NA_NA_THBTUPDLRGDP': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 265 | 'DMG_POP_NA_NA_NA_NA_NA_MILL': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TPOPPUS; projections: Annual Energy Outlook, case projections from various editions", 266 | 'ECI_INDX_NA_NA_GDP_NA_NA_Y09EQ1D3Z': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: GDPDIUS; projections: Annual Energy Outlook, case projections from various editions", 267 | 'CNSM_ENU_TEN_NA_TOT_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TETCBUS; projections: Annual Energy Outlook, case projections from various editions", 268 | 'CNSM_ENU_RES_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TERCBUS and LORCBUS; projections: Annual Energy Outlook, case projections from various editions", 269 | 'CNSM_ENU_COMM_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TECCBUS and LOCCBUS; projections: Annual Energy Outlook, case projections from various editions", 270 | 'CNSM_ENU_IDAL_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TEICBUS and LOICBUS; projections: Annual Energy Outlook, case projections from various editions", 271 | 'CNSM_ENU_TRN_NA_DELE_NA_NA_QBTU': "Data source: Historical data are from the U.S. Energy Information Administration open data API (accessed June 2024), https://www.eia.gov/opendata/browser/total-energy, annual series: TEACBUS and LOACBUS; projections: Annual Energy Outlook, case projections from various editions", 272 | } 273 | 274 | colors_dict ={ 275 | 'dhs-blue-90': 'rgba(0,3,5,1)', 276 | 'dhs-blue-80': 'rgba(0,23,38,1)', 277 | 'dhs-blue-70': 'rgba(0,43,71,1)', 278 | 'dhs-blue-60': 'rgba(0,62,103,1)', 279 | 'dhs-blue': 'rgba(0,82,136,1)', 280 | 'dhs-blue-40': 'rgba(61,124,165,1)', 281 | 'dhs-blue-30': 'rgba(122,165,193,1)', 282 | 'dhs-blue-20': 'rgba(184,207,222,1)', 283 | 'dhs-blue-15': 'rgba(214,227,236,1)', 284 | 'dhs-blue-10': 'rgba(245,248,250,1)', 285 | 'dhs-gray-90': 'rgba(8,8,8,1)', 286 | 'dhs-gray-80': 'rgba(54,54,55,1)', 287 | 'dhs-gray-70': 'rgba(100,101,102,1)', 288 | 'dhs-gray-60': 'rgba(146,147,149,1)', 289 | 'dhs-gray': 'rgba(192,194,196,1)', 290 | 'dhs-gray-40': 'rgba(207,209,210,1)', 291 | 'dhs-gray-30': 'rgba(222,223,224,1)', 292 | 'dhs-gray-20': 'rgba(237,238,238,1)', 293 | 'dhs-gray-15': 'rgba(245,245,246,1)', 294 | 'dhs-gray-10': 'rgba(252,253,253,1)', 295 | 'dhs-dark-gray-90': 'rgba(4,4,4,1)', 296 | 'dhs-dark-gray-80': 'rgba(25,25,26,1)', 297 | 'dhs-dark-gray-70': 'rgba(47,47,48,1)', 298 | 'dhs-dark-gray-60': 'rgba(68,69,71,1)', 299 | 'dhs-dark-gray': 'rgba(90,91,93,1)', 300 | 'dhs-dark-gray-40': 'rgba(130,130,132,1)', 301 | 'dhs-dark-gray-30': 'rgba(169,170,171,1)', 302 | 'dhs-dark-gray-20': 'rgba(209,209,210,1)', 303 | 'dhs-dark-gray-15': 'rgba(229,229,229,1)', 304 | 'dhs-dark-gray-10': 'rgba(248,248,249,1)', 305 | 'dhs-red-90': 'rgba(8,1,2,1)', 306 | 'dhs-red-80': 'rgba(55,5,13,1)', 307 | 'dhs-red-70': 'rgba(102,9,25,1)', 308 | 'dhs-red-60': 'rgba(149,14,36,1)', 309 | 'dhs-red': 'rgba(196,18,48,1)', 310 | 'dhs-red-40': 'rgba(210,75,98,1)', 311 | 'dhs-red-30': 'rgba(224,132,147,1)', 312 | 'dhs-red-20': 'rgba(238,189,197,1)', 313 | 'dhs-red-15': 'rgba(246,217,222,1)', 314 | 'dhs-red-10': 'rgba(253,246,247,1)', 315 | 'dhs-light-blue-90': 'rgba(0,5,7,1)', 316 | 'dhs-light-blue-80': 'rgba(0,34,49,1)', 317 | 'dhs-light-blue-70': 'rgba(0,62,90,1)', 318 | 'dhs-light-blue-60': 'rgba(0,91,132,1)', 319 | 'dhs-light-blue': 'rgba(0,120,174,1)', 320 | 'dhs-light-blue-40': 'rgba(61,152,193,1)', 321 | 'dhs-light-blue-30': 'rgba(122,185,213,1)', 322 | 'dhs-light-blue-20': 'rgba(184,217,232,1)', 323 | 'dhs-light-blue-15': 'rgba(214,233,242,1)', 324 | 'dhs-light-blue-10': 'rgba(245,250,252,1)', 325 | 'dhs-green-90': 'rgba(4,6,2,1)', 326 | 'dhs-green-80': 'rgba(26,42,14,1)', 327 | 'dhs-green-70': 'rgba(49,79,26,1)', 328 | 'dhs-green-60': 'rgba(71,115,38,1)', 329 | 'dhs-green': 'rgba(94,151,50,1)', 330 | 'dhs-green-40': 'rgba(133,176,99,1)', 331 | 'dhs-green-30': 'rgba(171,201,148,1)', 332 | 'dhs-green-20': 'rgba(210,226,198,1)', 333 | 'dhs-green-15': 'rgba(229,238,222,1)', 334 | 'dhs-green-10': 'rgba(249,251,247,1)', 335 | } --------------------------------------------------------------------------------