A solution to this exercise and all other details are available at https://github.com/aniltarte/ElectionResultAnalysis, this project is obsolete now.
A skeleton project prepared for a workshop on Java 8, the Expertalk event is scheduled on 31st May 2014. Follow the Expertalk Meetup event link for more details. This project will help participants to do a quick start.
- List the election result
- List the election result for Pune
- List it down!
- It is more clear if I see it sorted by Votes in descending order
- Lets remove the noise, I am interested in top 5
- Can I see just the runner up?
- Lets do similar to the Mumbai's result (same steps as 2a, 2b and 2c)
- List number of candidates per party
- List winners per constituency
- Time to see, party wise performance, yay!
- Total votes in constituencies
- Runner ups show, party wise
- Party wise vote share
- Close Fights
- One Sided Contest
Note - Time to apply declarative style to your own domain
- Time to evolve domain specific language (DSL)
- Clone the project, better option is to fork it
- Run gradle build command from project root directory
- gradle clean build
- gradle cleanIdea idea
- Open project in Intellij Idea, that's it.
- In the workshop you will be analysing the Loksabha election 2014 results using Java 8 features.
- For simplicity you will consider only Maharashtra state.
- I have made the raw result available via election-data.jar, which is already included in the project.
- You can see how the election result is used in the ComputingSpec class, included in the project.
- Install Java 8, latest version
- Setup Intellij Community edition 13.1.1, its free to use and reason is it has best support for Java 8 as of now.
- If you plan to use gradle, make sure it is latest(1.11 or above). You don't need to use any build tool as project setup is very simple and you don't need to use any dependencies but junit and election-data.jar.