# Where to find a job in Switzerland?

### CAPSTONE PROJECT: Where to Find a Job in Switzerland?

## 1.Introduction

In this notebook, I presented how to apply the knowledge learned from coursera data science courses to the guide the answer to the question: Where to find a matched-job in Switzerland?

List of used tools/Sources:

1. **Python 3**\
   shapefile/matplotlib/pandas/urllib/shapely/descartes/skimage\
   json/geopy/sklearn/beautifulsoup
2. **Foursqure**\
   Foursqure develop free account
3. **Swiss Federal Statistical Office**\
   Acknowledged for the sources of data
4. **Skills Network Labs Platform**\
   The coding platform from IBM

## 2.Background and Motivation

**Preface:**

Has been studying in Switzerland for 3 years, I'm very excited to get a chance to apply my learned knowledge to the industrial applications, especially on the renewable energy field. While the first question I got encountered is how to find a good-matched job? This is not a new question but might be a quite headache one for many domestic/foreign students when their graduation is approaching. Thus, **knowing the country and city you are living** in beforehand is vital to build the **confidence for job interview**. Today, through many ways you can get this type of information, but if you want to make your specific choice, it appears very difficult to figure out who can provide it. Why don't we just explore by ourselves!

**Life is short, I use Python!!**

Pursing the **IBM data science professional certificate** is my efforts towards find a good job. Thus I am highly motivated to gain some preparation knowledge on the job market in Switzerland by exploiting the tools I have learned and practiced during the Coursera courses. The introduced tools such as **data visualization by GIS** and **data acquisition by Foursqure** greatly improved my journey **to be a Data Analyst**. Let me just show what I have been achieved during the coursera courses in the applicable way!!

**This notebook is structured as following:**

1. **Introduction**
2. **Background and Motivation**
3. **Data Sources**\
   1\. Swiss demographic data sheet in a glance\
   2\. Swiss geometry shape data in municipalities level
4. **Methodology**
5. **Swiss Demographics**\
   1\. Where do people living in this country?\
   2\. Where we find most young people living?\
   3\. Where is the chance for foreigners?\
   4\. Where are the companies?\
   5\. Life work balance, happy or not? - Marriage/Divorce Rate
6. **Best City for Job and Life?**
7. **Exploring Companies in Zürich**
8. **Exploring Life and Services in Zürich**
9. **Conclusion and Outlook**
10. **Good Luck!**
11. **Acknowledgement**&#x20;
12. **References**

## 3.Data Sources

1. The Swiss demographics data is from **Swiss Federal Statistical Office \[1]**, including population, business, nature environments, politics statistics;
2. The neighborhood data for city is requested from **Foursqure \[2]**.

**Swiss demographic data sheet in a glance:**

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6TcyoDsvZ0iGbI-5%2Fimage.png?alt=media\&token=db5b221d-a371-4408-985f-91529330f88a)

This is very important data for this notebook, it is the complete statistics at municipality level, which greatly helps the data visualization. The data was filtered, recalculate and used to create the thematic map, the postcode datasheet and as the input for Foursquare to explore the neighbourhoods in Zurich.

**Swiss geometry shape data in municipalities level:**

![Swiss geometry shape data in municipalities level: Author: HongX, recreated code from R to Python](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6XLpbM8TrZ4DdB2u%2Fimage.png?alt=media\&token=8b61becf-ce23-45ad-9411-c52ab2c0e177)

This is the geometry shapefile data for each municipalities in different canton in Switzerland. The Alps mountain was used as a overlay to nicely show the non-residence area. Also you can see that mostly Swiss people's activities are in the northern flatten region, while the snow mountains are skiing park and touristic place.

## 4. Methodology

### Exploratory Data Analysis

The data I have explored are from two sources: one is from the Swiss Federal Statistical Office and the other is exploring neighborhoods based on the postcode data. So here is the methodology I used in this notebook:

1. **Data Acquisition - Foursqure Request**\
   Foursqure is a very powerful tool introduced in this class and I applied it to my postcode location data to explore the companies and life/services in the surrounding 1000 meters area.<br>
2. **Data Visualization - Shape Thematic Maps**\
   This is a very popular way to get intrinsic idea of your data. The statistics data are based on the geo information, thus it is visualized also according to its geo location and weighted the color gradient by the variables.<br>
3. **Data Visualization - Folium GIS Maps**\
   The Folium package provides a simple way to plot the location data with variables information on the real maps with zoom function. It was used to visualize the company locations and results of clustering.<br>
4. **Data Analyzing - K-Means Clustering**\
   k mean clustering is a very useful unsupervised machine learning method to identify the group similarities without human input. While the number of clusters needs to be defined in the beginning. The choice of number of clusters can be suggested by Elbow method, while it is not always apparent decision by the Elbow plot.

## 5. Swiss Demographics&#x20;

