EDR - Environmental Hazard Rank

Category:
TypeProviders.AzureMarketPlace
Description: The EDR Environmental Hazard Ranking System depicts the relative environmental health of any U.S. ZIP code based on an advanced analysis of its environmental issues. For more information, please goto https://datamarket.azure.com/dataset/d8161344-f755-4a86-83e6-db9a89f06efd
Code:
type EHR = Microsoft.FSharp.Data.TypeProviders.ODataService< ServiceUri = @"https://api.datamarket.azure.com/EDR/EnvironmentalHazardRank" >

let EDR() =
let e = EHR.ServiceTypes.EDREnvironmentalHazardRankContainer()
//To sign up for a Windows Azure Marketplace account, please go to https://datamarket.azure.com/account/info
e.Credentials<- NetworkCredential (Utils.ADM_USER_ID, Utils.ADM_ACCOUNT_ID)

query {
for h in e.EnvironmentalHazardRankingByUSPostalZipCode do
where (h.State = "WA")
sortByDescending (h.EnviromentalHazardIndex)
select h
} |> Seq.iter (fun i -> printfn "%A - %A" i.ZipCode i.EnviromentalHazardIndex)

// sample output
// "98001" - 55120853.90000M
// "98002" - 53938430.83000M
// "98003" - 31725567.94000M
// "98004" - 51774234.93000M
// "98005" - 38690824.03000M
// "98006" - 16916724.70000M
// "98007" - 16998583.21000M
// "98008" - 10245452.63000M
// ...



Execution Result:
 - 11721000146.66000M
"99352" - 280787612.47000M
"98421" - 263478646.41000M
"98108" - 233915721.22000M
"98032" - 197053184.29000M
"98134" - 189212233.25000M
"98901" - 135385347.52000M
"98201" - 121655015.63000M
"99362" - 114542434.74000M
"98632" - 104758249.30000M
"98055" - 100782289.68000M
"98902" - 98742662.93000M
"98225" - 98708231.89000M
"98221" - 98302749.09000M
"98501" - 96130703.62000M
"98584" - 95392219.88000M
"98402" - 94616216.34000M
"98532" - 89771215.45000M
"98926" - 89724222.82000M
"98223" - 77021434.69000M
"98204" - 76743679.56000M
"98661" - 75826283.43000M
"98837" - 72752923.33000M
"98520" - 72639562.87000M
"98106" - 72354617.27000M
"98312" - 72134498.85000M
"99301" - 71669878.21000M
"98290" - 71421617.41000M
"98531" - 70422350.18000M
"98362" - 68982141.99000M
"98409" - 67745642.15000M
"98109" - 65669655.02000M
"98944" - 63750668.68000M
"98371" - 62801007.51000M
"98119" - 62635274.91000M
"98226" - 62201784.04000M
"98273" - 60357630.60000M
"98110" - 59883436.40000M
"98072" - 59183777.60000M
"98188" - 58990777.60000M
"98168" - 58521899.60000M
"98801" - 56606321.41000M
"98660" - 55944312.39000M
"98499" - 55449750.59000M
"98001" - 55120853.90000M
"99207" - 55089879.86000M
"98366" - 54255616.87000M
"98002" - 53938430.83000M
"98903" - 53459263.74000M
"98272" - 53336669.97000M
"98107" - 53316785.65000M
"98550" - 52844434.41000M
"98671" - 52794212.80000M
"98230" - 52644830.12000M
"99216" - 52368007.02000M
"98103" - 51828863.74000M
"98004" - 51774234.93000M
"99336" - 51293658.77000M
"98148" - 50419253.69000M
"98642" - 49477447.60000M
"98033" - 48754147.25000M
"99166" - 48152779.01000M
"98036" - 47884707.35000M
"98052" - 47825158.89000M
"98424" - 47625836.47000M
"98248" - 46702138.95000M
"98368" - 45762046.24000M
"98277" - 44957009.70000M
"98031" - 43253856.28000M
"98666" - 42967590.25000M
"99212" - 42655121.16000M
"98038" - 41921831.82000M
"98121" - 41782754.70000M
"98118" - 41614406.01000M
"98233" - 41542490.42000M
"98027" - 41299184.74000M
"98270" - 41289540.04000M
"98122" - 40897227.64000M
"98662" - 40765623.56000M
"99344" - 39979632.27000M
"98422" - 39782621.52000M
"98105" - 39195387.10000M
"98005" - 38690824.03000M
"98502" - 38626778.71000M
"98022" - 37778961.71000M
"98115" - 37608330.11000M
"98144" - 37466319.20000M
"99114" - 37097474.56000M
"98294" - 36631385.75000M
"99206" - 36578118.66000M
"98284" - 36462867.89000M
"98126" - 36274330.56000M
"98155" - 35731370.03000M
"98433" - 35701032.28000M
"98278" - 35623812.66000M
"98936" - 35556461.15000M
"99202" - 35450981.70000M
"98314" - 35200308.38000M
"98133" - 34950682.92000M
"99021" - 34942778.62000M

Last edited Mar 1, 2012 at 7:06 PM by ttliu2000, version 3

Comments

No comments yet.