Article

Tests

BeginPackage["Wikicode`Magnesium`"]

Production::usage="Production[date] gives the annual world magnesium production from the specified date."

Begin["`Private`"]

Production[from_Integer]:=Select[magnesiumData["Production"],DateDifference[{from},#[[1]]] >= 0&]

magnesiumData["Production"] = 
 MapAt[{Round@#} &, #, 1] & /@ 
  Import["http://minerals.usgs.gov/ds/2005/140/ds140-mgmet.xlsx"][[1, 
   28 ;; 102, {1, 11}]]

End[]
EndPackage[]