-
Notifications
You must be signed in to change notification settings - Fork 1
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
Models for Lokniti Data #20
Conversation
- load_responders in progress -load_responses in progress
- added a col name to the first col of every lokniti data file representing an entry number -renamed each data file for convenience
- created one load command that can be used for all election year files -fix typo in 2019 codebook -change income from float to char field - add ps_id attribute to responders
-accidentally removed in last commit (oops)
- made the getColor function and some other variables props - added an api endpoint to retrieve a responder sbased on constituency and year
- INCOMPLETE - started implementing a map that colors each constituency based on what caste is the most prevalent in that constiutency during that year. - general logic is completed, but coloring seems inaccurate for some entries - the data being displayed on click and hover is accurate.
Thanks for getting this in! Since we're wrapping up and I need to redeploy the site, I'll make edits and leave comments if I see anything I think should be changed rather than requesting changes. |
- Also changed load_responders to check if responder is a duplicate before saving -
- Response does not need respondent_no and election year since they are accessible through Responder foreign key
- Also adjusted views to work with model change (removing election_year as Response attribute)
- Also added update_config for loading responders and responses
- Also removed deprecated attributes from Responses serializer
- data was not updating previously
I think there could be some state names that don't match the exact state names in the 2014/2019 files and that is why a lot of the data is missing. I put whatever caste data we currently have into two files on the backend so that the map loads faster. However, the data currently displayed especially for 2014/2019 looks incomplete. |
Okay, thanks. We might be able to resolve that later by using what looks like the unique state id in the state_name string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this last visualization in, especially considering the tight timeline! I'm not sure what caused the map colors to be inconsistent with the data for you, but it looks fine on my end. A few things, particularly the MapBase/MapBaseCaste, could be refactored to reduce duplicate code, but that's something people working on the project in the future can address.
Main Changes:
increase width of competitiveness map
added models for codebook, responders, and responses
started creating a map of the most prominent caste in each constituency during each election year, the data being displayed onClick and onHover is accurate, but the color assignments on the map are not accurate
made the GradientLegend more generalized (replacing variables specific to the competitiveness map with props)
To-do