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

Provide a way for users to upload and download their own CSV files #6

Open
hangal opened this issue Jul 27, 2017 · 1 comment
Open
Assignees

Comments

@hangal
Copy link
Collaborator

hangal commented Jul 27, 2017

This will avoid mucking with paths on the server, etc and make Surf easier to use.
There should be a screen where users can upload a CSV or a gzipped CSV file.

That file gets stored in some work directory and can be loaded into the available datasets.
The work directory needs to be persistent in some way so the user can get back to it even if the server restarts.

Along with save, there can be a download button for the user to get the dataset back with the mapped_ids and comments.

@sudesh-ashoka

@hangal hangal self-assigned this Jul 27, 2017
@hangal
Copy link
Collaborator Author

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.

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