![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 |
Great work! I would like to adapt this template to the German wikipedia, if you agree. To do so I need to add the inflation rate for DM/ Euro. Would it be usefull to add this currency also in the english template? I provide you with the figures in the hidden text to keep the page readable. Karsten11 ( talk) 18:26, 26 May 2008 (UTC)
Individual currencies in individual pages seems to be a good approach. Only for the german wikipedia we have DM/Euro for Germany, ÖS/Euro für Austria and SFR for Switzerland (and need the exiting USD and GBP too).
There are 3 phases: a) 1951 to 1998: In this phase only DM exists. So each value in articles describing an amount must be in DM. Today DM is history. So these amounts need to be inflation-adjusted and changed into Euro (1 Euro = 1,95583 DM). b) Between 1999-01-01 and 2001-12-31 DM and Euro exists in parallel. So the amount in the article can be given in DM or Euro. Only in the first case it needs to be converted. c) From 2002 we use only Euro. No conversion is needed. An Output schould be everytime in Euro. A manual conversion is possible but not user-friendly. May be we can make the calculation much easier by taking an assumtion, that all amounts in phase b are in DM.
There is no Euro-only inflation. In Europe we measure inflation by country. Even if Germany as well as Ireland use Euro, we have a different inflation rate for both countries. So we have a Inflation rate for Germany, not for the currencies.
Historical inflation rates are a problem. After WW II there was a hyperinflation. The former currency ( German Reichsmark) lost the value and was replaced 1948 by the DM. The inflation rates in the 1940s was so high that it would be necessary to know in which month or week the amount was payed to use the right factor. And: Due to the war the quality of the statistics is rather poor. For the time between 1924 an 1940 inflation rates are available. Ther we would need a factor to link the 1940 value with the value of 1951. This is not easy. 1922/23 there was also a hyperinflation with inflation rates which are not usable. In advance there was the German gold mark. If we can link 1924 and 1921 than we can go back to 1876 when the Goldmark was initialy issued. You can see: It´s a little tricky with german currencies. Karsten11 ( talk) 06:20, 27 May 2008 (UTC)
{{Currconv|DM|EUR|{{Inflation|DE|1000000|1970|2000}}|additional_parameters}}
It would be helpful to round the results to 2 positions after decimal point. Karsten11 ( talk) 11:39, 27 May 2008 (UTC)
This Currconv sounds good. This template can be used in combination with inflation template as well as stand-alone. You are right: The template discussion page is the right place for this discussion. Karsten11 ( talk) 08:48, 28 May 2008 (UTC)
I'd like to inform that Slavery has just became the very first (actual) article in Wikipedia using this template!
The previous, hard-coded version informed that the price for a slave in the USA of 1850 ($1,000) would be "about US$38,000 in present-day terms". After changing it to the dynamically generated {{formatnum:
, though, it now shows the much more accurate "about US$36,600 in present-day terms".
{{
Inflation|US|1000|1850}}
}}
As this template is updated year after year, articles properly edited to take advantage of it will be automatically update too. What could be better for an online encyclopedia which has the moral obligation of staying accurate? So, let's start editing articles accordingly! It's more than worth the effort!
But a reminder: take care to not change hard-coded values present in citations or from referenced sources. Only values whose source is a Wikipedia editor should be turned into a dynamically generated ones. Otherwise, obviously, those citations would become invalid and the edit would have to be reverted.
Have fun!
--
alexgieg (
talk)
14:30, 28 May 2008 (UTC)
I've created a new template, {{
Inflation-fn|country}}
, that makes it easy to add footnotes referencing the source of the data used for calculating inflated values. By using it you'll make the article you're editing even more
WP:V compliant. See the new
documentation section for a typical usage example. --
alexgieg (
talk)
16:30, 30 May 2008 (UTC)
I've made another cool template: {{
Formatprice}}. It avoids the cents problem in the built-in {{formatnum:}}
, while adding some nice capabilities for displaying huge numbers. I've just updated the documentation to explain how to use it in addition to the previous method. Give it a look! --
alexgieg (
talk)
15:36, 6 June 2008 (UTC)
“ | On the down side, {{ Formatprice}} has no built-in intelligent handling of user locale settings, what means that some users might see a dot or a comma the opposite way they'd expect. | ” |
I'd say that this is no downside. It's a question of language not location. In English it's a dot for the decimal point and commas (spaces or nothing at all) for thousands delimitation. In Germany English should still be English. Please don't "solve" this non-problem. JIMp talk· cont 23:41, 8 June 2008 (UTC)
Obviously this is a useful starting point for an unflation template: {{ US Inflation}} is the only preexisting one and is focussed on the single task of inflating USD to current prices. There are a number of issues I can see with this template, some minor quibbles, some quite serious. Ultimately, I'd like to be able to redirect {{ US Inflation}} to call here, but because of those concerns I'd rather not at this time. Anyway problems in roughly descending order:
That's a few things to be getting on with, though point 1 needs to be dealt with: either by changing the source of the info or getting permission to use their data. Oh and here is Canadian CPI data for 1914 - present.-- Nilf anion ( talk) 22:53, 10 June 2008 (UTC)
See the
above discussion about the currency crossing. In short, I'm against it because there are technical difficulties. In Europe there was a period when both the national currency and the EUR existed. To properly incorporate currency conversion in the inflation template itself would mean either: a) adding extra parameters to deal with overlapping currencies, what can easily become an extreme level of complexity to the template once more countries (and maybe currencies) with their own oddities enter the template; or b) arbitrarily setting a threshold, as you suggest. I myself prefer neither, going instead with c) creating a separate template (currently non-existent), named {{
Currconv}}, to deal exclusively with currency conversions. Thus, if an editor wanted values to be converted between currencies, he could wrap it into something like this: {{Formatprice|{{Currconv|DM|EUR|{{Inflation|DE|100000|2001}}}}}}
. No need to go around guessing for him.
Of course, the other approach is also perfectly valid. Karsten11, with whom I talked about this all, decided to implement the German version of this template differently, incorporating the DM to EUR conversion as an automatic 2001 crossing threshold.
Now, nothing prevents one to create new templates based on both {{
Inflation}} and {{
Currconv}}. For example, thinking on your template's name, I imagine one might create a {{
DE Inflation}} that would go around {{#ifexpr:...}}'ing
parameters to decide whether to return a converted value or not over a default threshold. This adds flexibility without bloating. You have some foundational addons, such as this one, and then higher level ones that take advantage of them on their own specific ways, without the need to overcomplexify thing down here.
On the granularity level, it'd be doable with optional named parameters. We could add, say, |sm=
and |em=
for, respectively, start_month and end_month. If the underlying template is granularized enough, the calculation would use both parameters. If it's not, it could simply ignore them. What do you think? --
alexgieg (
talk)
12:13, 11 June 2008 (UTC)
Is there anyway that the template could optionally output something like in 200n after the number, with the most recent year there is data being output when there's not a second year provided. That way when the template is updated with a new year's worth of data, the dollar amount would have a specific date, like "N,NNN in 2007", rather than something more nebulous like "N,NNN today"? — Bellhalla ( talk) 12:19, 20 June 2008 (UTC)
The preliminary inflation rate for € in 2007 is 2,6 % Karsten11 ( talk) 15:03, 31 December 2008 (UTC)
The calculation could be made more efficient if it stored a cumulated inflation factor, i.e. inflation since the startyear. To calculate inflation from year A to year B, you'd just divide the cumulated inflation from startyear to B by the cumulated inflation from startyear to A. For the UK template in particular, it would bring it from evaluating 743 #ifexpr:
functions down to two #switch
functions. Only downside is that updating the data is not quite as straight forward, but since that only happens once a year ...
Amalthea
13:39, 20 April 2009 (UTC)
#switch
}}es aren't that efficient either.
JIMp
talk·
cont
00:08, 15 August 2009 (UTC)
#switch
}} (such a {{#switch
}} would be smaller & have the most common currencies up the top to enhance performance with respect to template limits). You go from the start-year subtemplate to the end-year subtemplate dividing one value by the other & then multiplying by the input vlaue. It should be more efficient and in the long run ... probably a pretty long long run judging by the size of some of those existent subtemplates ... might save time by having only one subtemplate to create per year (as opposed to having several to update).
JIMp
talk·
cont
00:27, 15 August 2009 (UTC)Since someone offered in the "Limitations" section of [1], I would like to see a deinflation option added. The reason is that it is sometimes necessary to compare the specific price in an article, for example about a new product, with general price from an earlier period. "This convertable is more affordable than models produced in the 1960s." That is, the reader may not know or care about some particular, specific model from 40 years ago, but they may be interested in mapping the current product information back to (unidentified, unknowable) products that they recognize. (Maybe not a 1960s automobile at all, but a 1960s boat, house, salary, etc.) Thoughts? Piano non troppo ( talk) 02:56, 20 August 2009 (UTC)
I'm ok with this defaulting to "recently", but when values are actually calculated, does this evaluate as {{ Currentyear}} so that it updates on the fly, or does it depend on whether this template is subst'd? It obviously saves a great deal of effort if we don't need to update end_year manually. Or have I missed something? Rodhull andemu 23:48, 17 October 2010 (UTC)
I was trying to calculate inflation for $8,000 received from George Washington's 1799 will, but discovered that I had to use the year 1800. I then noticed inflation from 1800 and 1801 resulted in less money in today's terms than in 1802. Shouldn't there be more money the older you go back in time due to inflation? Here is a short table to show you what I mean:
Why is 1800 ($102,211.76) and 1801 ($104,256) less than 1802 ($121,227.91)?-- Uzma Gamal ( talk) 10:06, 17 November 2010 (UTC)
I'd like to use this template in the article for the 1927 silent film Metropolis. Specifically, I'd like to have this figure's current value in euros:
“ | The most expensive silent film ever made, it cost approximately 5 million Reichsmark. | ” |
But it's not straightforward. Any suggestions? — Athelwulf [T]/ [C] 00:01, 19 December 2010 (UTC)
Inflation/UK/dataset cites a US dataset incorrectly in its documentation. Fifelfoo ( talk) 00:53, 11 January 2011 (UTC)
Can the template author explain how Template:Inflation/UK/dataset's figures relate to the MW figures it is based on at MW UK RPI dataset? If they could document this relationship, I could clone the RPI long series for long series Average Nominal, Average Real, GDP sets, etc. Fifelfoo ( talk) 01:01, 11 January 2011 (UTC)
Since the documentation has been updated noting not to use this template for things other than consumer goods, I have a request/question. Can we add a parameter to this template to specify which inflationary adjustment calculation method is used and then add the necessary datasets to make that happen? I've found the concept of having constantly updating inflation adjustments via template to be incredibly useful, but if this template is wrong for certain uses, can we update it so we can make it work for other applications? Imzadi 1979 → 10:16, 24 January 2011 (UTC)
Whether one wishes to use CPI or some other price index depends on the question one is asking. Fifelfoo is probably right that using CPI to compare the expenditures of the rich across time is fraught with problems, since CPI is based on a consumption basket of a "typical" household, rather than a "wealthy" household (in historical terms an added complication is that a 19th century "wealthy" household was in fact poorer than a "poor" household today in absolute terms, save perhaps the top .00001% of population). This doesn't make this template invalid, it just means it should be used with extreme caution. I was a little worried about which price series was used for the pre-industrial revolution but it seems that it was from the measuringworth.com website, which as far as I can tell uses the Bowley-Wood price series, which, while they do have some (understandable) problems, are pretty much "the best there is". Volunteer Marek ( talk) 00:29, 23 March 2011 (UTC)
I'm still a little lost as to why one can't use CPI for government purchases - it's done all the time. Volunteer Marek ( talk) 00:31, 23 March 2011 (UTC)
Just discovered this. Incredible!
I would like to ask for something (kind of touched on earlier, above) for output. I would like to see the output for ${{inflation|country|n1|year}} as "$n1 in year ($converted n1 in 2008)" or something that defaults to a complete explanation. The default could be overridden, for say, tables. Student7 ( talk) 19:57, 24 April 2011 (UTC)
Dear editors, I'd like to announce a beta phase for the UK National Gross Domestic Product per capita inflation template: UKNGDPPC. For example:
|index=UKNGDPPC
(parameter 1) not a recognized index. billion.
[2]I am having trouble with Australian dollars. I can specify 2000 dollars in 2008 dollars (eg. {{Inflation|AU|100|2000|2008}} is 128) but 2009 or later gives me a NaN (eg. {{Inflation|AU|100|2000|2009}} is 131). Any ideas? Hawkeye7 ( talk) 20:10, 5 November 2011 (UTC)
Dear editors, I'd like to announce a beta phase for the US National Gross Domestic Product per capita inflation template: US-NGDPPC. For example:
|index=US-NGDPPC
(parameter 1) not a recognized index..
[1]While Statistics Canada uses a CPI historical series definition that is amenable to human calculation, such a calculation requires the revised Canada-wide point averages for all months in a year being averaged. It cannot be supplied by taking November point averages. (And it certainly didn't extend the series to 2012!). Fifelfoo ( talk) 00:53, 17 January 2012 (UTC)
I used this template in an article, for US dollars. It works okay, but the citation it generates says "US Commerce dept data 1800-2008". In fact, that web site it refers to is current up to 2012, so that text should be changed to "1800-2012". I'm busy now, so I have no time to try to do it myself .. hoping someone else has time. -- Noleander ( talk) 21:45, 19 March 2012 (UTC)
There is no hint as to how to input amounts of money before 15 February 1971, when the UK decimalised, replacing the shilling and penny with a single subdivision, the new penny. I am trying to find out the value of £1 15s in 1800. Do I have to convert that to £1.75 ? Nick Beeson ( talk) 14:20, 26 March 2012 (UTC)
inflation|UK|1.75|1800
}} you could use {{inflation|UK|1+15/20|1800
}}, instead of {{Inflation|UK|23.1125|1869
}} you could use {{Inflation|UK|23+2/20+3/240|1869
}} and instead of {{Inflation|UK|4.925|1869
}} you could use {{Inflation|UK|4+18/20+6/240|1869
}}. It's no big deal when the number of pennies (or farthings for that matter) is a multiple of three but if not you get either 3 or 6 recurring in the decimal, which is too much bother. If it would be worthwhile, the template could be reworked to accept £sd input with the pounds shilling and pence separated by hyphens (or slashes).
JIMp
talk·
cont
16:38, 21 March 2013 (UTC)
{{
UK decimalisation|guineas=200}}
210{{
UK decimalisation|£=13|s=12|d=6}}
13.625All the best:
Rich
Farmbrough,
16:10, 14 December 2015 (UTC).
Greetings!
I recently added this template to three articles, but before I go much further, I'd like to get some feedback from other editors on whether or not I'm heading in the right direction. Before I edited them, the articles contained (relatively) modern equivalents of past US dollar amounts that have been "hardcoded" into them. The problem with that method is that those equivalents will become less meaningful over time and may need to be updated periodically. What I've tried to do is insert templated text so that, going forward, the equivalent amounts will automatically stay current. My hope is that this will make those amounts more relevant to readers while requiring less article maintenance by editors.
The three articles in question are:
Of course, if the consensus is that my changes to these articles is inappropriate, I will gladly undo any damage I may have done. Thank you in advance for any comments or suggestions you care to make (please leave them here; I'll keep an eye on this talk page for a while). Cheers! ➢ Bgpaulus <small-caps>( WORDS & DEEDS)</small-caps> 22:41, 1 August 2012 (UTC)
"to the extent that we trust Wired's capacity to measure worth over time correctly", I'd say "don't count on it" – until today, this computer geek, for one, would have gotten it wrong. Then again (asking rhetorically), how many journalists or other "reliable sources" actually understand the information they parrot back to the masses? But enough of that, back to my happy place... Grollτech ( talk) 13:59, 28 November 2012 (UTC)
I have rewritten the /sandbox version to allow commas in the amount, and show error messages for specific problems in the year range or invalid amounts. Parameter "fmt=c" will put commas in the result, or "fmt=eq" will show "equivalent" phrase (default: fmt=raw). For example:
|index=US
(parameter 1) not a recognized index.|index=US
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UN
(parameter 1) not a recognized index.I think the rewrite is working fine, and only increases the expansion depth by 1 level (as 12) to show commas, because each error condition is tested outside the prior template markup and does not nest the depth of calculations. Prior to 2008, a template with error-message validations would expand the size of a formatted page, but since January 2008, the parser includes just the true conditions of if-structures and omits any unused error-message markup. If there are no other concerns, then I will install the new version in a few days. UPDATE: The new version will also allow option "fmt=eq" as in examples above. - Wikid77 ( talk) 12:40, 9 November 2012, 10:43, 12 January 2013 (UTC)
{{
Inflation/UN|1266|2012}}
as the argument in an expression (specifically, {{#expr: 67 {{Inflation/UN|1266|2012}} round 0 }}
, but the template doesn't exist ({{
Inflation/UN/startyear}}
doesn't exist either, but I think that there is sufficient error trapping for that). Rather than throwing potentially non-existent templates into expressions and hoping that {{#iferror:}}
will catch them, it might be better to use code like {{#ifexist:Template:Inflation/{{{1}}}|<!-- continue -->|<!-- fail gracefully -->}}
. --
Redrose64 (
talk)
12:57, 28 November 2012 (UTC)Hi all, great work here! I was wondering when these type formulas:
${{formatprice|{{Inflation|US|200000000|1919|r=1}}}}
would be updated with the 2012 inflation data (to reflect current year 2013 values). Is there some government report we are waiting on . . . or if its already being worked on by wikipedians then you have my thanks!
Market St.⧏ ⧐ Diamond Way
20:32, 2 January 2013 (UTC)
I am now seeing error messages in Ely and Littleport riots of 1816. I do not know what is wrong or how to fix it. Any help would be appreciated. Joja lozzo 18:31, 12 January 2013 (UTC)
Template:Inflation outputs an ugly error message if the currency amount is less than ₤1.00. This is unfortunate, because one pound has historically been considered a large amount compared to prices for most everyday personal transactions, as described in the documentation of the template.
The workarounds below adapt suggestions given on the Template:Inflation documentation page and its talk page for manually converting between currencies. The suggestions here can be used to directly enter amounts in shillings or old pence, for amounts both less than and greater than one pound. — Preceding unsigned comment added by Monomoit ( talk • contribs) 22:37, 12 January 2013
As an example, one author wanted to display the equivalent, in today's money, of ten shillings in 1854.
In this workaround, the amount can be entered directly as 10
, which the template interprets as "10 pounds", 20 times the correct value. To compensate for that interpretation, the #expr
operator is used to divide the result by the same factor. Remember that 20
is simply the number of shillings in one pound. (The round 0
option of #expr
indicates the number of decimal places in the final result.)
Example:
£{{formatnum:{{#expr:( {{Inflation|UK|10|1854|r=0}} / 20 ) round 0 }}|0}}
gives:
£59
The previous example can be adapted to any number of whole shillings. Also, multiples of 3 d. can be entered as a decimal fraction of a whole shilling. For example, 30 s. can be entered as 30
, and 2 s. 6 d. can be entered as 2.50
.
Generally, an amount in shillings and pence needs to be converted to the total number of pence, and the factor 240
used as the divisor. Ether of the following will correctly handle the amount 2 s. 6 d. .
£{{formatnum:{{#expr:( {{Inflation|UK|2.5|1854|r=0}} / 20 ) round 0 }}|0}} £{{formatnum:{{#expr:( {{Inflation|UK|30|1854|r=0}} / 240 ) round 0 }}|0}}
gives:
£15
£15
Monomoit ( talk) 22:37, 12 January 2013 (UTC)
You can put the fractions inside so as to avoid having to use the #expr.
£{{formatnum:{{Inflation|UK|10/20|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|2.5/20|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|30/240|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|2/20+6/240|1854|r=0}}|0}}
give:
£59
£15
£15
£3
JIMp talk· cont 11:08, 22 March 2013 (UTC)
The 'cursign' option doesn't appear to be working, at least in this instance:
I can add the $ manually, but should I be concerned about that option becoming active again at some point? Praemonitus ( talk) 20:23, 20 April 2013 (UTC)
|fmt=eq
to get the "equivalent to" phrase:
|cursign=
parameter sets the currency sign used in the text "equivalent to $". That text only appears when |fmt=eq
is set. --
Redrose64 (
talk)
08:34, 21 April 2013 (UTC)
Is there any possibility that this feature could be extended to display the proper year, and not default to 2013? For example, {{Inflation|US-NGDPPC|60000|1934|fmt=eq|cursign=$}} displays Error when using {{
Inflation}}: |index=US-NGDPPC
(parameter 1) not a recognized index. however that dataset only goes up to 2011. It would vastly simplify things in articles if it would display the appropriate year based on the dataset used.
Imzadi 1979
→
06:39, 11 September 2013 (UTC)
The UK figures are out of date. Rather than overwrite them with new figures I've created a new currency called TEST that can be used e.g. inflation|TEST|90|1900
, and a couple of testcases on {{
Inflation/testcases}}. I've downloaded a new dataset from measuringworth.com; there are differences with the current UK/dataset, but according to measuringworth.com this to be expected and the new data is more accurate. (There also appears to be an error at the end of the current data, where 2009 is less than 2008)?
Could someone else please check over what I have done, before I copy {{
Inflation/TEST/dataset}} into {{
Inflation/UK/dataset}} [just fixing the documentation] and update the year in {{
Inflation-fn}}?
Edgepedia (
talk)
15:23, 28 July 2013 (UTC)
When I've done all that I'll be back.
Edgepedia (
talk) 04:51, 30 July 2013 (UTC)
Done. I've checked a few transclusions and it all looks well to me.
Edgepedia (
talk)
05:02, 30 July 2013 (UTC)
{{
Inflation-year}}
I've just created the template {{
Inflation-year}}
that gives the current year for the relavant inflation figures. For example,
A [[old penny|pre-decimal penny]] was worth in 1836 about the same as {{#expr:{{Inflation|UK|0.0041666|1836|r=2}}*100}}p in {{Inflation-year|UK}}.{{Inflation-fn|UK}}
gives
A pre-decimal penny was worth in 1836 about the same as 50p in 2023. [1]
Of course this needs to be manually updated when the figures are updated. Thoughts? Edgepedia ( talk) 18:17, 7 October 2013 (UTC)
Have you considered adding support for a given number of significant digits? The "r=digit" parameter is somewhat inadequate, since presupposes that the user knows how many digits the final number will have, which is inherently flawed since inflation will change the final number continually over time. -- Doradus ( talk) 16:29, 20 December 2013 (UTC)
{{#expr}}
you could compute the number if digits in a value, then convert the the r= value needed. Assuming templates nest appropriately to do that.
Gah4 (
talk)
00:53, 2 November 2016 (UTC)1781043 Does not work. Why? Nick Beeson ( talk) 01:20, 1 February 2014 (UTC)
{{
Inflation/AU/dataset}}
switch statement, which meant it returned blank and this was trapped as an error. Did it ever work?
Edgepedia (
talk)
07:10, 1 February 2014 (UTC)About a year ago I added the Indian rupee. I have to admit, though, whilst I get how the template works, I'm a bit mystified as to where the data is coming from. The numbers I used to create the Indian rupee conversion were borrowed from someone who was working on {{ INRConvert}}. I hope they were right but it would be nice to check. Another problem is that the range is only from 1953 to 2013. It's now one year on and time to add 2014. Also it might be nice to add values for earlier years.
I wonder whether anyone would feel up to checking these numbers and/or adding more. If not, I wonder whether anyone would be able to point me in the right direction as to where we're normally going to find this data. For example, how about this website which gives an average inflation rate of 10.92% in 2013? Would this make sense given that data?
Jimp 10:46, 7 April 2014 (UTC)
This is extremely useful, I wish I had known about it earlier. Any suggestions on how to find articles that I created in the past that might take use of this? Maury Markowitz ( talk) 15:29, 6 May 2014 (UTC)
Before I added the rounding parameter, U.S. Route 67 in Iowa claimed 50 cents in 2003 was $1 in 2014. -- NE2 06:20, 13 June 2014 (UTC)
If I put "$10 billion" in the raw text, what's the proper way to get the template to give me:
$77 billion in 2014
It doesn't seem this is possible? Maury Markowitz ( talk) 18:15, 18 June 2014 (UTC)
Two questions: First, you need an index appropriate for large numbers. Second, the conversion is linear, so just convert 10 with r=0. Gah4 ( talk) 22:45, 23 November 2016 (UTC)
$10 billion in 1975 was worth ${{Inflation|USNGDPPC|10|1975|2014|r=0}} billion in 2014.
$10 billion in 1975 was worth $Error when using {{
Inflation}}: |index=USNGDPPC
(parameter 1) not a recognized index. billion in 2014.
Gah4 (
talk)
22:53, 23 November 2016 (UTC)
${{formatprice|{{inflation|US-NGDPPC|10000000000|1975}}}} in {{inflation-year|US-NGDPPC}}
|index=US-NGDPPC
(parameter 1) not a recognized index." in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.Hi, is there a way to use this template – {{Inflation|US|800|1942|r=-3|fmt=eq}} – to say "$12,000 in 2014," instead of "equivalent to $12,000 in 2014'? There's a particular article where I'd like to use the template for several figures, but it looks cluttery to keep saying "equivalent to." SlimVirgin (talk) 16:22, 24 July 2014 (UTC)
|fmt=eq
- 15000 You need to add your own currency symbol though. --
Redrose64 (
talk)
16:37, 24 July 2014 (UTC)
|fmt=c
- 15,000. It's all in the template's documentation. --
Redrose64 (
talk)
18:55, 24 July 2014 (UTC)At Sally Hemings there are several dollar figures that predate 1800. Do you have any conversion suggstions?-- TonyTheTiger ( T / C / WP:FOUR / WP:CHICAGO / WP:WAWARD) 22:11, 27 August 2014 (UTC)
Since mid-2013 (see further up this page) we have had the {{ inflation-year}} to note when the inflation figures are accurate to, but there is still no mention of it in the documentation of this template. This is possibly why I'm still finding and fixing other statements in the wild, e.g. [4] [5] [6]. I don't have the time to sort this at the moment (and I'm not the best at writing that sort of thing either), but it is something that should be mentioned. Thryduulf ( talk) 23:18, 3 January 2015 (UTC)
I've been looking around for a way of including inflation adjusted values in the table at List of transport megaprojects, but so far have not been able to find a reliable way of doing it without resorting to original research. This template would seem to be a model for how to do it, but if I understand there is still somewhat of a consensus that you cannot use it for capital projects such as transport megaprojects? Any opinions on the suitability or lack thereof for using this template on that page, and any possible alternatives? Thanks, Peregrine981 ( talk) 20:39, 21 May 2015 (UTC)
At the moment, when the |fmt=eq
parameter is used, the output assumes that the data sets are complete up to the current year. For example:
{{Inflation|UK|2000|1902|r=-4|fmt=eq |cursign=£}}
generates: "equivalent to £190,000 in 2015".
However, the UK dataset only goes up to 2014 and others end earlier than this. Could the template be modified to use {{ inflation-year}} instead of {{CURRENTYEAR}}? We would then get the more accurate "equivalent to £190,000 in 2014". — Preceding unsigned comment added by DavidCane ( talk • contribs) 01:30, 28 May 2015
Right now the template has an option to round off the calculated figure to a certain number of decimal places. There should be a similar option to do it to a certain number of significant figures. BaronBifford ( talk) 09:20, 4 January 2016 (UTC)
If you know the value, the number of digits should normally be close enough. Are there cases where you don't know the number well enough? Gah4 ( talk) 00:37, 2 November 2016 (UTC)
I mostly work on historical articles where the unit of currency is in the millions or billions. I have always tried to use the inflation template to convert to today's values, like this : "$100 million ($250 million today)"
I would like to begin using fmt=eq instead of typing "today", but I cannot figure out how to do it easily with large numbers. There is the difficult to type inflation-year example, but I am not going to use that.
Maury Markowitz ( talk) 02:50, 17 January 2016 (UTC)
{{u|
Checkingfax}} {
Talk}
16:19, 17 January 2016 (UTC)Per WP:RELTIME, "today" and "recently" should be deprecated. Even if "today" actually does mean today, this may not be obvious to the reader. jnestorius( talk) 13:26, 18 January 2016 (UTC)
I have reverted alterations to the template by Djr13. Using the 2016 date in the template generates an error message:
{{Inflation|US|75000000|2016|r=-6}}
results in
{Inflation} - Start year: 2,016 greater than end year, 2,015 for amount: 75,000,000. NaN
While I appreciate that using a 2016 date in the template is redundant at present (there is no inflation data) the fact is data from this year will be added to inflation adjusted lists along with the 2016 date so that the figures are automatically updated in subsequent years. If we are are forced to enter this year's data with last year's date or without a date just so the template will work then this will be a massive inconvenience because it will need to be corrected at some point. More "helpful error messages" is not an acceptable solution. Please make the template work with the 2016 date before restoring the code. Betty Logan ( talk) 01:37, 13 March 2016 (UTC)
start_year
of the current year is requested, the template correctly calculates an inflation of 0% for the period of 2016 to 2016. However, doing this will only result in delaying the error until the year rolls around and the template needs to calculate inflation from 2016 to 2017 without any information yet available from either of these years. This particular error can only be corrected by updating the datasets with more data provided by
reliable sources, or by fixing pages that attempt to use the template incorrectly. It might be inconvenient to deal with the realities of referencing incomplete or outdated datasets, and you might find that inconvenience to be unacceptable, but it is even more unacceptable to sweep the issue under the rug by providing false data under the assumption that eventually someone will update the datasets. Even if you find that assumption trivial with an index like US
which usually is updated fairly frequently, the assumption breaks down on indexes like AU
which so far only has data through 2010. Note also
MOS:RELTIME.
djr13 (
talk)
02:04, 13 March 2016 (UTC)
collapsed rant
|
---|
If a year's data is not available, then the template simply can not provide calculations for that year... If it can't provide calculations without fibbing, then either the template should not be used in that instance, the context it is used in should be changed, or datasets should be expanded. Sometimes data just isn't available, and that is that; calculating or even implying a calculation was done would be an error. (We could change this template to be predictive, at the risk of
WP:SYNTH.)
There's no problem with having inflation data only through 2015 on an encyclopedia in 2016, no more of a problem than referring (with reliable sources) to events from 200 years ago in an encyclopedia in 2016. It's frankly the whole point of an encyclopedia. Per
WP:REALTIME we should not assume that an article or its data will be continually updated, and write in a way that ensures as with
Refusing to output false data is not a problem caused by this template, nor is the template to blame for editors who cludge inputs rather than think about whether an inflation calculation is even appropriate to begin with. Editors can at least be encouraged to fix their mistakes by using more helpful error messages, not by pretending no error exists.
|
start_year
as of that stated year without pretending to calculate inflation, until it finally detects an update to {{Inflation}}. Something like {{#if:{{{start_year}}} >= {{
Inflation-year|{{{index}}}}}|{{{value}}}|{{{value}}} ({{
Inflation|US|{{{value}}}|fmt=eq}})}}
US
is outdated. We could even make it default behavior, though we'd have to code one with and without |fmt=eq
. But even then, editors will need to think about whether the inflation statement will actually be appropriate when it does change over.
djr13 (
talk)
05:07, 13 March 2016 (UTC)
For capital expenditures, we have US-NGDPPC and UKNGDPPC (though dash and non-dash formats work). This isn't ideal. Those only mean something to people with an intimate knowledge of macroeconomics, and they aren't memorable in the slightest, so that I always have to revisit this page to copy the abbreviation. A simple USCAP and UKCAP would be far better abbreviations -- memorable, meaningful, unique, and easy to type. I propose that USCAP and UKCAP should become the new keys, and the old ones redirected to them. Does anyone else agree? SilverbackNet talk 04:07, 5 May 2016 (UTC)
Following up silverbacknet's post... I was directed here after a user suggested to use it for an NBA salary cap page... and have uses for it on hurricane pages and various other articles. But... I have no idea whether I should be using US or US-NGDPPC for each. There's no explanation of what NGDPPC means on the template page... or even a Wikipedia redirect for such. I saw some explanations here, but a clear, simple explanations on which is better for which situations (and perhaps why\how major the difference is) would be extremely appreciated. JeopardyTempest ( talk) 03:13, 22 August 2016 (UTC)
US
uses the
Consumer Price Index, while US-NGDPPC
uses the Nominal Gross Domestic Product per capita. The former is better for small amounts related to the price of individual goods, while the latter is better for capital projects and other large amounts.
Imzadi 1979
→
03:20, 22 August 2016 (UTC)Was noticing that the template appears to lack a format for common language shortening (where for example if $750,000 is now worth $84,000,000, it would automatically display $84 million, rather than having to display the whole value, or update unit set every time it changes (or have quirky 8425 million values). It'd also turn off scientific notation issues (easy enough perhaps? just divide the exponent down after it reaches the template and send the answer back with words instead). But then I noticed the currency converter appears to have really died out as well... was there not much interest\need in the end? Only a toUSD, and it seems poorly up to date, and used on fewer than 100 pages. Been looking at template at editing some recently. But regardless whether it is me or someone else... what priorities exist in enhancements at this point? JeopardyTempest ( talk) 04:04, 22 August 2016 (UTC)
|index=US-NGDPPC
(parameter 1) not a recognized index." in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.
[1])."$145 million (equivalent to ${{formatprice|{{Inflation|US-NGDPPC|145000000|1977|r=-6}}}} in {{Inflation-year|US-NGDPPC}}{{Inflation-fn|US-NGDPPC}})
$145,000 (equivalent to ${{formatnum:{{Inflation|US-NGDPPC|145000|1977|r=-3}}}} in {{Inflation-year|US-NGDPPC}}{{Inflation-fn|US-NGDPPC}})
|index=US-NGDPPC
(parameter 1) not a recognized index. in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.
[1])"References
{{inflation|US-NGDPPC|13000000|1965|r=-5}} in {{inflation-year|US-NGDPPC}}{{inflation-fn|US-NGDPPC}}
was used instead of {{inflation|US-NGDPPC|13000000|1965|r=-5|fmt=eq}}
. I had overlooked the formatprice wrapping the first part and stopped reading the template documentation page at the end of the heading "Very large results" instead of carrying on to the next heading "Format price" (perhaps those should be combined and formatprice should be emphasized as the better way?). Personally still seems it'd be great to include a formatting options inside inflation itself to avoid the long string of code to do this, particularly since it seems fmt=eq has limited utility in its current form? But very glad to have the alternative to sidestep that.As it stands, the template drops a trailing zero in this scenario. I argue that this is a bug and that it should be fixed. Here is an example, showing r=2 and r=3:
$2.50 in 1986 dollars is
(equivalent to $6.95 in 2023)
(equivalent to $6.949 in 2023)
-- Dante Alighieri | Talk 19:51, 26 September 2016 (UTC)
round {{{r|0}}}
, which calls the PHP "round" function. The round function apparently drops trailing zeroes after rounding.
This is the most concise discussion I have found. It looks like access to the PHP "number_format" feature might fix this problem, but I do not see where this exists in WP.
Frietjes or
Mr. Stradivarius, do you know a trick to make the trailing zeroes appear? –
Jonesey95 (
talk)
21:15, 26 September 2016 (UTC)
$2.50 in 1986 dollars is
(Error when using {{
Inflation}}: |index=US
(parameter 1) not a recognized index.)
(Error when using {{
Inflation}}: |index=US
(parameter 1) not a recognized index.)
I just checked the MeasuringWorth.com source for UK inflation rates (link: /ukearncpi), but that website is still limited to 2015. Any ideas where to get estimates for 2016 UK inflation, or other nations, to update Template:Inflation? - Wikid77 ( talk) 14:05, 21 October 2016 (UTC)
Subtemplates of {inflation} treated 2016 inflation as 0% since 2015, but I like the idea of putting 2016 estimates (extending 2015) until official figures can be found. Currently, I've read September 2016 data as UK 0.6% and U.S. 1.5% inflation since Fall 2015:
Other users have indicated 3rd-quarter rates are close enough for the yearly rate. So, I guess I'll start updating templates to use those multipliers for now. - Wikid77 ( talk) 19:28, 21 October 2016 (UTC)
How long until 2016 UK inflation update? 50.64.119.38 ( talk) 03:41, 17 October 2017 (UTC)
A quick check of Special:WhatLinksHere/Template:Inflation revealed that most uses of this template use CPI-based indexes even when adjusting large numbers. This needs to be fixed, but what's the right approach? Not just technically - I imagine it could be done semi-automatically with WP:AWB or the like. Rather, what's the numeric cutoff for which index should be used? Or are there certain categories of figures that should always use one index vs. another regardless of size?-- Father Goose ( talk) 05:26, 24 November 2016 (UTC)
If we want to compare how many people went to see various films, I'd argue we'd be better off sticking with just stating the numbers of tickets sold. Alternatively, if you do want to use CPI for larger numbers/non-household expenses, simply cite a reliable secondary source that does use CPI as the comparison in the article concerned. Otherwise we're back into original research territory. Hchc2009 ( talk) 18:07, 25 November 2016 (UTC)
Thanks for your replies. Can we draw up some rules of thumb for what index to use when and add them to the doc page?
Taking a stab at a general guideline (I'll do what I can to incorporate the discussion so far):
Comments?-- Father Goose ( talk) 18:16, 25 November 2016 (UTC)
Look at Template:Inflation/doc. It's full of "Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |end_year={{{4}}} (parameter 4) and |r={{{r}}}" messages. Can someone fix, please? Thanks. — howcheng { chat} 08:18, 29 November 2016 (UTC)
How would we go about adding more currencies to this template? Schwede 66 22:24, 9 December 2016 (UTC)
There is a problem with the template using the 2016 dates at List_of_highest-grossing_films_in_Canada_and_the_United_States#Not_adjusted_for_inflation:
$Error when using Error when using {{
Inflation}}:
|index=
(parameter 1), |value=
(parameter 2) and |start_year=
(parameter 3) must be specified.: |start_year=2,016 (parameter 3) is greater than the latest available year (2,015) in index "US".
The problem isn't just limited at this article either and seems to be widespread across Wikipedia. Betty Logan ( talk) 21:10, 2 January 2017 (UTC)
In much of this page, there is a distinction between CPI based and GDP/capita based indexing. But is it really one or the other? Could it be a continuum, where one could select a number between 0 and 1, where 0 gives CPI, 1 gives GDP/capita, and values in between give an inflation rate somewhere between? This doesn't help much for things that likely have a completely unrelated index. I will guess that health care costs and rare paintings don't closely follow one of the indices so far implemented. A continuum might require some fundamental changes in the template, though. Gah4 ( talk) 10:26, 21 April 2017 (UTC)
If the data for Russian roubles is available it would be useful to add this, e.g. for articles like Kursk submarine disaster. Thryduulf ( talk) 19:22, 12 August 2017 (UTC)
How far back can this template be used - reliably? There seems to be a large discrepancy a hundred years ago, where the template may say $22,700 but other sources say $96,000 for 2016. [1] The template seems to use GDP as the guideline, but also differs considerably (at $9,300) from a specific GDP-estimate at $33,000 in 2015-prices. [2] One source could be wrong, but two different sources combined seems to indicate a fundamental problem. I stumbled upon the issue here. TGCP ( talk) 00:26, 8 October 2017 (UTC)
|index=US-NGDPPC
(parameter 1) not a recognized index. in 2023 (GDP per capita)References
{{
cite book}}
: |access-date=
requires |url=
(
help); Cite uses deprecated parameter |authors=
(
help)
{{
cite web}}
: Cite uses deprecated parameter |authors=
(
help)
The 2016 numbers are available at the site the UK Inflation template uses for reference. The percent diffences between 2015 to 2016 are here. UK Inflation Change 2015 - 2016 Perhaps someone could update the template? 50.64.119.38 ( talk) 04:27, 17 October 2017 (UTC)
OK, the one that I most often run into is inflation adjustment on the price of computers from the 1960's. There is currently disagreement on using US or US-GDP on one computer. But even more strange, the current state has one for the purchase price and the other for the lease price. So, which one for computer prices? Gah4 ( talk) 05:16, 21 January 2018 (UTC)
@ Jonesey95 and Od1n: The inflation template was added to the USS Enterprise (CVN-65) infobox "original cost" parameter back in July 2016. Today I noticed it was showing an error message and so I've removed it for now. The history shows you two edited this template since, do either of you know what changes may have occurred to create the error? Is new formatting needed? It would be good for the article if a working template could be re-added. Thanks - theWOLFchild 15:33, 24 January 2018 (UTC)
{{
Inflation-year}}
and {{
Inflation-fn}}
(undefined index "US-NGDPPC").
Od1n (
talk)
16:21, 24 January 2018 (UTC)
US-NGDPPC
index was removed. Instead, US-GDP
should be used instead.
Imzadi 1979
→
18:16, 24 January 2018 (UTC)Thanks guys, I've got the correct template in there now. - theWOLFchild 18:36, 24 January 2018 (UTC)
|mode=cs2
to {{
inflation-fn}}, it will switch to CS2 from CS1.
Imzadi 1979
→
19:03, 24 January 2018 (UTC)
Somewhat unrelated: I have added Category:Pages with errors in inflation template as a tracking category to those two additional Inflation templates in order to turn up more instances of problems like this. Tracking categories like this have proved very helpful in fixing errors in many other templates. – Jonesey95 ( talk) 04:11, 25 January 2018 (UTC)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 |
Great work! I would like to adapt this template to the German wikipedia, if you agree. To do so I need to add the inflation rate for DM/ Euro. Would it be usefull to add this currency also in the english template? I provide you with the figures in the hidden text to keep the page readable. Karsten11 ( talk) 18:26, 26 May 2008 (UTC)
Individual currencies in individual pages seems to be a good approach. Only for the german wikipedia we have DM/Euro for Germany, ÖS/Euro für Austria and SFR for Switzerland (and need the exiting USD and GBP too).
There are 3 phases: a) 1951 to 1998: In this phase only DM exists. So each value in articles describing an amount must be in DM. Today DM is history. So these amounts need to be inflation-adjusted and changed into Euro (1 Euro = 1,95583 DM). b) Between 1999-01-01 and 2001-12-31 DM and Euro exists in parallel. So the amount in the article can be given in DM or Euro. Only in the first case it needs to be converted. c) From 2002 we use only Euro. No conversion is needed. An Output schould be everytime in Euro. A manual conversion is possible but not user-friendly. May be we can make the calculation much easier by taking an assumtion, that all amounts in phase b are in DM.
There is no Euro-only inflation. In Europe we measure inflation by country. Even if Germany as well as Ireland use Euro, we have a different inflation rate for both countries. So we have a Inflation rate for Germany, not for the currencies.
Historical inflation rates are a problem. After WW II there was a hyperinflation. The former currency ( German Reichsmark) lost the value and was replaced 1948 by the DM. The inflation rates in the 1940s was so high that it would be necessary to know in which month or week the amount was payed to use the right factor. And: Due to the war the quality of the statistics is rather poor. For the time between 1924 an 1940 inflation rates are available. Ther we would need a factor to link the 1940 value with the value of 1951. This is not easy. 1922/23 there was also a hyperinflation with inflation rates which are not usable. In advance there was the German gold mark. If we can link 1924 and 1921 than we can go back to 1876 when the Goldmark was initialy issued. You can see: It´s a little tricky with german currencies. Karsten11 ( talk) 06:20, 27 May 2008 (UTC)
{{Currconv|DM|EUR|{{Inflation|DE|1000000|1970|2000}}|additional_parameters}}
It would be helpful to round the results to 2 positions after decimal point. Karsten11 ( talk) 11:39, 27 May 2008 (UTC)
This Currconv sounds good. This template can be used in combination with inflation template as well as stand-alone. You are right: The template discussion page is the right place for this discussion. Karsten11 ( talk) 08:48, 28 May 2008 (UTC)
I'd like to inform that Slavery has just became the very first (actual) article in Wikipedia using this template!
The previous, hard-coded version informed that the price for a slave in the USA of 1850 ($1,000) would be "about US$38,000 in present-day terms". After changing it to the dynamically generated {{formatnum:
, though, it now shows the much more accurate "about US$36,600 in present-day terms".
{{
Inflation|US|1000|1850}}
}}
As this template is updated year after year, articles properly edited to take advantage of it will be automatically update too. What could be better for an online encyclopedia which has the moral obligation of staying accurate? So, let's start editing articles accordingly! It's more than worth the effort!
But a reminder: take care to not change hard-coded values present in citations or from referenced sources. Only values whose source is a Wikipedia editor should be turned into a dynamically generated ones. Otherwise, obviously, those citations would become invalid and the edit would have to be reverted.
Have fun!
--
alexgieg (
talk)
14:30, 28 May 2008 (UTC)
I've created a new template, {{
Inflation-fn|country}}
, that makes it easy to add footnotes referencing the source of the data used for calculating inflated values. By using it you'll make the article you're editing even more
WP:V compliant. See the new
documentation section for a typical usage example. --
alexgieg (
talk)
16:30, 30 May 2008 (UTC)
I've made another cool template: {{
Formatprice}}. It avoids the cents problem in the built-in {{formatnum:}}
, while adding some nice capabilities for displaying huge numbers. I've just updated the documentation to explain how to use it in addition to the previous method. Give it a look! --
alexgieg (
talk)
15:36, 6 June 2008 (UTC)
“ | On the down side, {{ Formatprice}} has no built-in intelligent handling of user locale settings, what means that some users might see a dot or a comma the opposite way they'd expect. | ” |
I'd say that this is no downside. It's a question of language not location. In English it's a dot for the decimal point and commas (spaces or nothing at all) for thousands delimitation. In Germany English should still be English. Please don't "solve" this non-problem. JIMp talk· cont 23:41, 8 June 2008 (UTC)
Obviously this is a useful starting point for an unflation template: {{ US Inflation}} is the only preexisting one and is focussed on the single task of inflating USD to current prices. There are a number of issues I can see with this template, some minor quibbles, some quite serious. Ultimately, I'd like to be able to redirect {{ US Inflation}} to call here, but because of those concerns I'd rather not at this time. Anyway problems in roughly descending order:
That's a few things to be getting on with, though point 1 needs to be dealt with: either by changing the source of the info or getting permission to use their data. Oh and here is Canadian CPI data for 1914 - present.-- Nilf anion ( talk) 22:53, 10 June 2008 (UTC)
See the
above discussion about the currency crossing. In short, I'm against it because there are technical difficulties. In Europe there was a period when both the national currency and the EUR existed. To properly incorporate currency conversion in the inflation template itself would mean either: a) adding extra parameters to deal with overlapping currencies, what can easily become an extreme level of complexity to the template once more countries (and maybe currencies) with their own oddities enter the template; or b) arbitrarily setting a threshold, as you suggest. I myself prefer neither, going instead with c) creating a separate template (currently non-existent), named {{
Currconv}}, to deal exclusively with currency conversions. Thus, if an editor wanted values to be converted between currencies, he could wrap it into something like this: {{Formatprice|{{Currconv|DM|EUR|{{Inflation|DE|100000|2001}}}}}}
. No need to go around guessing for him.
Of course, the other approach is also perfectly valid. Karsten11, with whom I talked about this all, decided to implement the German version of this template differently, incorporating the DM to EUR conversion as an automatic 2001 crossing threshold.
Now, nothing prevents one to create new templates based on both {{
Inflation}} and {{
Currconv}}. For example, thinking on your template's name, I imagine one might create a {{
DE Inflation}} that would go around {{#ifexpr:...}}'ing
parameters to decide whether to return a converted value or not over a default threshold. This adds flexibility without bloating. You have some foundational addons, such as this one, and then higher level ones that take advantage of them on their own specific ways, without the need to overcomplexify thing down here.
On the granularity level, it'd be doable with optional named parameters. We could add, say, |sm=
and |em=
for, respectively, start_month and end_month. If the underlying template is granularized enough, the calculation would use both parameters. If it's not, it could simply ignore them. What do you think? --
alexgieg (
talk)
12:13, 11 June 2008 (UTC)
Is there anyway that the template could optionally output something like in 200n after the number, with the most recent year there is data being output when there's not a second year provided. That way when the template is updated with a new year's worth of data, the dollar amount would have a specific date, like "N,NNN in 2007", rather than something more nebulous like "N,NNN today"? — Bellhalla ( talk) 12:19, 20 June 2008 (UTC)
The preliminary inflation rate for € in 2007 is 2,6 % Karsten11 ( talk) 15:03, 31 December 2008 (UTC)
The calculation could be made more efficient if it stored a cumulated inflation factor, i.e. inflation since the startyear. To calculate inflation from year A to year B, you'd just divide the cumulated inflation from startyear to B by the cumulated inflation from startyear to A. For the UK template in particular, it would bring it from evaluating 743 #ifexpr:
functions down to two #switch
functions. Only downside is that updating the data is not quite as straight forward, but since that only happens once a year ...
Amalthea
13:39, 20 April 2009 (UTC)
#switch
}}es aren't that efficient either.
JIMp
talk·
cont
00:08, 15 August 2009 (UTC)
#switch
}} (such a {{#switch
}} would be smaller & have the most common currencies up the top to enhance performance with respect to template limits). You go from the start-year subtemplate to the end-year subtemplate dividing one value by the other & then multiplying by the input vlaue. It should be more efficient and in the long run ... probably a pretty long long run judging by the size of some of those existent subtemplates ... might save time by having only one subtemplate to create per year (as opposed to having several to update).
JIMp
talk·
cont
00:27, 15 August 2009 (UTC)Since someone offered in the "Limitations" section of [1], I would like to see a deinflation option added. The reason is that it is sometimes necessary to compare the specific price in an article, for example about a new product, with general price from an earlier period. "This convertable is more affordable than models produced in the 1960s." That is, the reader may not know or care about some particular, specific model from 40 years ago, but they may be interested in mapping the current product information back to (unidentified, unknowable) products that they recognize. (Maybe not a 1960s automobile at all, but a 1960s boat, house, salary, etc.) Thoughts? Piano non troppo ( talk) 02:56, 20 August 2009 (UTC)
I'm ok with this defaulting to "recently", but when values are actually calculated, does this evaluate as {{ Currentyear}} so that it updates on the fly, or does it depend on whether this template is subst'd? It obviously saves a great deal of effort if we don't need to update end_year manually. Or have I missed something? Rodhull andemu 23:48, 17 October 2010 (UTC)
I was trying to calculate inflation for $8,000 received from George Washington's 1799 will, but discovered that I had to use the year 1800. I then noticed inflation from 1800 and 1801 resulted in less money in today's terms than in 1802. Shouldn't there be more money the older you go back in time due to inflation? Here is a short table to show you what I mean:
Why is 1800 ($102,211.76) and 1801 ($104,256) less than 1802 ($121,227.91)?-- Uzma Gamal ( talk) 10:06, 17 November 2010 (UTC)
I'd like to use this template in the article for the 1927 silent film Metropolis. Specifically, I'd like to have this figure's current value in euros:
“ | The most expensive silent film ever made, it cost approximately 5 million Reichsmark. | ” |
But it's not straightforward. Any suggestions? — Athelwulf [T]/ [C] 00:01, 19 December 2010 (UTC)
Inflation/UK/dataset cites a US dataset incorrectly in its documentation. Fifelfoo ( talk) 00:53, 11 January 2011 (UTC)
Can the template author explain how Template:Inflation/UK/dataset's figures relate to the MW figures it is based on at MW UK RPI dataset? If they could document this relationship, I could clone the RPI long series for long series Average Nominal, Average Real, GDP sets, etc. Fifelfoo ( talk) 01:01, 11 January 2011 (UTC)
Since the documentation has been updated noting not to use this template for things other than consumer goods, I have a request/question. Can we add a parameter to this template to specify which inflationary adjustment calculation method is used and then add the necessary datasets to make that happen? I've found the concept of having constantly updating inflation adjustments via template to be incredibly useful, but if this template is wrong for certain uses, can we update it so we can make it work for other applications? Imzadi 1979 → 10:16, 24 January 2011 (UTC)
Whether one wishes to use CPI or some other price index depends on the question one is asking. Fifelfoo is probably right that using CPI to compare the expenditures of the rich across time is fraught with problems, since CPI is based on a consumption basket of a "typical" household, rather than a "wealthy" household (in historical terms an added complication is that a 19th century "wealthy" household was in fact poorer than a "poor" household today in absolute terms, save perhaps the top .00001% of population). This doesn't make this template invalid, it just means it should be used with extreme caution. I was a little worried about which price series was used for the pre-industrial revolution but it seems that it was from the measuringworth.com website, which as far as I can tell uses the Bowley-Wood price series, which, while they do have some (understandable) problems, are pretty much "the best there is". Volunteer Marek ( talk) 00:29, 23 March 2011 (UTC)
I'm still a little lost as to why one can't use CPI for government purchases - it's done all the time. Volunteer Marek ( talk) 00:31, 23 March 2011 (UTC)
Just discovered this. Incredible!
I would like to ask for something (kind of touched on earlier, above) for output. I would like to see the output for ${{inflation|country|n1|year}} as "$n1 in year ($converted n1 in 2008)" or something that defaults to a complete explanation. The default could be overridden, for say, tables. Student7 ( talk) 19:57, 24 April 2011 (UTC)
Dear editors, I'd like to announce a beta phase for the UK National Gross Domestic Product per capita inflation template: UKNGDPPC. For example:
|index=UKNGDPPC
(parameter 1) not a recognized index. billion.
[2]I am having trouble with Australian dollars. I can specify 2000 dollars in 2008 dollars (eg. {{Inflation|AU|100|2000|2008}} is 128) but 2009 or later gives me a NaN (eg. {{Inflation|AU|100|2000|2009}} is 131). Any ideas? Hawkeye7 ( talk) 20:10, 5 November 2011 (UTC)
Dear editors, I'd like to announce a beta phase for the US National Gross Domestic Product per capita inflation template: US-NGDPPC. For example:
|index=US-NGDPPC
(parameter 1) not a recognized index..
[1]While Statistics Canada uses a CPI historical series definition that is amenable to human calculation, such a calculation requires the revised Canada-wide point averages for all months in a year being averaged. It cannot be supplied by taking November point averages. (And it certainly didn't extend the series to 2012!). Fifelfoo ( talk) 00:53, 17 January 2012 (UTC)
I used this template in an article, for US dollars. It works okay, but the citation it generates says "US Commerce dept data 1800-2008". In fact, that web site it refers to is current up to 2012, so that text should be changed to "1800-2012". I'm busy now, so I have no time to try to do it myself .. hoping someone else has time. -- Noleander ( talk) 21:45, 19 March 2012 (UTC)
There is no hint as to how to input amounts of money before 15 February 1971, when the UK decimalised, replacing the shilling and penny with a single subdivision, the new penny. I am trying to find out the value of £1 15s in 1800. Do I have to convert that to £1.75 ? Nick Beeson ( talk) 14:20, 26 March 2012 (UTC)
inflation|UK|1.75|1800
}} you could use {{inflation|UK|1+15/20|1800
}}, instead of {{Inflation|UK|23.1125|1869
}} you could use {{Inflation|UK|23+2/20+3/240|1869
}} and instead of {{Inflation|UK|4.925|1869
}} you could use {{Inflation|UK|4+18/20+6/240|1869
}}. It's no big deal when the number of pennies (or farthings for that matter) is a multiple of three but if not you get either 3 or 6 recurring in the decimal, which is too much bother. If it would be worthwhile, the template could be reworked to accept £sd input with the pounds shilling and pence separated by hyphens (or slashes).
JIMp
talk·
cont
16:38, 21 March 2013 (UTC)
{{
UK decimalisation|guineas=200}}
210{{
UK decimalisation|£=13|s=12|d=6}}
13.625All the best:
Rich
Farmbrough,
16:10, 14 December 2015 (UTC).
Greetings!
I recently added this template to three articles, but before I go much further, I'd like to get some feedback from other editors on whether or not I'm heading in the right direction. Before I edited them, the articles contained (relatively) modern equivalents of past US dollar amounts that have been "hardcoded" into them. The problem with that method is that those equivalents will become less meaningful over time and may need to be updated periodically. What I've tried to do is insert templated text so that, going forward, the equivalent amounts will automatically stay current. My hope is that this will make those amounts more relevant to readers while requiring less article maintenance by editors.
The three articles in question are:
Of course, if the consensus is that my changes to these articles is inappropriate, I will gladly undo any damage I may have done. Thank you in advance for any comments or suggestions you care to make (please leave them here; I'll keep an eye on this talk page for a while). Cheers! ➢ Bgpaulus <small-caps>( WORDS & DEEDS)</small-caps> 22:41, 1 August 2012 (UTC)
"to the extent that we trust Wired's capacity to measure worth over time correctly", I'd say "don't count on it" – until today, this computer geek, for one, would have gotten it wrong. Then again (asking rhetorically), how many journalists or other "reliable sources" actually understand the information they parrot back to the masses? But enough of that, back to my happy place... Grollτech ( talk) 13:59, 28 November 2012 (UTC)
I have rewritten the /sandbox version to allow commas in the amount, and show error messages for specific problems in the year range or invalid amounts. Parameter "fmt=c" will put commas in the result, or "fmt=eq" will show "equivalent" phrase (default: fmt=raw). For example:
|index=US
(parameter 1) not a recognized index.|index=US
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UK
(parameter 1) not a recognized index.|index=UN
(parameter 1) not a recognized index.I think the rewrite is working fine, and only increases the expansion depth by 1 level (as 12) to show commas, because each error condition is tested outside the prior template markup and does not nest the depth of calculations. Prior to 2008, a template with error-message validations would expand the size of a formatted page, but since January 2008, the parser includes just the true conditions of if-structures and omits any unused error-message markup. If there are no other concerns, then I will install the new version in a few days. UPDATE: The new version will also allow option "fmt=eq" as in examples above. - Wikid77 ( talk) 12:40, 9 November 2012, 10:43, 12 January 2013 (UTC)
{{
Inflation/UN|1266|2012}}
as the argument in an expression (specifically, {{#expr: 67 {{Inflation/UN|1266|2012}} round 0 }}
, but the template doesn't exist ({{
Inflation/UN/startyear}}
doesn't exist either, but I think that there is sufficient error trapping for that). Rather than throwing potentially non-existent templates into expressions and hoping that {{#iferror:}}
will catch them, it might be better to use code like {{#ifexist:Template:Inflation/{{{1}}}|<!-- continue -->|<!-- fail gracefully -->}}
. --
Redrose64 (
talk)
12:57, 28 November 2012 (UTC)Hi all, great work here! I was wondering when these type formulas:
${{formatprice|{{Inflation|US|200000000|1919|r=1}}}}
would be updated with the 2012 inflation data (to reflect current year 2013 values). Is there some government report we are waiting on . . . or if its already being worked on by wikipedians then you have my thanks!
Market St.⧏ ⧐ Diamond Way
20:32, 2 January 2013 (UTC)
I am now seeing error messages in Ely and Littleport riots of 1816. I do not know what is wrong or how to fix it. Any help would be appreciated. Joja lozzo 18:31, 12 January 2013 (UTC)
Template:Inflation outputs an ugly error message if the currency amount is less than ₤1.00. This is unfortunate, because one pound has historically been considered a large amount compared to prices for most everyday personal transactions, as described in the documentation of the template.
The workarounds below adapt suggestions given on the Template:Inflation documentation page and its talk page for manually converting between currencies. The suggestions here can be used to directly enter amounts in shillings or old pence, for amounts both less than and greater than one pound. — Preceding unsigned comment added by Monomoit ( talk • contribs) 22:37, 12 January 2013
As an example, one author wanted to display the equivalent, in today's money, of ten shillings in 1854.
In this workaround, the amount can be entered directly as 10
, which the template interprets as "10 pounds", 20 times the correct value. To compensate for that interpretation, the #expr
operator is used to divide the result by the same factor. Remember that 20
is simply the number of shillings in one pound. (The round 0
option of #expr
indicates the number of decimal places in the final result.)
Example:
£{{formatnum:{{#expr:( {{Inflation|UK|10|1854|r=0}} / 20 ) round 0 }}|0}}
gives:
£59
The previous example can be adapted to any number of whole shillings. Also, multiples of 3 d. can be entered as a decimal fraction of a whole shilling. For example, 30 s. can be entered as 30
, and 2 s. 6 d. can be entered as 2.50
.
Generally, an amount in shillings and pence needs to be converted to the total number of pence, and the factor 240
used as the divisor. Ether of the following will correctly handle the amount 2 s. 6 d. .
£{{formatnum:{{#expr:( {{Inflation|UK|2.5|1854|r=0}} / 20 ) round 0 }}|0}} £{{formatnum:{{#expr:( {{Inflation|UK|30|1854|r=0}} / 240 ) round 0 }}|0}}
gives:
£15
£15
Monomoit ( talk) 22:37, 12 January 2013 (UTC)
You can put the fractions inside so as to avoid having to use the #expr.
£{{formatnum:{{Inflation|UK|10/20|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|2.5/20|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|30/240|1854|r=0}}|0}} £{{formatnum:{{Inflation|UK|2/20+6/240|1854|r=0}}|0}}
give:
£59
£15
£15
£3
JIMp talk· cont 11:08, 22 March 2013 (UTC)
The 'cursign' option doesn't appear to be working, at least in this instance:
I can add the $ manually, but should I be concerned about that option becoming active again at some point? Praemonitus ( talk) 20:23, 20 April 2013 (UTC)
|fmt=eq
to get the "equivalent to" phrase:
|cursign=
parameter sets the currency sign used in the text "equivalent to $". That text only appears when |fmt=eq
is set. --
Redrose64 (
talk)
08:34, 21 April 2013 (UTC)
Is there any possibility that this feature could be extended to display the proper year, and not default to 2013? For example, {{Inflation|US-NGDPPC|60000|1934|fmt=eq|cursign=$}} displays Error when using {{
Inflation}}: |index=US-NGDPPC
(parameter 1) not a recognized index. however that dataset only goes up to 2011. It would vastly simplify things in articles if it would display the appropriate year based on the dataset used.
Imzadi 1979
→
06:39, 11 September 2013 (UTC)
The UK figures are out of date. Rather than overwrite them with new figures I've created a new currency called TEST that can be used e.g. inflation|TEST|90|1900
, and a couple of testcases on {{
Inflation/testcases}}. I've downloaded a new dataset from measuringworth.com; there are differences with the current UK/dataset, but according to measuringworth.com this to be expected and the new data is more accurate. (There also appears to be an error at the end of the current data, where 2009 is less than 2008)?
Could someone else please check over what I have done, before I copy {{
Inflation/TEST/dataset}} into {{
Inflation/UK/dataset}} [just fixing the documentation] and update the year in {{
Inflation-fn}}?
Edgepedia (
talk)
15:23, 28 July 2013 (UTC)
When I've done all that I'll be back.
Edgepedia (
talk) 04:51, 30 July 2013 (UTC)
Done. I've checked a few transclusions and it all looks well to me.
Edgepedia (
talk)
05:02, 30 July 2013 (UTC)
{{
Inflation-year}}
I've just created the template {{
Inflation-year}}
that gives the current year for the relavant inflation figures. For example,
A [[old penny|pre-decimal penny]] was worth in 1836 about the same as {{#expr:{{Inflation|UK|0.0041666|1836|r=2}}*100}}p in {{Inflation-year|UK}}.{{Inflation-fn|UK}}
gives
A pre-decimal penny was worth in 1836 about the same as 50p in 2023. [1]
Of course this needs to be manually updated when the figures are updated. Thoughts? Edgepedia ( talk) 18:17, 7 October 2013 (UTC)
Have you considered adding support for a given number of significant digits? The "r=digit" parameter is somewhat inadequate, since presupposes that the user knows how many digits the final number will have, which is inherently flawed since inflation will change the final number continually over time. -- Doradus ( talk) 16:29, 20 December 2013 (UTC)
{{#expr}}
you could compute the number if digits in a value, then convert the the r= value needed. Assuming templates nest appropriately to do that.
Gah4 (
talk)
00:53, 2 November 2016 (UTC)1781043 Does not work. Why? Nick Beeson ( talk) 01:20, 1 February 2014 (UTC)
{{
Inflation/AU/dataset}}
switch statement, which meant it returned blank and this was trapped as an error. Did it ever work?
Edgepedia (
talk)
07:10, 1 February 2014 (UTC)About a year ago I added the Indian rupee. I have to admit, though, whilst I get how the template works, I'm a bit mystified as to where the data is coming from. The numbers I used to create the Indian rupee conversion were borrowed from someone who was working on {{ INRConvert}}. I hope they were right but it would be nice to check. Another problem is that the range is only from 1953 to 2013. It's now one year on and time to add 2014. Also it might be nice to add values for earlier years.
I wonder whether anyone would feel up to checking these numbers and/or adding more. If not, I wonder whether anyone would be able to point me in the right direction as to where we're normally going to find this data. For example, how about this website which gives an average inflation rate of 10.92% in 2013? Would this make sense given that data?
Jimp 10:46, 7 April 2014 (UTC)
This is extremely useful, I wish I had known about it earlier. Any suggestions on how to find articles that I created in the past that might take use of this? Maury Markowitz ( talk) 15:29, 6 May 2014 (UTC)
Before I added the rounding parameter, U.S. Route 67 in Iowa claimed 50 cents in 2003 was $1 in 2014. -- NE2 06:20, 13 June 2014 (UTC)
If I put "$10 billion" in the raw text, what's the proper way to get the template to give me:
$77 billion in 2014
It doesn't seem this is possible? Maury Markowitz ( talk) 18:15, 18 June 2014 (UTC)
Two questions: First, you need an index appropriate for large numbers. Second, the conversion is linear, so just convert 10 with r=0. Gah4 ( talk) 22:45, 23 November 2016 (UTC)
$10 billion in 1975 was worth ${{Inflation|USNGDPPC|10|1975|2014|r=0}} billion in 2014.
$10 billion in 1975 was worth $Error when using {{
Inflation}}: |index=USNGDPPC
(parameter 1) not a recognized index. billion in 2014.
Gah4 (
talk)
22:53, 23 November 2016 (UTC)
${{formatprice|{{inflation|US-NGDPPC|10000000000|1975}}}} in {{inflation-year|US-NGDPPC}}
|index=US-NGDPPC
(parameter 1) not a recognized index." in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.Hi, is there a way to use this template – {{Inflation|US|800|1942|r=-3|fmt=eq}} – to say "$12,000 in 2014," instead of "equivalent to $12,000 in 2014'? There's a particular article where I'd like to use the template for several figures, but it looks cluttery to keep saying "equivalent to." SlimVirgin (talk) 16:22, 24 July 2014 (UTC)
|fmt=eq
- 15000 You need to add your own currency symbol though. --
Redrose64 (
talk)
16:37, 24 July 2014 (UTC)
|fmt=c
- 15,000. It's all in the template's documentation. --
Redrose64 (
talk)
18:55, 24 July 2014 (UTC)At Sally Hemings there are several dollar figures that predate 1800. Do you have any conversion suggstions?-- TonyTheTiger ( T / C / WP:FOUR / WP:CHICAGO / WP:WAWARD) 22:11, 27 August 2014 (UTC)
Since mid-2013 (see further up this page) we have had the {{ inflation-year}} to note when the inflation figures are accurate to, but there is still no mention of it in the documentation of this template. This is possibly why I'm still finding and fixing other statements in the wild, e.g. [4] [5] [6]. I don't have the time to sort this at the moment (and I'm not the best at writing that sort of thing either), but it is something that should be mentioned. Thryduulf ( talk) 23:18, 3 January 2015 (UTC)
I've been looking around for a way of including inflation adjusted values in the table at List of transport megaprojects, but so far have not been able to find a reliable way of doing it without resorting to original research. This template would seem to be a model for how to do it, but if I understand there is still somewhat of a consensus that you cannot use it for capital projects such as transport megaprojects? Any opinions on the suitability or lack thereof for using this template on that page, and any possible alternatives? Thanks, Peregrine981 ( talk) 20:39, 21 May 2015 (UTC)
At the moment, when the |fmt=eq
parameter is used, the output assumes that the data sets are complete up to the current year. For example:
{{Inflation|UK|2000|1902|r=-4|fmt=eq |cursign=£}}
generates: "equivalent to £190,000 in 2015".
However, the UK dataset only goes up to 2014 and others end earlier than this. Could the template be modified to use {{ inflation-year}} instead of {{CURRENTYEAR}}? We would then get the more accurate "equivalent to £190,000 in 2014". — Preceding unsigned comment added by DavidCane ( talk • contribs) 01:30, 28 May 2015
Right now the template has an option to round off the calculated figure to a certain number of decimal places. There should be a similar option to do it to a certain number of significant figures. BaronBifford ( talk) 09:20, 4 January 2016 (UTC)
If you know the value, the number of digits should normally be close enough. Are there cases where you don't know the number well enough? Gah4 ( talk) 00:37, 2 November 2016 (UTC)
I mostly work on historical articles where the unit of currency is in the millions or billions. I have always tried to use the inflation template to convert to today's values, like this : "$100 million ($250 million today)"
I would like to begin using fmt=eq instead of typing "today", but I cannot figure out how to do it easily with large numbers. There is the difficult to type inflation-year example, but I am not going to use that.
Maury Markowitz ( talk) 02:50, 17 January 2016 (UTC)
{{u|
Checkingfax}} {
Talk}
16:19, 17 January 2016 (UTC)Per WP:RELTIME, "today" and "recently" should be deprecated. Even if "today" actually does mean today, this may not be obvious to the reader. jnestorius( talk) 13:26, 18 January 2016 (UTC)
I have reverted alterations to the template by Djr13. Using the 2016 date in the template generates an error message:
{{Inflation|US|75000000|2016|r=-6}}
results in
{Inflation} - Start year: 2,016 greater than end year, 2,015 for amount: 75,000,000. NaN
While I appreciate that using a 2016 date in the template is redundant at present (there is no inflation data) the fact is data from this year will be added to inflation adjusted lists along with the 2016 date so that the figures are automatically updated in subsequent years. If we are are forced to enter this year's data with last year's date or without a date just so the template will work then this will be a massive inconvenience because it will need to be corrected at some point. More "helpful error messages" is not an acceptable solution. Please make the template work with the 2016 date before restoring the code. Betty Logan ( talk) 01:37, 13 March 2016 (UTC)
start_year
of the current year is requested, the template correctly calculates an inflation of 0% for the period of 2016 to 2016. However, doing this will only result in delaying the error until the year rolls around and the template needs to calculate inflation from 2016 to 2017 without any information yet available from either of these years. This particular error can only be corrected by updating the datasets with more data provided by
reliable sources, or by fixing pages that attempt to use the template incorrectly. It might be inconvenient to deal with the realities of referencing incomplete or outdated datasets, and you might find that inconvenience to be unacceptable, but it is even more unacceptable to sweep the issue under the rug by providing false data under the assumption that eventually someone will update the datasets. Even if you find that assumption trivial with an index like US
which usually is updated fairly frequently, the assumption breaks down on indexes like AU
which so far only has data through 2010. Note also
MOS:RELTIME.
djr13 (
talk)
02:04, 13 March 2016 (UTC)
collapsed rant
|
---|
If a year's data is not available, then the template simply can not provide calculations for that year... If it can't provide calculations without fibbing, then either the template should not be used in that instance, the context it is used in should be changed, or datasets should be expanded. Sometimes data just isn't available, and that is that; calculating or even implying a calculation was done would be an error. (We could change this template to be predictive, at the risk of
WP:SYNTH.)
There's no problem with having inflation data only through 2015 on an encyclopedia in 2016, no more of a problem than referring (with reliable sources) to events from 200 years ago in an encyclopedia in 2016. It's frankly the whole point of an encyclopedia. Per
WP:REALTIME we should not assume that an article or its data will be continually updated, and write in a way that ensures as with
Refusing to output false data is not a problem caused by this template, nor is the template to blame for editors who cludge inputs rather than think about whether an inflation calculation is even appropriate to begin with. Editors can at least be encouraged to fix their mistakes by using more helpful error messages, not by pretending no error exists.
|
start_year
as of that stated year without pretending to calculate inflation, until it finally detects an update to {{Inflation}}. Something like {{#if:{{{start_year}}} >= {{
Inflation-year|{{{index}}}}}|{{{value}}}|{{{value}}} ({{
Inflation|US|{{{value}}}|fmt=eq}})}}
US
is outdated. We could even make it default behavior, though we'd have to code one with and without |fmt=eq
. But even then, editors will need to think about whether the inflation statement will actually be appropriate when it does change over.
djr13 (
talk)
05:07, 13 March 2016 (UTC)
For capital expenditures, we have US-NGDPPC and UKNGDPPC (though dash and non-dash formats work). This isn't ideal. Those only mean something to people with an intimate knowledge of macroeconomics, and they aren't memorable in the slightest, so that I always have to revisit this page to copy the abbreviation. A simple USCAP and UKCAP would be far better abbreviations -- memorable, meaningful, unique, and easy to type. I propose that USCAP and UKCAP should become the new keys, and the old ones redirected to them. Does anyone else agree? SilverbackNet talk 04:07, 5 May 2016 (UTC)
Following up silverbacknet's post... I was directed here after a user suggested to use it for an NBA salary cap page... and have uses for it on hurricane pages and various other articles. But... I have no idea whether I should be using US or US-NGDPPC for each. There's no explanation of what NGDPPC means on the template page... or even a Wikipedia redirect for such. I saw some explanations here, but a clear, simple explanations on which is better for which situations (and perhaps why\how major the difference is) would be extremely appreciated. JeopardyTempest ( talk) 03:13, 22 August 2016 (UTC)
US
uses the
Consumer Price Index, while US-NGDPPC
uses the Nominal Gross Domestic Product per capita. The former is better for small amounts related to the price of individual goods, while the latter is better for capital projects and other large amounts.
Imzadi 1979
→
03:20, 22 August 2016 (UTC)Was noticing that the template appears to lack a format for common language shortening (where for example if $750,000 is now worth $84,000,000, it would automatically display $84 million, rather than having to display the whole value, or update unit set every time it changes (or have quirky 8425 million values). It'd also turn off scientific notation issues (easy enough perhaps? just divide the exponent down after it reaches the template and send the answer back with words instead). But then I noticed the currency converter appears to have really died out as well... was there not much interest\need in the end? Only a toUSD, and it seems poorly up to date, and used on fewer than 100 pages. Been looking at template at editing some recently. But regardless whether it is me or someone else... what priorities exist in enhancements at this point? JeopardyTempest ( talk) 04:04, 22 August 2016 (UTC)
|index=US-NGDPPC
(parameter 1) not a recognized index." in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.
[1])."$145 million (equivalent to ${{formatprice|{{Inflation|US-NGDPPC|145000000|1977|r=-6}}}} in {{Inflation-year|US-NGDPPC}}{{Inflation-fn|US-NGDPPC}})
$145,000 (equivalent to ${{formatnum:{{Inflation|US-NGDPPC|145000|1977|r=-3}}}} in {{Inflation-year|US-NGDPPC}}{{Inflation-fn|US-NGDPPC}})
|index=US-NGDPPC
(parameter 1) not a recognized index. in Error: undefined index "US-NGDPPC" when using {{
Inflation/year}}.
[1])"References
{{inflation|US-NGDPPC|13000000|1965|r=-5}} in {{inflation-year|US-NGDPPC}}{{inflation-fn|US-NGDPPC}}
was used instead of {{inflation|US-NGDPPC|13000000|1965|r=-5|fmt=eq}}
. I had overlooked the formatprice wrapping the first part and stopped reading the template documentation page at the end of the heading "Very large results" instead of carrying on to the next heading "Format price" (perhaps those should be combined and formatprice should be emphasized as the better way?). Personally still seems it'd be great to include a formatting options inside inflation itself to avoid the long string of code to do this, particularly since it seems fmt=eq has limited utility in its current form? But very glad to have the alternative to sidestep that.As it stands, the template drops a trailing zero in this scenario. I argue that this is a bug and that it should be fixed. Here is an example, showing r=2 and r=3:
$2.50 in 1986 dollars is
(equivalent to $6.95 in 2023)
(equivalent to $6.949 in 2023)
-- Dante Alighieri | Talk 19:51, 26 September 2016 (UTC)
round {{{r|0}}}
, which calls the PHP "round" function. The round function apparently drops trailing zeroes after rounding.
This is the most concise discussion I have found. It looks like access to the PHP "number_format" feature might fix this problem, but I do not see where this exists in WP.
Frietjes or
Mr. Stradivarius, do you know a trick to make the trailing zeroes appear? –
Jonesey95 (
talk)
21:15, 26 September 2016 (UTC)
$2.50 in 1986 dollars is
(Error when using {{
Inflation}}: |index=US
(parameter 1) not a recognized index.)
(Error when using {{
Inflation}}: |index=US
(parameter 1) not a recognized index.)
I just checked the MeasuringWorth.com source for UK inflation rates (link: /ukearncpi), but that website is still limited to 2015. Any ideas where to get estimates for 2016 UK inflation, or other nations, to update Template:Inflation? - Wikid77 ( talk) 14:05, 21 October 2016 (UTC)
Subtemplates of {inflation} treated 2016 inflation as 0% since 2015, but I like the idea of putting 2016 estimates (extending 2015) until official figures can be found. Currently, I've read September 2016 data as UK 0.6% and U.S. 1.5% inflation since Fall 2015:
Other users have indicated 3rd-quarter rates are close enough for the yearly rate. So, I guess I'll start updating templates to use those multipliers for now. - Wikid77 ( talk) 19:28, 21 October 2016 (UTC)
How long until 2016 UK inflation update? 50.64.119.38 ( talk) 03:41, 17 October 2017 (UTC)
A quick check of Special:WhatLinksHere/Template:Inflation revealed that most uses of this template use CPI-based indexes even when adjusting large numbers. This needs to be fixed, but what's the right approach? Not just technically - I imagine it could be done semi-automatically with WP:AWB or the like. Rather, what's the numeric cutoff for which index should be used? Or are there certain categories of figures that should always use one index vs. another regardless of size?-- Father Goose ( talk) 05:26, 24 November 2016 (UTC)
If we want to compare how many people went to see various films, I'd argue we'd be better off sticking with just stating the numbers of tickets sold. Alternatively, if you do want to use CPI for larger numbers/non-household expenses, simply cite a reliable secondary source that does use CPI as the comparison in the article concerned. Otherwise we're back into original research territory. Hchc2009 ( talk) 18:07, 25 November 2016 (UTC)
Thanks for your replies. Can we draw up some rules of thumb for what index to use when and add them to the doc page?
Taking a stab at a general guideline (I'll do what I can to incorporate the discussion so far):
Comments?-- Father Goose ( talk) 18:16, 25 November 2016 (UTC)
Look at Template:Inflation/doc. It's full of "Error when using {{Inflation}}: NaN, check parameters for non-numeric data: |end_year={{{4}}} (parameter 4) and |r={{{r}}}" messages. Can someone fix, please? Thanks. — howcheng { chat} 08:18, 29 November 2016 (UTC)
How would we go about adding more currencies to this template? Schwede 66 22:24, 9 December 2016 (UTC)
There is a problem with the template using the 2016 dates at List_of_highest-grossing_films_in_Canada_and_the_United_States#Not_adjusted_for_inflation:
$Error when using Error when using {{
Inflation}}:
|index=
(parameter 1), |value=
(parameter 2) and |start_year=
(parameter 3) must be specified.: |start_year=2,016 (parameter 3) is greater than the latest available year (2,015) in index "US".
The problem isn't just limited at this article either and seems to be widespread across Wikipedia. Betty Logan ( talk) 21:10, 2 January 2017 (UTC)
In much of this page, there is a distinction between CPI based and GDP/capita based indexing. But is it really one or the other? Could it be a continuum, where one could select a number between 0 and 1, where 0 gives CPI, 1 gives GDP/capita, and values in between give an inflation rate somewhere between? This doesn't help much for things that likely have a completely unrelated index. I will guess that health care costs and rare paintings don't closely follow one of the indices so far implemented. A continuum might require some fundamental changes in the template, though. Gah4 ( talk) 10:26, 21 April 2017 (UTC)
If the data for Russian roubles is available it would be useful to add this, e.g. for articles like Kursk submarine disaster. Thryduulf ( talk) 19:22, 12 August 2017 (UTC)
How far back can this template be used - reliably? There seems to be a large discrepancy a hundred years ago, where the template may say $22,700 but other sources say $96,000 for 2016. [1] The template seems to use GDP as the guideline, but also differs considerably (at $9,300) from a specific GDP-estimate at $33,000 in 2015-prices. [2] One source could be wrong, but two different sources combined seems to indicate a fundamental problem. I stumbled upon the issue here. TGCP ( talk) 00:26, 8 October 2017 (UTC)
|index=US-NGDPPC
(parameter 1) not a recognized index. in 2023 (GDP per capita)References
{{
cite book}}
: |access-date=
requires |url=
(
help); Cite uses deprecated parameter |authors=
(
help)
{{
cite web}}
: Cite uses deprecated parameter |authors=
(
help)
The 2016 numbers are available at the site the UK Inflation template uses for reference. The percent diffences between 2015 to 2016 are here. UK Inflation Change 2015 - 2016 Perhaps someone could update the template? 50.64.119.38 ( talk) 04:27, 17 October 2017 (UTC)
OK, the one that I most often run into is inflation adjustment on the price of computers from the 1960's. There is currently disagreement on using US or US-GDP on one computer. But even more strange, the current state has one for the purchase price and the other for the lease price. So, which one for computer prices? Gah4 ( talk) 05:16, 21 January 2018 (UTC)
@ Jonesey95 and Od1n: The inflation template was added to the USS Enterprise (CVN-65) infobox "original cost" parameter back in July 2016. Today I noticed it was showing an error message and so I've removed it for now. The history shows you two edited this template since, do either of you know what changes may have occurred to create the error? Is new formatting needed? It would be good for the article if a working template could be re-added. Thanks - theWOLFchild 15:33, 24 January 2018 (UTC)
{{
Inflation-year}}
and {{
Inflation-fn}}
(undefined index "US-NGDPPC").
Od1n (
talk)
16:21, 24 January 2018 (UTC)
US-NGDPPC
index was removed. Instead, US-GDP
should be used instead.
Imzadi 1979
→
18:16, 24 January 2018 (UTC)Thanks guys, I've got the correct template in there now. - theWOLFchild 18:36, 24 January 2018 (UTC)
|mode=cs2
to {{
inflation-fn}}, it will switch to CS2 from CS1.
Imzadi 1979
→
19:03, 24 January 2018 (UTC)
Somewhat unrelated: I have added Category:Pages with errors in inflation template as a tracking category to those two additional Inflation templates in order to turn up more instances of problems like this. Tracking categories like this have proved very helpful in fixing errors in many other templates. – Jonesey95 ( talk) 04:11, 25 January 2018 (UTC)