Find "smallest common year"

Поиск
Список
Период
Сортировка
От Stefan Schwarzer
Тема Find "smallest common year"
Дата
Msg-id 4DC14B44-71E1-468E-B863-9B0EAE83C93D@grid.unep.ch
обсуждение исходный текст
Ответы Re: Find "smallest common year"  ("William Leite Araújo" <william.bh@gmail.com>)
Список pgsql-general
Hi there,

my aim is to plot a line graph for a single country but for two or
three variables. Now, one could use two different y-axis (if there
are two data sets with different units); but it's not really the
right way to analyse data.

One should rather normalize them to a base year to enhance
comparisons. To achieve this, one would set the values for a specific
year to 1 (or 100) and put the other values of all variables in
relation to it.

Thus, taking two variables, say,


Fish Catch 
- in Thousand Metric Tons
- data available for 1975 to 2005
and
Total Population
- in Million People
- data available for 1960 to 2005

Country is Kenya.

The "smallest common year" would be 1975. One needs thus to set the
values for that year to 1 (or 100), and calculate the other values of
the variables in respect to the needed factor.

Now the question is how to find that "smallest common year"
automatically, via SQL or PHP?

Can anyone give me a hint? Thanks for any help!

Stef

 ____________________________________________________________________

  

  Stefan Schwarzer
  
  Lean Back and Relax - Enjoy some Nature Photography: 
  
  Appetite for Global Data? UNEP GEP Data Portal:  
  ____________________________________________________________________





В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter Childs"
Дата:
Сообщение: Re: Performance Issues
Следующее
От: "William Leite Araújo"
Дата:
Сообщение: Re: Find "smallest common year"