File:U.S. Electricity Production 2015.svg
Original file (SVG file, nominally 714 × 361 pixels, file size: 45 KB)
Captions
Summary
[edit]DescriptionU.S. Electricity Production 2015.svg |
English: A graph showing U.S. energy production for the year 2015. Data from the U.S. Energy Information Administration. |
Date | |
Source | Own work |
Author | Douglas Perkins |
The SVG file was produced using MatPlotLib with the following (also Public Domain) code.
#!/usr/bin/env python from matplotlib import pyplot from matplotlib import ticker from matplotlib import numpy # This generates a bar graph showing the U.S.'s electricity production in 2015. # # https://www.eia.gov/electricity/monthly/ # https://www.eia.gov/electricity/monthly/epm_table_grapher.cfm?t=epmt_1_01 # # This file was written by Douglas Perkins. # It is released under a Creative Commons Zero 1.0 license. # # https://creativecommons.org/publicdomain/zero/1.0/ # Renewable energy production in TWh. petroleum_liquids = 17.456 petroleum_coke = 10.987 petroleum = petroleum_liquids + petroleum_coke # Energy production in TWh. data = [ ("Coal", 1356.057), ("Gas", 1335.068), ("Nuclear", 797.178), ("Renewable\n(non-solar)", 271.885), ("Hydro", 251.168), ("Solar", 37.371), ("Oil", petroleum), ] sources = [d[0] for d in data] amounts = [d[1] for d in data] # A formatter to display comma-separated numbers on the y axis. def comma_func(x, pos): s = '{:0,d}'.format(int(x)) return s comma_format = ticker.FuncFormatter(comma_func) # Make a bar graph. x = numpy.arange(len(sources)) + 0.25 width = 0.5 pyplot.figure(num=1, figsize=(9,3)) pyplot.title("U.S. Electricity Production 2015") pyplot.bar(x, amounts, width, color='gold') pyplot.xlabel('Source') pyplot.ylabel('Electricity (TWh)') yticks = pyplot.xticks(x + width/2.0, sources) pyplot.xticks(rotation='vertical') pyplot.subplot(111).yaxis.set_major_formatter(comma_format) pyplot.subplot(111).grid(b=True, axis='y') pyplot.savefig('Chapter 7.US Electricity Production 2015.svg', format='svg', bbox_inches='tight')
Licensing
[edit]This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 12:44, 23 November 2016 | 714 × 361 (45 KB) | Douglaspperkins (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 571pt |
---|---|
Height | 289pt |