Skip to content

Instantly share code, notes, and snippets.

@baderone
baderone / swiss tourism.csv
Last active August 29, 2015 14:27
Swiss tourism
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 26 columns, instead of 1. in line 5.
countryoforigin,time,grisonsarrival,grisonsnights,grisonsduration,lucernearrivals,lucernenights,lucerneduration,bernesealpsarrivals,bernesealpsnights,bernesealpsduration,tessinarrivals,tessinnights,tessinduration,bernarrivals,bernnights,bernduration,zuricharrivals,zurichnights,zurichduration,baselarrivals,baselnights,baselduration,genevaarrivals,genevanights,genevaduration
Schweiz,June15,70784,151242,2.0999999,77933,133195,1.7,67316,128828,1.9,67154,146375,2.2,30969,49892,1.6,98820,159424,1.6,28628,46419,1.6,26718,51478,1.9
Deutschland,June15,20131,58572,2.9000001,15088,31836,2.0999999,8071,21941,2.7,9458,24377,2.5999999,6658,12343,1.9,35769,61732,1.7,11578,20780,1.8,5233,9570,1.8
Vereinigte Staaten / USA,June15,4210,7916,1.9,20797,39744,1.9,13199,30207,2.3,3725,8473,2.3,2713,5354,2,28756,53402,1.9,6006,17132,2.9000001,12301,28378,2.3
Vereinigtes K�nigreich,June15,4737,11650,2.5,6586,13939,2.0999999,9433,31983,3.4000001,2382,5588,2.3,1348,2396,1.8,18275,30553,1.7,5243,10908,2.0999999,12258,22243,1.8
China (oh
@baderone
baderone / README.md
Last active September 9, 2015 10:06
Top 15 countries of origin of the tourists in Grisons, Switzerland

I have chosen the Canton of Grisons with famous tourist sites as for example St. Moritz for this exercise. You see from which countries how many people visited the Canton of Grisons in Switzerland in June 2015. I chose the month of June, because the long summer holiday in Switzerland starts not before July. Thus I can minimze potential bias for Swiss tourist in their own country. Nevertheless we see that most of the tourist are Swiss tourists followed by Germany and the UK

@baderone
baderone / README.md
Last active September 16, 2015 05:34
The longer the journey, the shorter the stay?

Scatterplot from the top 15 countries of origin of tourists in Grisons, Switzerland in June 2015. The Scatterplot shows the relation of travel distance and lenght of stay. The chart shows that tourists from Australia stay 1.5 nights in average whereas tourist from Belgium stay more than 6 nights in average.

@baderone
baderone / README.md
Last active September 23, 2015 07:57
Grisons boost in tourism

The chart shows a impressive increase of tourist arrivals in Grisons beginning in the year 2011. The Canton of Grisons managed to almost triple the arrivals of Swiss tourists. Furthermore, we see that before 2011 only few Japanese tourist visited Grisons. Nowadays, Grisons welcomes Japanese tourist during the Summer. Another interesting observation is the fact that Swiss tourist prefer Winter holidays whereas Japanese tourists prefer the Summer over the Winter.

@baderone
baderone / README.md
Last active January 20, 2016 09:02
01 Kursbeispiel - Line Chart - WEBMAP 2016

D3 js based example for line chart used for students course on webvisualizations - WEBMAP 2016

Die Daten findet Ihr hier: http://data.worldbank.org/indicator/DT.TDS.MLAT.CD

  1. Speichert die Daten auf eurem PC
  2. Sucht euch ein Land aus
  3. Formatiert die Daten analog debt_bolivia.csv
  4. Passt das Beispiel gemäss dem ausgewählten Land an
  5. Versucht selbständig einen y-Axen Titel hinzuzufügen Tipp: google, "d3 add axis title"
@baderone
baderone / README.md
Last active January 19, 2016 08:30
02 Kursbeispiel - Adding Tooltip - WEBMAP 2016

Dieser Code zeigt den Standard Tooltip (html) ohne einfache Möglichkeit zur Anpassung.

  1. Versucht bei Eurem Beispiel ein Tooltip einzufügen

Unter dem nachfoldenen Link findet Ihr eine Anleitung wie man tooltips auf eine andere Art einfügen kann. Diese Art hat den Vorteil, dass man das Aussehen des tooltips einfacher nach eigenen Wünschen anpassen kann.

  1. Lest die Anleitung durch und versucht bei Eurem Beispiel den Tooltip auf diese zweite mögliche Art und Weise einzubinden

http://www.d3noob.org/2013/01/adding-tooltips-to-d3js-graph.html?m=1

@baderone
baderone / README.md
Last active January 19, 2016 08:31
03 Kursbeispiel - Two Lines - WEBMAP 2016

Nun wollen wir eine zweite Datenlinie einfügen.

  1. Sucht Euch ein zweites Land aus der Datenbank aus
  2. Erstellt ein zweite .csv Datei
  3. Passt den Code so an, dass er für eure ausgesuchten Länder passt
@baderone
baderone / README.md
Created January 20, 2016 08:19
04 Kursbeispiel - Multiple Lines and series - WEBMAP 2016

In diesem Beispiel werden mehrere Länder dargestellt sowie zwei verschiedene Datensätze. Diese Beispiel könnt Ihr beliebig weiterentwickeln mit mehr Ländern oder Datensätzen

@baderone
baderone / README.md
Last active January 21, 2016 08:45
02.1 Kursbeispiel - Adding tooltip II - WEBMAP 2016

Versucht den Tooltip lesbarer zu machen. Beispielsweise Jahr: xxxx, Schuldden: xxxxx$

@baderone
baderone / County.topojson
Last active April 20, 2018 14:18
Kursbeispiel - Kenya County Map Test - WEBMAP 2016
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.