MetricMash - U.S. Consumer Price Index (1913 to Current)

Category:
TypeProviders.AzureMarketPlace
Description: The MetricMash U.S. Consumer Price Index (CPI) dataset provides the changes in the prices paid by consumers for over 375 goods and services in major expenditure groups – such as food, housing, apparel, transportation, medical care and education cost. For more information, please goto https://datamarket.azure.com/dataset/26058d69-5cad-4a7c-9a14-a21a0c40de86
Code:
type CPI = Microsoft.FSharp.Data.TypeProviders.ODataService< ServiceUri = @"https://api.datamarket.azure.com/MetricMash/USConsumerPriceIndex/" >

let MetricMash() =
let us = CPI.GetDataContext()
//To sign up for a Windows Azure Marketplace account, please go to https://datamarket.azure.com/account/info
us.Credentials<- NetworkCredential (Utils.ADM_USER_ID, Utils.ADM_ACCOUNT_ID)

query {
for b in us.AllUrbanChainedConsumerPriceIndex do
where (b.DateValue < new System.DateTime(2010, 1, 1) )
where (b.DateValue > new System.DateTime(2008, 12, 30) )
select b
} |> Seq.iter (fun i -> printfn "%A - %A" i.DateValue i.Index)

// sample output
// 1/1/2009 12:00:00 AM - 122.09500M
// 1/1/2009 12:00:00 AM - 149.17700M
// 1/1/2009 12:00:00 AM - 117.95400M
// 1/1/2009 12:00:00 AM - 86.86600M
// 1/1/2009 12:00:00 AM - 107.73100M
// 1/1/2009 12:00:00 AM - 80.52600M
// 1/1/2009 12:00:00 AM - 110.22400M
// ...


Execution Result:
1/1/2009 12:00:00 AM - 122.09500M
1/1/2009 12:00:00 AM - 149.17700M
1/1/2009 12:00:00 AM - 117.95400M
1/1/2009 12:00:00 AM - 86.86600M
1/1/2009 12:00:00 AM - 107.73100M
1/1/2009 12:00:00 AM - 80.52600M
1/1/2009 12:00:00 AM - 110.22400M
1/1/2009 12:00:00 AM - 173.11600M
1/1/2009 12:00:00 AM - 74.08000M
1/1/2009 12:00:00 AM - 128.66300M
1/1/2009 12:00:00 AM - 128.81700M
1/1/2009 12:00:00 AM - 125.97000M
1/1/2009 12:00:00 AM - 127.11200M
1/1/2009 12:00:00 AM - 128.99200M
1/1/2009 12:00:00 AM - 128.89100M
1/1/2009 12:00:00 AM - 130.93000M
1/1/2009 12:00:00 AM - 160.63900M
1/1/2009 12:00:00 AM - 96.11000M
1/1/2009 12:00:00 AM - 143.76000M
1/1/2009 12:00:00 AM - 126.88300M
1/1/2009 12:00:00 AM - 149.95200M
1/1/2009 12:00:00 AM - 121.81600M
1/1/2009 12:00:00 AM - 105.61200M
1/1/2009 12:00:00 AM - 133.85300M
1/1/2009 12:00:00 AM - 110.96100M
1/1/2009 12:00:00 AM - 110.65300M
1/1/2009 12:00:00 AM - 132.47200M
1/1/2009 12:00:00 AM - 115.23600M
2/1/2009 12:00:00 AM - 122.59800M
2/1/2009 12:00:00 AM - 152.24900M
2/1/2009 12:00:00 AM - 118.34800M
2/1/2009 12:00:00 AM - 89.60300M
2/1/2009 12:00:00 AM - 108.72100M
2/1/2009 12:00:00 AM - 80.49100M
2/1/2009 12:00:00 AM - 110.17900M
2/1/2009 12:00:00 AM - 173.01200M
2/1/2009 12:00:00 AM - 74.07200M
2/1/2009 12:00:00 AM - 128.37400M
2/1/2009 12:00:00 AM - 128.49200M
2/1/2009 12:00:00 AM - 125.18300M
2/1/2009 12:00:00 AM - 127.33300M
2/1/2009 12:00:00 AM - 129.32900M
2/1/2009 12:00:00 AM - 128.91600M
2/1/2009 12:00:00 AM - 131.21800M
2/1/2009 12:00:00 AM - 158.71700M
2/1/2009 12:00:00 AM - 96.42300M
2/1/2009 12:00:00 AM - 144.68300M
2/1/2009 12:00:00 AM - 127.86600M
2/1/2009 12:00:00 AM - 150.84900M
2/1/2009 12:00:00 AM - 123.28200M
2/1/2009 12:00:00 AM - 105.96000M
2/1/2009 12:00:00 AM - 134.01200M
2/1/2009 12:00:00 AM - 113.13500M
2/1/2009 12:00:00 AM - 113.10500M
2/1/2009 12:00:00 AM - 132.82600M
2/1/2009 12:00:00 AM - 113.78800M
3/1/2009 12:00:00 AM - 122.80300M
3/1/2009 12:00:00 AM - 150.79500M
3/1/2009 12:00:00 AM - 118.80700M
3/1/2009 12:00:00 AM - 92.16100M
3/1/2009 12:00:00 AM - 109.13100M
3/1/2009 12:00:00 AM - 80.40600M
3/1/2009 12:00:00 AM - 110.07500M
3/1/2009 12:00:00 AM - 173.10200M
3/1/2009 12:00:00 AM - 73.94600M
3/1/2009 12:00:00 AM - 128.00100M
3/1/2009 12:00:00 AM - 128.09400M
3/1/2009 12:00:00 AM - 124.40300M
3/1/2009 12:00:00 AM - 127.28800M
3/1/2009 12:00:00 AM - 132.61400M
3/1/2009 12:00:00 AM - 128.89600M
3/1/2009 12:00:00 AM - 131.57100M
3/1/2009 12:00:00 AM - 155.87300M
3/1/2009 12:00:00 AM - 96.75300M
3/1/2009 12:00:00 AM - 144.89900M
3/1/2009 12:00:00 AM - 127.96900M
3/1/2009 12:00:00 AM - 151.10800M
3/1/2009 12:00:00 AM - 123.91500M
3/1/2009 12:00:00 AM - 106.09300M
3/1/2009 12:00:00 AM - 134.06400M
3/1/2009 12:00:00 AM - 113.25900M
3/1/2009 12:00:00 AM - 113.25000M
3/1/2009 12:00:00 AM - 133.00600M
3/1/2009 12:00:00 AM - 113.65200M
4/1/2009 12:00:00 AM - 123.05300M
4/1/2009 12:00:00 AM - 152.38800M
4/1/2009 12:00:00 AM - 119.04000M
4/1/2009 12:00:00 AM - 92.63600M
4/1/2009 12:00:00 AM - 109.89600M
4/1/2009 12:00:00 AM - 80.44900M
4/1/2009 12:00:00 AM - 110.13700M
4/1/2009 12:00:00 AM - 173.17500M
4/1/2009 12:00:00 AM - 73.99300M
4/1/2009 12:00:00 AM - 127.68100M
4/1/2009 12:00:00 AM - 127.77100M
4/1/2009 12:00:00 AM - 123.67400M
4/1/2009 12:00:00 AM - 127.00200M
4/1/2009 12:00:00 AM - 135.61400M
4/1/2009 12:00:00 AM - 128.64300M
4/1/2009 12:00:00 AM - 131.72800M

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

Comments

No comments yet.