Giter VIP home page Giter VIP logo

swiss-singles-map's Introduction

Dataprepping for Swiss Singles Map

Data Sources

BFS Data Cubes, Stat Pop

Towns: Amtliches Gemeindeverzeichnis Geodata: Swisstopo's GG25 (converted using QGIS and Topojson)

Notebooks

  • 'Singles Data in Switzerland - M.ipynb' Prepping the data for men
  • 'Singles Data in Switzerland - F.ipynb' Prepping the data for the ladies

swiss-singles-map's People

Contributors

barjacks avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

palrogg

swiss-singles-map's Issues

Fix D3 map geometry and implement range slider

  • Some towns id can't be merged. The Swisstopo shapefile contains towns which were merged in 2015-2016
  • Map not centered anymore since the zoom feature was added
  • Remove lakes from the shapefile
  • Constrain range slider to 20-24, 25-29 or 20-29 etc. age spans
  • Implement range slider in JS
  • Make the topojson file lighter
  • Make the data files lighter by suppressing every other column (redundant values)

Preview here (french) or here (german)

Issue #1 was closed.

Google Talk

  • Fix the colors
  • Last rows to fix
  • Labels for the 10 biggest cities
  • Annotation when we change the age range? Bar graph on the right: amount of men and women overall. How many people (total singles number). Balkengraphik. Mobile phone: underneath, desktop: on the screen
  • percentage / raw values toggle %
  • No zoom (at least for Zurich)

Resolve geodata conflicts

  • Find a 2015 version of swissBOUNDARIES3D
  • Make a topojson file
  • Is there the missing towns? YES
  • Export the data again from final_dataset_per100.csv or final_dataset_totals_id.csv

We need totals - work in progress

The current ready-to-display data doesn't contain totals. The +/- percentages are only valid for a specific age span.
I think the nicest would be to have the totals in the datasets. So we could tell: there is xxx single men and xxx single women in Zurich, which means x% more women... I'll commit a new data file, which needs to be processed (merged with town ids, etc.)

Make colors consistent

Current colors are determined by absolute numbers, which makes it very confusing.

To do:

  • store relative values or the population by town in the dataset
  • set colors using relative values

Steps to render a D3 map

  • Download Swisstopo's GG25 (48 Mo)
  • Use QGIS to smooth polygons then export to geoJSON
  • Convert from geoJSON to topojson
  • Add a "Gemeinde Nummer" column to the datasets
  • Merge using a JavaScript map() function (or within QGIS)
  • Adapt the current canton map code to load the new data
  • New glider to be able to select an age span

Inconsistencies with the totals

The "Ledige Frauen Total +/-" and the sum of the columns don't match.
In Geneva, the "Ledige Frauen Total +/-" is 9576 while the columns sum is 10170.
I add a "Data check sums" notebook which shows the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.