### **Where do people living in this country?**

> **Switzerland**, officially the **Swiss Confederation**, is a [sovereign state](https://en.wikipedia.org/wiki/Sovereign_state) situated in the confluence of [western](https://en.wikipedia.org/wiki/Western_Europe), [central](https://en.wikipedia.org/wiki/Central_Europe), and [southern](https://en.wikipedia.org/wiki/Southern_Europe) [Europe](https://en.wikipedia.org/wiki/Europe). It is a [federal republic](https://en.wikipedia.org/wiki/Federal_republic) composed of [26 cantons](https://en.wikipedia.org/wiki/Cantons_of_Switzerland), with **federal authorities seated in** [**Bern**](https://en.wikipedia.org/wiki/Bern).Switzerland is a [landlocked country](https://en.wikipedia.org/wiki/Landlocked_country) bordered by [Italy](https://en.wikipedia.org/wiki/Italy) to the south, [France](https://en.wikipedia.org/wiki/France) to the west, [Germany](https://en.wikipedia.org/wiki/Germany) to the north, and [Austria](https://en.wikipedia.org/wiki/Austria) and [Liechtenstein](https://en.wikipedia.org/wiki/Liechtenstein) to the east. It is geographically divided between the [Alps](https://en.wikipedia.org/wiki/Swiss_Alps), the [Swiss Plateau](https://en.wikipedia.org/wiki/Swiss_Plateau) and the [Jura](https://en.wikipedia.org/wiki/Jura_Mountains), spanning a total area of **41,285 km2** (15,940 sq mi), and land area of **39,997 km2** (15,443 sq mi). While the Alps occupy the greater part of the territory, the [Swiss population](https://en.wikipedia.org/wiki/Swiss_people) of approximately **8.5 million** is concentrated mostly on the plateau, where the largest cities are located, among them the two [global cities](https://en.wikipedia.org/wiki/Global_city) and economic centres of [Zürich](https://en.wikipedia.org/wiki/Z%C3%BCrich) and [Geneva](https://en.wikipedia.org/wiki/Geneva) \[3].

![Python created shapefile plot, by HongX (2019)](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6bNSjgOgTgCtW0dA%2Fimage.png?alt=media\&token=8db1ac16-e428-44cc-9a1d-81e21a82cb01)

> Highest Population City: Zürich, Population of 40,9241 (2017)

This picture explains well how is the population distribution in Switzerland. The major city can be spotted from the highest population. The largest city is located in the northern of Switzerland near to the lake, which is Zurich, with 40, 9241 residents in 2017 according to the Swiss Federal Statistical Office. The canton of Zurich is even larger covering [169 municipalities](https://en.wikipedia.org/wiki/Municipalities_of_the_canton_of_Z%C3%BCrich), [12 districts](https://en.wikipedia.org/wiki/Districts_of_Switzerland#Z%C3%BCrich) with a total area of 1,728.95 km2 \[3].

### **Where we find most young people living?**

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6fh781HOPisJqw1w%2Fimage.png?alt=media\&token=bfdb3364-109f-4b91-929c-2d86f5827e69)

> Highest Average Age City: Corippo, Average Age of 66.75 (2017)

It is quite clear from the average age thematic plot above that the young people is mostly living in the northern part of switzerland, there are agglomerates resident place as most **young people** **living** such as **St.Gallen-Zurich area**, **Luzern** **area**, **Geneva Lake area**. While in the beautiful Swiss Alps mountainous area, mostly older people living there for life.

For us who want to find a job as a graduate student, it is very important to be close to the young age area where you find more chance for career development.

### Where is the chance for foreigners?

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6jArKY14zvAcvosc%2Fimage.png?alt=media\&token=9dfb6a8c-450d-4ba2-903b-d1cab4baae09)

> Highest Rate of Foreigners City: Leysin, Foreigners Rate of 57.73% (2017)

The foreign residents thematic plot properly shows the clusters of foreign residents in swiss municipalities. We found **most foreign residents** are in **Zurich Lake Area**, and **Geneva Lake Area**, which is quite interesting to compare with the age distribution plot that the young average area is overlapping with the foreign residents area.&#x20;

Thus it gives us the very important hints that as a foreign student, if you want to find a job in switzerland, it is better to go for the big city area, especially the Zurich and Geneva Lake Area.

### Where are the companies?

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6ncHZHlTGMQmK4fU%2Fimage.png?alt=media\&token=69fd2262-84a0-49e0-82a0-632cab1e1f27)

> Highest Number of Companies: Zürich, Companies No. of 44,292 (2016)

From this plot it is very clear that where are the companies and chances for a matched-job. Without very big surprise that **most companies are in the big cities such as Zurich, Basel, Luzern, Bern, Geneva, Lugano.** And the Zurich Lake Area provides the most number of companies as a very promising place to find a good matched job.

