File:US Trade Balance 1980 2014.svg

Original file(SVG file, nominally 675 × 405 pixels, file size: 49 KB)

This file has been superseded by US Trade Balance from 1960.svg. It is recommended to use the other file. Please note that deleting superseded images requires consent.
new file

Summary

Description
English: United States Balance of Trade, 1980–2014. Data Source: US Census Bureau Foreign Trade Division: https://www.census.gov/foreign-trade/statistics/historical/gands.txt
Date
Source Own work
Author Morn
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

Source code
from pylab import *

style.use("ggplot")	# requires Matplotlib 1.5.1 or later
 
# From https://www.census.gov/foreign-trade/statistics/historical/gands.txt (1960-2014):

t = """   3,508
   4,195
   3,370
   4,210
   6,022
   4,664
   2,939
   2,604
     250
      91
   2,254
  -1,302
  -5,443
   1,900
  -4,293
  12,404
  -6,082
 -27,246
 -29,763
 -24,565
 -19,407
 -16,172
 -24,156
 -57,767
-109,072
-121,880
-138,538
-151,684
-114,566
 -93,141
 -80,864
 -31,135
 -39,212
 -70,311
 -98,493
 -96,384
-104,065
-108,273
-166,140
-258,617
-372,517
-361,511
-418,955
-493,890
-609,883
-714,245
-761,716
-705,375
-708,726
-383,774
-494,658
-548,625
-536,773
-478,394
-508,324"""

d = []
for l in t.splitlines():
	d.append(float(l.replace(',', ''))/1000)
 
start, end = 1980, 2014
y = range(start, end + 1)
skip = start - 1960

f = figure(figsize = (7.5, 4.5))
ax = f.add_axes((.13, .18, .8, .75))
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
plot(y, d[skip:], '-', lw = 2.5)
plot(y, d[skip:], 'o', ms = 5)

xlabel('Year')
ylabel('Billions USD')
title('U.S. Trade Balance (%u%u)' % (start, end))
 
text(end, -950, 'Data Source: US Census Bureau Foreign Trade Division',
  va = 'bottom', ha = 'right' , size = 10)
 
axis((start, end, -800, 0))
savefig("US Trade Balance %u %u.svg" % (start, end))
 
show()

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

24 January 2016

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current19:58, 24 January 2016Thumbnail for version as of 19:58, 24 January 2016675 × 405 (49 KB)Morn{{Information |Description ={{en|1=United States Balance of Trade, 1980–2014. Data Source: US Census Bureau Foreign Trade Division: http://www.census.gov/foreign-trade/statistics/historical/gands.txt}} |Source ={{own}} |Author =[[U...
No pages on the English Wikipedia use this file (pages on other projects are not listed).

Metadata