Such is the beauty of open data that when I saw the excellent Portland: The Age of a City by Justin Palmer, I immediately wanted to do something similar, but for my town. The people at the government office (GURS) were kind enough to provide me with the files, and after some coding, here it is.
It’s an exploration of how the city grew through the last century. Blue is old, violet younger, res still younger, bright red the youngest.
Here’s the number of structures built by years. I was able to identify causes for some spikes in building activity, but not all:
1899: four years after the big earthquake,
1919: rebuilding after WW1? I’m not sure there was much destruction here,
1929: more building – in 1929 Ljublaana became the capital of Dravska banovina,
1949: rebuilding after WW2,
1959, 1969, 1979, 1989: might be effects of Yugoslav loans, but I suspect it’s more of an effect of administrative laziness, resulting in entering new buildings into evidence at the end of each decade,
2004: the last surge of prosperity in independent Slovenia.
Generally, it’s been going downhill from 1969 on. The best spots were probably taken by then.
Here’s a animation of the whole thing. It shows city evolution between years 1500 and 2013, since there’s not much happening before that.
Such a young country, but already so messed up. One is inclined to think that all is lost, and one would not be far from the truth. Much ink has already been spilled on sad state of affairs in Slovenia, its fall from grace in European Union, the precipitous decline of living standard of its citizenry and its bleak outlook for the future. Did I mention the rampant corruption of its ruling class and top managers? Best not. This was, after all, supposed to be the next Switzerland.
Blaming the ruling class in mere abstract terms may give one a fleeting satisfaction, but who were the people who led us off the cliff? Someone did govern here, or was at least giving an appearance of governing. Prime ministers are known: Lojze Peterle, Janez Drnovšek, Tone Rop, Andrej Bajuk, Janez Janša, Borut Pahor and currently Alenka Bratušek. These are the main culprits for the downward spiral, of which one can only hope we already passed the first half. Names of their accomplices – the ministers, secretaries, etc. – have a tendency to drift into oblivion, as majority of people preoccupy themselves with the daily grind.
So who were they and how are they connected? Here’s a diagram showing all the government members from 2001 on. I call it “loyalty diagram”, since it was constructed in a way that it shows who is close to whom, and who is hardly loyal to any alliance. The rationale in short is:
Ministers are considered to be very loyal to the prime minister (although I know they are not).
Secretaries a lot less, since they are essentially experts and not politicians.
Secretaries are less loyal to ministers as are ministers to prime minister, but still a lot, since it’s they who appoint them.
Secretaries are loyal to each other, since they are bureaucrats who like their positions and will in theory support each other, although in practice there exist many party rivalries.
Click the link or image below to launch the interactive diagram, which can be searched, panned, and zoomed, and which shows details for every staff member on the government. Red dots are prime ministers, bright blue ministers, dark blue secretaries. Every person is marked with a color of the highest position occupied.
Social network of staff in Slovenian governments 2001-2013
A few lines of commentary:
There are a select few of loyal party cadres that every prime minister carries with him, or her, which very rarely, if at all, work with anyone else. These are the dark blue and bright blue dots in close proximity of red dots (prime ministers).
Node radius is proportional to how many times the individual sat in a government over the years. For example, Janez Janša was not only prime minister twice, he also served in other capacities, most notably as Minister of Defense in 1994 and was taking on more and more departmental duties as his government in 2012 slowly disintegrated.
There is a big cluster of common cadres between Janez Drnovšek’s and Anton Rop’s governments. It seems that a lot of secretaries are passed on into the next mandate, except in case of shift between left- and right-wing governments, which perform a purge on inauguration.
Anton Rop had most secretaries and the biggest government. If anything, the governments are getting slimmer with time.
People in the middle of diagram are generally dragged there because of many ties with different prime ministers and ministers, so they are either the most politically promiscuous, or (theoretically) the best experts in their fields, a theory swiftly disproven considering they took on ministerial duties in vastly different departments. These are the most die-hard bureaucrats who mostly didn’t do much else in life except being politicians. For the sake of argument, let’s suppose there are exceptions even between them.
Here is how the social network of government actors evolved over time:
Next diagram shows connections of same cadres to their respective fields of work. Green dots are government offices, other colors are the same as in diagram above. Here one can see, for example:
Who is walking in corridors of true power: prime ministers like to keep close Department of Defence, Department of Finance and Department of Internal Affairs. People close to these offices are the movers and shakers.
How different the governments of Slovenia truly were: departments were clumped together with other departments over time, split and again clumped with other departments. There’s hardly a department which survived this period without being split or clumped, most notably Department of Defense.
Who held which functions, and how are different departments connected with various people.
All data was kindly provided by Government of Republic of Slovenia. Download CSV version here. If anyone wants original documents, e-mail me. My address is on About page.
Technology
Graphs were constructed in Java and exported to Gephi for visualization, then again exported to web-friendly sigma.js format.
Interactive map of data from Global Corruption Barometer 2013 (Transparency report), showing corruption levels per country for political parties, educational sector, private companies, media, civil servants, judicial and medical institutions, military, NGOs, parliament, police and religious institutions.
I admit that I like Game Of Thrones. I like the story and the way the TV show is done. So when I read on Monday about the supposedly heartbreaking episode “Rains Of Castamere”, in which Robb Stark, his wife and his mother get killed along many others, I thought I’d test my affection by recording my pulse while watching, then plotting it to see how it correlated to the visual narration.
Here it is:
To do that, I used my old Arduino and PulseSensor to record pulse, then graphed the averages on a picture along with corresponding frames using Processing. There are some mistakes when the sensor grabbed double pulse when I jumped or moved, but it averaged decently.
If you saw the episode, you’ll probably relate.
Update: if anyone wants the code (Processing / Arduino) send me an email. My address is on About page.
A better title for post would probably be “What kinds booze to drink together to get drunk in style, according to those who write, compile, publish, test and enjoy cocktail recipes”. Continuing from previous posts, I wanted to see how does it look a network of ingredients of all possible cocktail recipes, and if it’s possible to divide them into sensible groups, so that they would be instantly recognizable and even helpful to experienced and casual drinkers alike.
To do this, more than 25,000 recipes from Drinksmixer.com and Drinksnation.com were scraped, a network was constructed with Gephi, and visualized here below. Dot size reflects the count of that particular ingredient in all analyzed recipes. Dots of same color frequently appear together in recipes. One could say that one can hardly make a mistake if one combines three ingredients of the same color and drinks the concoction.
The map below is interactive, try panning and zooming with mouse or use the control in the upper left-hand corner.
I see five major groups of ingredients, but your alcohol proof may vary. Actually I suspected something like that:
ice is in its own group. For some reason it also contains tequila,
milky drinks are in their own group (gray-blue),
salty and spicy drinks are also in an easily recognizable group (pink),
blue group is dominated by vodka and rum,
green group mostly has gin and tangy juices, and
red group mostly contains fruit schnappses and liqueurs.
For a more mobile-friendly, searchable map with advanced interactivity, click here (Sigma.js). Clicking on an ingredient on this map will show a list of all connected ingredients. Clicking on an element in the list will show a subgraph.
Most recipes contained preferred brands for spirits and fruit juices, so I constructed another diagram. It shows which brands are usually grouped together in drinks.
Here is the interactive map:
Download hi-res static images here: black background | white background.
For a searchable map with advanced interactivity, click here. Clicking on a brand on this map will show a list of all connected brands.
I find it funny that Everclear, Kool-Aid and Mountain Dew are so close. Does that mean that people just pour 100% ethanol and caffeinated water in a jug and drink that? Possibly.