jsoma / data-studio-projects

12 stars 18 forks source link

Naturalizations in Switzerland [Project] #14

Closed simon-pinkmartini closed 6 years ago

simon-pinkmartini commented 7 years ago

Pitch

Summary

A Turkish woman was recently denied citizenship in Switzerland, despite having spent all her life in the country (see story here: https://www.schweizer-illustrierte.ch/gesellschaft/thema/funda-yilmaz-aus-buchs-ag-einbuergerung-protokolle). This is an example of how arbitrarily the communes in Switzerland handle naturalization requests. My goal for this project is to gather data on granted citizenship and to make the differences between the communes visible.

Details

Data

The Federal Office of Statistics provides data on a commune-level going back from to 1991. We thus have 25 years of data to work with. The data contains the number of granted citizenship requests for each commune in Switzerland. I also have the population levels (Swiss and foreigners) by commune and will append other data to the analysis as needed (e.g. political preferences, average age, ...).

Roadmap

The plan is to first create a couple of descriptive charts and tabes, isolating the places with high and low ratios of naturalizations (the tops and the flops). I am also going to look at the countrywide dynamics over the last 25 years, to get an idea on the general trend. I am also going to isolate some communes where the patterns have diverged from the national trend in a dramatic way. Insights from this analysis will inform me on the next steps. In a second step, I will choose a meaningful statistic and create a choropleth map for the whole country (or: pick a couple of provinces and limit the map to these smalles levels - provinces typically have about 100 communes, the whole country has over 2000). I am not sure yet on what other information I will add to the map. Perhaps, just exporting the map to Ilustrator and add bits of information on some communes (the outliers) might be the best way to go ahead.

Possible headline(s): "What does it take to become Swiss?" "Best and worst places to live if you want to become Swiss"

Data set(s): https://www.bfs.admin.ch/bfs/de/home/statistiken/bevoelkerung/migration-integration/erwerb-schweizer-buergerrecht-doppelbuerger.html https://www.bfs.admin.ch/asset/de/su-d-01.02.04.08

Code repository: https://github.com/simon-pinkmartini/studio-projects/tree/master/code/Einbuergerungen

Possible problems/fears/questions:

Work so far

I have downloaded the population and naturalization statistics and read them into pandas. I also got hold of a shapefile for the Swiss communities and linked the two together. Here's a simple (and obviously not very meaningful) plot of the naturalization rates (i.e. the number of citizenships granted divided by population levels. index

Checklist

This checklist must be completed before you submit your draft.

Update

Content

How I went from a map to a slideshow-like way of presenting the data.

Data and story

After a few days of back-and-forth mailing with the Federal Office of Statistics, I finally got well-structured dataset with naturalization numbers for all communes going back to 1981. (I spend about 2 whole days cleaning other crappy datasets they had sent me earlier). A number of different stories could be told with this data:

Any changes in direction or topic?

I focused on design and user-experience. Instead of creating a single big map, I split the story up into three (can be extended to more) sections. Each section by itself is quite simple (in the sense that it contains just one chart which is very easy to read) - but the sections are also interactive, in the sense that the user can give some input and the graphs change depending on that.

Technical stuff

Problems/Questions

No problems or questions at this point, except that I might need some tips for another javascript charting library. Chart.js is ok once you know how to set all the parameters, but getting there is a painful task. Also, I feel like I need to go from "casual javascript user" to "advanced programmer" :-)

Screenshots

screen shot 2017-07-24 at 11 36 50 screen shot 2017-07-24 at 11 37 08 screen shot 2017-07-24 at 11 37 20 screen shot 2017-07-24 at 11 37 37

Code

https://github.com/simon-pinkmartini/studio-projects/tree/master/code/Einbuergerungen

Live Example

I finally managed to install a webserver on digital ocean and upload this project. You can check it out here: http://165.227.144.49/Einbuergerungen/web/swissmade.html make sure your browser window is big enough. And use Firefox or Chrome, DON'T USE SAFARI as it won't work there.

Checklist

Final

Details

Headline: How Swiss Are Made

URL: http://165.227.144.49/Einbuergerungen/web/swissmade.html

Code: https://github.com/simon-pinkmartini/studio-projects/tree/master/code/Einbuergerungen

adaskalopoulou commented 7 years ago

I would love to see this on a map. Can you compare the ratios with the number of foreigners living in the different places?

demetriospogkas commented 7 years ago

Good idea! Maybe you should build a hypothesis and try to test the data against it? Or you will just shoot for what you can come across from the data set?

JulienAssouline commented 7 years ago

This sounds interesting. I would also like to see this on a gender level. I would also be interested in seeing this on an application and acceptance level if you can find the data.

playfairbot commented 7 years ago

Greetings! This is the Playfair Bot, let's see what's been going on here.

Please post your project draft! It should be posted by Friday. More details available here. If you posted one but I'm not seeing it, make sure you followed the template.

Ediegram commented 7 years ago

This is very nice! At first I didn't choose a place because I don't know the country well and then all the charts were empty. This text should alert people to the dropdown and users should be allowed to progress to the next stage without choosing a town.

screen shot 2017-08-01 at 8 26 34 pm

I am not a fan of running charts over images but if you want to go that route you need to take great care making sure everything is legible. The first two are ok but the maps are not clear over that image and the highlight colors are too subtle. One thing you can do is run the black and white images but continue with that red accent from the introduction for charts and map.