Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make code agnostic to candidates data set #17

Closed
hangal opened this issue Aug 9, 2017 · 2 comments
Closed

Make code agnostic to candidates data set #17

hangal opened this issue Aug 9, 2017 · 2 comments

Comments

@hangal
Copy link
Collaborator

hangal commented Aug 9, 2017

It should be easy to modify surf to accommodate other datasets, such as (say) Lok Sabha.

The dependency on any specific dataset should be minimal, and captured in some configuration variables in Config.java (this is set to some default, will be settable from surf.properties and may even be settable by the user at run time).

e.g.
e.g. in Config.java, we have added:

public static String[] columnsToDisplay = new String[]{"Name", "Sex", "Year", "Constituency", "Party", "State", "Position", "Votes"};
public static String mappedIdColumn = "pid"; // name of column into which output id's will be written
public static String primaryColumn = "Name"; // name of primary column that is being merged
public static String secondaryColumn = "AC_no"; // name of secondary column by which fields can be grouped (may or may not be visible on screen)
public static String filterColumn = "Position"; // name of column on which filter can be set. (should be expandable to accommodate multiple columns)
public static String[] filterColumnValues = new String[]{"1", "2", "3"}; // allowed values for filterColumn when set

The rest of the code should be driven only by these variables instead of being hard-coded to certain column names. HTML code, CSS selectors, etc. should also not reflect hard-coded fields, to the extent possible.

The name "incumbency" need not appear anywhere. It can simply be called Merge.

@hangal
Copy link
Collaborator Author

hangal commented Aug 9, 2017

folded into #6

@hangal
Copy link
Collaborator Author

hangal commented Sep 2, 2017

Largely done.

@hangal hangal closed this as completed Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant