Monday, 29 June 2015

Greece vs Magna Graecia GDP PPS 2000-2013

If Greece will default on its public debt in the next weeks, and the Italian government will ask its Southern states to contribute with more cuts and new taxes to the attempt to cover the gargantuan €65 billion Euros black hole that default may potentially leave on its public accounts, this will be a textbook case of stealing from the poor after giving to the rich:

Greece vs Magna Graecia GDP PPS 2000 - 2013

Note: to compile the diagram above I had to combine the Eurostat "Regional gross domestic product by NUTS 2 regions", a series ending in 2011, with the more recent Istat "Prodotto interno lordo lato produzione", which was published after the introduction of ESA 2010. This involved some fancy transformation including applying the Eurostat purchasing power parities indices on the last couple of years myself. Chances there are that when in a couple of years Eurostat will provide us with an ESA 2010 updated "Regional gross domestic product by NUTS 2 regions" series, I'll have to review the diagram above, but we should not expect its core message to change.

P.S.: the title of the diagram and of the article is a simplification: Sardinia, like Abruzzi or Molise, was never considered part of Magna Graecia, but I did add one and left out the other two. Also, I didn't forget Basilicata, which instead was quite central to the concept of Magna Graecia, but the diagram was already pretty complex, so I decided to leave it out. Basilicata would have fared somewhere half way between Sardinia and Sicily.

Tuesday, 12 May 2015

Simplify and Shrink

The following scripts sets the non system databases to simple recovery model, and shrinks the related log files:

EXEC sp_MSforeachdb N'IF DatabasePropertyEx(''?'', ''Recovery'')=''FULL''
    and   DatabasePropertyEx(''?'', ''Status'')=''ONLINE''
    and ''?'' not in (''tempdb'') and ''?'' not in (''master'') and ''?'' not in (''model'') and ''?'' not in (''msdb'')
begin
  exec ('' print char(13) + char(10) + ''''Set recovery model to simple for '''' + ''''?'''';
 alter database [?] set recovery simple with NO_WAIT;'')
end'

EXEC sp_MSforeachdb 
N'IF DatabasePropertyEx(''?'', ''Status'')=''ONLINE''
    and ''?'' not in (''tempdb'') and ''?'' not in (''master'') and ''?'' not in (''model'') and ''?'' not in (''msdb'')
begin
 exec ('' use [?];
 declare @logFile varchar(128);
 select @logFile= mf.name from sys.master_files mf inner join sys.databases db on mf.database_id = db.database_id where type=1 and db.name = ''''?'''';
 print char(13) + char(10) + ''''Shrink ''''+ @logFile + '''' log file of ?'''';
 dbcc shrinkfile (@logFile , 0)
 '')
end'

Caveat: generally, don't use the above or similar scripts in Production, as long as you don't understand and accept the consequences. The Simple recovery model is usually fine in Test or Development environments, but again, it may not be appropriate in many scenarios.

Caveat: always read the message log.

Caveat: the second script assumption is that there is no more than 1 log file per database. If there are multiple log files per database, it would be more sensible to look at a solution which doesn't use sp_MSforeachdb.

Caveat: sp_MSforeachdb is undocumented, and AFAIK unsupported.

Caveat: the code above is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the author be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the code above.

Friday, 9 January 2015

PIL pro capite Regionale Italiano vs British Regional per capita GDP

Per capita GDP comparison among british and italian regions (the percent column uses as index the GDP of Lombardia).

Regioni britanniche ed italiane a confronto per PIL pro capite (la colonna percentuale usa come indice il PIL della Lombardia).

Region | Regione GDP|PIL           %
UK Inner London 86,000 254%
UK North Eastern Scotland 42,700 126%
UK Berkshire, Buckinghamshire and Oxfordshire 38,400 113%
IT Provincia Autonoma di Bolzano/Bozen 37,700 111%
IT Lombardia 33,900 100%
IT Valle d'Aosta/Vallée d'Aoste 33,700 99%
IT Emilia-Romagna 32,100 95%
UK Cheshire 31,700 94%
IT Provincia Autonoma di Trento 31,200 92%
IT Veneto 30,200 89%
IT Lazio 29,900 88%
IT Friuli-Venezia Giulia 29,600 87%
UK Gloucestershire, Wiltshire and Bristol/Bath area 29,400 87%
UK Bedfordshire and Hertfordshire 28,700 85%
UK Surrey, East and West Sussex 28,700 85%
IT Piemonte 28,200 83%
IT Toscana 28,200 83%
UK Hampshire and Isle of Wight 27,400 81%
IT Liguria 27,200 80%
UK Eastern Scotland 26,200 77%
IT Marche 26,100 77%
UK East Anglia 25,200 74%
UK West Yorkshire 25,000 74%
UK Leicestershire, Rutland and Northamptonshire 24,800 73%
UK East Wales 24,500 72%
UK Greater Manchester 24,200 71%
UK Outer London 24,100 71%
UK North Yorkshire 24,000 71%
UK Herefordshire, Worcestershire and Warwickshire 24,000 71%
UK South Western Scotland 23,800 70%
IT Umbria 23,700 70%
UK West Midlands 23,300 69%
UK Essex 23,000 68%
UK Derbyshire and Nottinghamshire 22,700 67%
UK Kent 22,700 67%
UK Dorset and Somerset 22,500 66%
IT Abruzzo 22,400 66%
UK Cumbria 22,300 66%
UK Northumberland and Tyne and Wear 22,200 65%
UK Merseyside 21,600 64%
UK Devon 21,600 64%
UK East Yorkshire and Northern Lincolnshire 21,500 63%
UK Highlands and Islands 21,500 63%
UK Lancashire 21,000 62%
UK Northern Ireland 21,000 62%
UK Shropshire and Staffordshire 20,700 61%
IT Molise 20,100 59%
UK South Yorkshire 20,000 59%
UK Lincolnshire 19,800 58%
IT Sardegna 19,700 58%
UK Tees Valley and Durham 19,100 56%
IT Basilicata 18,300 54%
UK Cornwall and Isles of Scilly 17,300 51%
UK West Wales and The Valleys 17,200 51%
IT Puglia 17,100 50%
IT Sicilia 16,600 49%
IT Calabria 16,400 48%
IT Campania 16,000 47%

Eurostat data 2011 | Dati Eurostat 2011

Tuesday, 16 December 2014

Michaelmas stigghiola

I spent the summer of 1984 with my grandparents on their summer house on the Nebrodi mountain range, in the north east of Sicily. My parents came to pick me up in late September, and my father choose the fateful 29th September, Michaelmas, to come back home, in western Sicily. At the time there was no motorway between Messina and Buonfornello, where the Northern Sicilian highway was joining the motorway between Palermo and Catania. The Northern Sicilian highway was and actually still is a thinly asphalted Roman consular road, the via Valeria. The only major change since Marcus Valerius Laevinus legion opened it 22 centuries ago is that the western terminus was moved 20 miles north, from Marsala to Trapani. In a good day it was going to take 6 hours to reach Palermo from my grandfather mountain retreat, and the plan was to start at 4 am, and start the crossing of Palermo at 10 am. At that time, the commuting traffic would have been abated, and the hope was to complete the crossing in 1 hour or so. Saint Michael's day, tough, was not going to be a good day.
We managed to reach Palermo in 8 hours, which was putting us at risk of being delayed by the midday congestion. 
What we didn't knew, we couldn't knew, was that a couple of days before, while chatting with a journalist, Giovanni Falcone, who was at the time organising the capture of  more than 400 members of Cosa Nostra, misunderstanding one of the journalist's remarks, suspecting the journalist knew of the incoming draught, decided to close the nets that very morning.
The police surrounded the city like in a siege, and they allowed cars and buses and trains and people to come in. But not to leave.
It was the greatest traffic jam of my life.
Palermo doesn't have a beltway. It had one in the 50s, via Regione Siciliana, again, a mere variant of via Valeria, but the furious development of the 60s quickly moved that well inside the city. Traditionally, in via Regione Siciliana you feel inside Palermo from the crossing with via Oreto in the east to the crossing with via Belgio in the west (the two intersections are now roundabouts). Palermo is actually wider than that, but these 7 and a half miles are usually the main obstacle in the crossing. During a day without much congestion, and if no ones has committed suicide on the Corleone Bridge, you would expect to take half an hour to 1 hour from the two intersections. That Michaelmas it took my father 12 hours.
Most of these 12 hours were spent in absolute immobility. It looked like a movie, people were mulling around, chatting, rumours were spreading. In a fact finding mission with my dad, I heard people talking about a nuclear war between the Soviets and the Americans, a third world war, an invasion of Europe by the Soviets. My father didn't believe any of the rumours, but asked me not to report those to my mother.
We discovered the truth late in the evening, after my father got his hand on a copy of the L'Ora, which was for almost 92 years the evening newspaper of Palermo. We had been caught in the St Michael's Day great blitz.
After more than 30 years, I have a confession to make: I do remember that day, not for the traffic jam, not for the rumours, not for the thirst, not for the collective madness, but because I made my acquaintance with one of the most revered street foods of Palermo: the stigghiola.
That day I had panelle, crocchette, spleen, but you can have those all around western Sicily. To be honest, I can make myself a better spleen sandwich at home than any stall in Palermo, and that's not hard really, I'd not use lungs, just spleen, and probably a much better oil. But buying stigghiola under a bridge in via Regione Siciliana was totally a different story. I say was, because I strongly suspect the rule of law may have finally found a way to kill this very ancient tradition. The reason you could find stigghiola only in Palermo was that this is a typical Albanian dish, and the only western Sicilian city where you could historically find Albanians was Palermo. People from Mazara, Trapani, Marsala, Sciacca, Alcamo or Agrigento may have heard of stigghiola, but while they would have had first hand knowledge and cultural familiarity of panelle or arancine, the stigghiola would have felt completely foreign. Not to Palermitans, obviously. Until legal, or at least until it was allowed, the stigghiola was the crowned king of the panormitan street food.
In that fateful Michaelmas my father managed to crawl the car just in the right place. At dinner time, a chap with a portable stall came around, fired the barbecue, and started to sell stigghiola. Thanks to this sheer luck, we managed to grab a few portions, with real bread, well before the scent reached the rest of the horde.
I ate stigghiola many more times in my life, but they never tasted half as good as that night.

Tuesday, 25 November 2014

University qualifications: Italy vs UK

The following table describes the equivalence among the Italian and British university qualifications as understood by myself at this point in time:



Please note in Italian universities the unit of credit, the Credito Formativo Universitario (CFU) is equivalent to the European Credit Transfer System (ECTS) unit, while in British universities two Credit Accumulation and Transfer Scheme (CATS) units are equivalent to one ECTS.

This explains why we need 180 CFU to gain a Laurea, and why that should be equivalent to the 360 CATS required for a Bachelor's Degree with Honours.

Some caveat:
  • In EU or EEA countries the only organizations who can officially confirm an academic equivalence is the local NARIC. 
  • The Italian NARIC or the British NARIC could have different ideas on how the respective university qualifications compare one each other, they may actually even have different ideas or understanding, the table above is based on my own understanding of the respective legal and qualification frameworks.
  • I am neither a solicitor, neither in any way related to any NARIC, so if you need an official statement, please go ask the specific NARIC, and if they don't agree with my understanding or with your expectations, tough luck.
  • You could make a case for the Master Universitario di 2° livello to be equivalent to a short Professional Doctorate, which unfortunately doesn't exist in the British qualification framework.
  • On the same note, I would probably equate a short (60 CFU) Diploma di Specializzazione di 2° livello to a Master of Philosophy with some study performed at level 8, or if the element of research was over 60 CFU, to a Research Master (MRes or MLitt), even though both these British qualifications are meant to be at level 7.