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
The SVG code is valid .
This plot was created with Matplotlib .
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
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.


This file may be updated to reflect new information.
If you wish to use a specific version of the file without new updates being mirrored, please upload the required version as a separate file.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

27 December 2018

image/svg+xml