### Life work balance, happy or not? - Marriage/Divorce Rate

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6qrdXfFB8EKi6dhs%2Fimage.png?alt=media\&token=f2848531-2070-443c-a6e6-cafc4479cae8)

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6sVyzLM64SJYDnFV%2Fimage.png?alt=media\&token=8d010704-79ee-4ac3-8347-be4b751ee275)

> Highest Marriage Rate City: Kammersrohr, Marriage Rate of 33.89% (2017)\
> Highest Divorce Rate City: Willadingen, Marriage Rate of 33.89% (2017)

Although the marriage/divorce rate is not the only measurement of happiness or not, but it does reflect a index of happiness, which is also important issue for looking a job and where to live for life. It is very interesting to compare and look at the plot of marriage and divorce rate locally. As you can see the **marriage rate is always higher than the divorce rate**, which is a good sign...

While **even in big cities with faster pace of life**, seems the **divorce rate is not really high** compare to the surrounding areas.

## 6. Best City for Job and Life?

According to the visualization and analysis, **I pick up Zurich** as the best city for the **high chance for foreigners** to find a job with chances in a lot of companies,  **good life quality** there.

![Zurich City in the Night, Photography by HongX](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6vHPH6RyUh5zldZW%2Fimage.png?alt=media\&token=798097a5-ea78-4eda-9219-d5774dbda8a9)

## 7. Exploring Companies in Zürich

### Postcode in Canton of Zurich

To start the exploration, firstly the postcode is needed as a base for exploring surrounding areas. So the list of postcode and area's name is extracted from the statistical data of canton of zurich. Then the **Geolocator** is really helpful for adding the **latitude and longitude information** for each postcode.

![Example of List Information](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX6zC9SNifqbPKviwF%2Fimage.png?alt=media\&token=571364d5-5b41-46f5-a0e8-42544d5ced51)

Here is the map **created by Folium** to show the **postcode in Canton of Zurich**.&#x20;

![Distribution of Postcode in Canton of Zurich (Folium Map)](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX71Jmm93SdxJEIuk6%2Fimage.png?alt=media\&token=94b25b94-2dec-4cc6-b62c-5c0d486124ed)

Since the postcode is a lot in Canton of Zurich, thus we **limit the exploration area to Zurich City**, as the below map shown.

![Postcode in Zurich City](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX75515cWG4ln5azfF%2Fimage.png?alt=media\&token=a135b6d5-f961-4395-ae52-c69d9a300dd6)

### Geodistance Clustering of Postcodes in Zurich City

There is a simple thinking of clustering these postcodes just according to their geo-similarities, and **k-means clustering** was used here. Different k values has been examined.&#x20;

![k-means clustering of postcode in Zurich](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX78RdxVSK-qKsSrxA%2Fimage.png?alt=media\&token=3f69b720-e6e7-40a3-8ca4-cc0cba1276d4)

As you might notice, it is very difficult for the algorithm to cluster the similar groups just based on their geo distance. The **Elbow** Method doesn't really help in this case.

![Elbow method for k means clustering](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7BScceB9526pzOHU%2Fimage.png?alt=media\&token=04fbdd18-7f94-4cd6-a75c-04e8c52498e2)

### Companies Locations in Zurich - by Foursqure

We are interested in where is the companies in each communities, thus the Foursqure is very useful to explore the surrounding area.

To start, the **companies** in Switzerland can be distinguished into **two groups:**\
1.**GmbH** (Die Gesellschaft mit beschränkter Haftung)  - L.L.C\
2.**AG** (Aktiengesellschaft) - Co., Ltd

Thus the **search query** needs cover **both GmbH and AG**. And the resulted dataframe are joined to create the companies dataframe.

![companies dataframe](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7ElezdcNKeoE9RyS%2Fimage.png?alt=media\&token=4bc304e4-d6eb-442c-9fe0-59675f12fc09)

And the **grouped data** can be seen for each postcode area:&#x20;

![Grouped counting of number of companies (venue)](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7IIkBxwcfIONCzGP%2Fimage.png?alt=media\&token=9269670a-3c1a-47fb-9525-97582e4b085d)

And here is the visualization map of the companies locations:

![Companies locations in Zurich](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7LFSmpHYo76fBwtE%2Fimage.png?alt=media\&token=f976225c-f333-4b60-9e4d-769ed8f7e713)

As you can see, most of the **companies are located** along the **public transport lines**, such as **train station**, **airport** and **highways**.

By **ranking** the number in **each categories** the company belongs to, finally we get a ranking of categories for each postcode area:

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7OOrBdu8vN-JlIUd%2Fimage.png?alt=media\&token=0c089ac6-fa48-42ba-9f7d-d868044d8fb5)

With the **clustering map plot** like this:

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7Q5oxMYq76tM76Vg%2Fimage.png?alt=media\&token=2c077cb1-ba12-43ef-b92d-304449b2c8db)

