File:US Trade Balance from 1960.svg

Summary

Description
English: United States Balance of Trade, from 1960. Data source: U.S. Census Bureau, Economic Indicator Division: https://www.census.gov/foreign-trade/statistics/historical/gands.pdf or BEA: https://www.bea.gov/data/intl-trade-investment/international-trade-goods-and-services
Date
Source Own work
Author Cherkash
Other versions
SVG development
InfoField
Source code
InfoField

Python code

Source code
#!/usr/bin/env python

from pylab import *
rc('xtick.major', pad=8)

#from either of these:
#https://www.census.gov/foreign-trade/statistics/historical/gands.pdf
#https://www.bea.gov/data/intl-trade-investment/international-trade-goods-and-services
d = (3.508,  4.194,  3.371,  4.210,  6.022,  4.664,  2.939,  2.604,  0.250,  0.090,  2.255,  -1.301,  -5.443,  1.900,  -4.293,  12.403,  -6.082,  -27.247,  -29.763,  -24.566,  -19.407,  -16.172,  -24.156,  -57.767,  -109.074,  -121.879,  -138.539,  -151.683,  -114.566,  -93.142,  -80.865,  -31.136,  -39.212,  -70.311,  -98.493,  -96.384,  -104.065,  -108.273,  -166.140,  -255.809,  -369.686,  -360.373,  -420.666,  -496.243,  -610.838,  -716.542,  -763.533,  -710.997,  -712.350,  -394.771,  -503.087,  -554.522,  -525.906,  -446.861,  -483.952,  -491.421,  -481.475,  -512.739,  -580.950, -576.341, -676.684)

start, end = 1960, 2020
y = range(start, end+1)

f = figure(figsize=(7.5, 4.5))
ax = f.add_axes((.13, .18, .8, .75))
plot(y, d, 'r-', lw = 1.5)
plot(y, d, 'bo', ms = 5, mec = 'b')
grid(ls='-', alpha=.4)

xlabel('Year')
ylabel('Billions USD')
title('U.S. Trade Balance')

text(2020, -990, 'Data source: U.S. Census Bureau, Economic Indicator Division', va = 'bottom', ha = 'right' , size = 10)

axis((1960, 2020, -800, 100))
savefig("US Trade Balance from 1960.svg")

show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.
Category:CC-BY-SA-4.0#US%20Trade%20Balance%20from%201960.svgCategory:Self-published work
This file may be updated to reflect new information. If you wish to use a specific version of the file without it being overwritten, please upload the required version as a separate file.
Category:Files that need updating annually Category:Balance of trade#USA,%20Trade%20Balance Category:Economic statistics#USA,%20Trade%20Balance Category:Economic statistics for the United States#Trade%20Balance,%201960– Category:Time series line charts#USA,%20Trade%20Balance Category:Images with Python source code Category:SVG created with Matplotlib
Any autoconfirmed user can overwrite this file from the same source. Please ensure that overwrites comply with the guideline. Category:Files allowed to be overwritten by everyone
Category:Balance of trade Category:CC-BY-SA-4.0 Category:Economic statistics Category:Economic statistics for the United States Category:Files allowed to be overwritten by everyone Category:Files that need updating annually Category:Images with Python source code Category:SVG created with Matplotlib Category:Self-published work Category:Time series line charts Category:Valid SVG created with Matplotlib code