Jump to content

User:Wakebrdkid/Phosphorite

From Wikipedia, the free encyclopedia

Article

Tests

BeginPackage["Wikicode`Phosphorite`"]

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

Begin["`Private`"]

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

phosphoriteData["Production"] = 
 MapAt[{Round@#} &, #, 1] & /@ 
  Import["http://minerals.usgs.gov/ds/2005/140/ds140-phosp.xlsx"][[1, 
   6 ;; 117, {1, 9}]]

End[]
EndPackage[]