GithubHelp home page GithubHelp logo

ponderix / electionsgermany Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.67 MB

German elections website made by a novice.

License: MIT License

HTML 40.80% CSS 11.36% JavaScript 47.83%
elections germany bundestagswahl data-visualization map politics

electionsgermany's Introduction

German Election Map Simulator

This is a website with interactive maps and data about German politics. This website attempts to inform people about the German election system and politics in Germany. This Website is a static website due to the limitations of Github pages. Feel free to use code from this website for your own projects or create your own projects based off this one, just look at the license first.


Resources and Links

Purpouse

This project was initially created as a school project. My intention with this project was, and still is, to inform people about politics in Germany. Specifically, political geography and voting behaviour.

Code and Data

Languages used: HTML, CSS, JavaScript
Libraries used: d3.js (v6), topojson
Data: Federal Returning Office

First of all I must mention that much of this was not my own idea. Many the ways in which this website is constructed is based off principalfish.co.uk.

The maps are generated from GeoJSON data using topojson and d3.js.

The JavaScript is structured so that there is one main script file which generates the map and graphs by parsing the data from the .json and .csv files and then utilises functions defined in other script files to manipulate said data. Most of the file names are self-explanatory; the functions.js file is a file for miscellaneous functions used throughout the code.

To run the website for personal purpouses use a localhost as just opening the index.html file won't work.

If you wish to edit the code it is best to keep the file structure as is, unless you know exactly what you are doing. If you wish to add additional features create a new script file and store the functions within an object in that file (a guide to the functions can be found under the Resources and Links section). If linked to the main html file these can then be used throughout other script files, similar to libraries.

For Example:

var foo = {
  write : function(input) {
    console.log(input);
  }
}

in a separate file which is also linked on the HTML document

foo.write("Hello World!");

output

Hello World!

electionsgermany's People

Contributors

ponderix avatar

Stargazers

 avatar

Watchers

 avatar

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.