1. **Red** is identified as mostly **Electronics Companies** as the common companies
2. **Purple** is identified as **Home Services**
3. **Light Blue** is identified as **Printing Services**
4. **Light Green** is identified as **Gardening Services**
5. **Orange** is identified as **ATM/Frame Store**

**Thus it is clearly to realise that the most companies is Electronics Service related in Zurich City Center.**

## 8. Exploring Life and Services in Zürich

Life is of course important for the living and working. So I also explored the life, restaurant, services in each postcode area in Zurich.

The key function is to **explore all the venue categories**:

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7TBEB29p0tctDSsP%2Fimage.png?alt=media\&token=6b9def2c-6051-4e6f-bc00-cfc12c5be264)

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7Uho4-hrJHWiE12u%2Fimage.png?alt=media\&token=5335a7ec-21f0-4cd0-b9a4-213ffbb4ba7e)

![](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7WMr_6LTJAp3jcin%2Fimage.png?alt=media\&token=078ea313-9866-4d7a-a743-91f28f37d692)

According to the results, I also did the k means **clustering based on the life and services** similarities:

Here is the the clustering results:

![K means clustering of restaurants/life services](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7Y7tTJGXzWKMKDX9%2Fimage.png?alt=media\&token=833fa4ba-41c3-494a-8357-48b97d6608c7)

1. **Red** is identified as mostly **Restaurant and Bars** as the common venues
2. **Purple** is identified as **Particularly Swiss Restaurant**
3. **Light Blue** is identified as **Hotel and Italian Restaurant**
4. **Light Green** is identified as **Restaurant**
5. **Orange** is identified as **Bus/Tram Station**

Thus it is very clear that the **Bus/Tram station is very important factor** of public transport convenience when you decide to live somewhere. **Most restaurants** is located in the **city center** near to the main train station (Hauptbahnhof), thus it would be very nice to have the meal there.&#x20;

### Comparing the companies and life/services clustering

By compare the clustering maps depending on the companies and life/services, everyone can make their own decision and choose their likely choice of place of work and place of living. Here the price of rent is not considered yet as a important factor for choosing place of living.

![https://www.accolo.com/wp-content/uploads/2017/06/work-life-balance2.jpg](https://3799636282-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LoX2fqKf4xzb29r-mRp%2F-LoX60yltNve6RlwlTXp%2F-LoX7b6Zk4jCQLqOK4gb%2Fimage.png?alt=media\&token=d0e5af01-1066-4804-8ec8-ef4b1be73c78)

## 9. Conclusion and Outlook

This work presented by HongX is aim to help people to decide where to find a job in Switzerland, which is a quite common headache issue for many undergraduates and graduates students, especially foreign students. Thus exploiting the powerful data science tools is vital important for students to understand the demographics and job market and life services in their living cities. Data acquisition, visualization, analysis, and machine learning method including k means clustering has been used in this work. The demographic of Switzerland are visualized in terms of population, average age, foreigners rate, number of companies, marriage and divorce rate. Companies in Zurich are explored and grouped by each categories suggested representing the postcode area with its location and surrounding information. Machine learning method of k means clustering are used to find the similarities between different post code are. Restaurants, life services are explored also together with companies to suggest a different clustering of the post code depending on the life services.&#x20;

By comparing the clustering based on companies and life services, one can make their own decision and chose their life and work balance. While everything is not perfect, still there are many factors are not considered in this analysis such as house price, visa regulations and so on. But it is still a good guide to the job market and life services in Zurich, Switzerland with a grand view of Swiss Demographics.

## 10. Good Luck!

Although this analysis is quite informative for job hunting and preparation, while there are still other facts which is also vital important for foreign students to find a job in Switzerland. For example the **visa extension issue**, the **difficult working permit** application, the **priority of Swiss-European citizens** in job market, the **language barriers** etc.&#x20;

This analysis is just a guide to the job and life in Switzerland and it only represents my own opinions. **Welcome for opinion exchanges!**&#x20;

Thank you very much for your attention here.

All the best for the future!

**HongX**

10th Aug 2019, in Zürich

## Acknowledgement&#x20;

As I benefited a lot from Coursera Courses, IBM platform, Github, Google Maps and Stackoverflow during the programming and learning, they are all gratefully acknowledged.

## References

1. Swiss Federal Statistical Office ([Bundesamt für Statistik](https://www.bfs.admin.ch/)) <https://www.bfs.admin.ch/bfs/en/home.html>
2. Foursqure: <https://foursquare.com/>
3. Wikipedia: <https://en.wikipedia.org/wiki/Switzerland>
4. ggplot2: <https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xproject.gitbook.io/xproject/data-scientist/2017-visualization/where-to-find-a-job-in-switzerland.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
