Key Information

Register
Submit
The challenge is finished.

Challenge Overview

The application called MySunBuddy, it is a peer-to-peer platform to facilitate the purchase and selling of solar net metering credits.

This is a django/python challenge, you will be updating the matching logic between buyer/seller as outlined below.

Task Overview

In match_script.py we do the buyer/seller matching, it reference the users zip code entry, use the "mapping" dictionary to get load zone and utility provider attributes, and then if there is a match, we proceed in matching logic.

We have built a georeference python script that lookup utility provider and load zone from shapefile, and we want to use it to replace the “mapping” dictionary.

With the georeference function, load zone and utility provider will be a populated fields in the user model during the registration process. The matching logic will then use these two fields to test if there is a valid matching between buyer and seller, rather than having to map the zip code to a load zone and utility provider, and use those values.

So overall, we need to be sure to have load zone and utility provider as fields in the user record. Those fields will be populated by passing the user's address into the google maps geocoding API, and then passing the latitude and longitude to the shape function, which will return utility provider and load zone. These attributes will then be used to determine if there is a valid matching.

So the list of changes in the challenge :

- Add two new fields to use model : utility_provider and load_zone

- Removing Mapping model

- During registration, when user set an address, use google geocoding api to lookup the long/lat address of the user, if address is invalid, prompt the user to provide valid address.

-  Then use the provided loadzone-shapefile-search python script to lookup the utility provider and load zone. Then insert these records in the newly created user record.

- If no matching found then store null in these two fields.

- During Matching logic, use these two fields to group buyer/seller matching. Skip users that have null values for these fields.

- Note that google api key and any other sensitive data must be configurable.

- Update README as needed.

- Your code should be documented and follow python coding best practices : PEP 8 for the main text, and PEP 257 for docstring conventions.

- Put common code in helpers.

It is a PLUS to implement google geocoding api validation in frontend to inform user if the address is valid or not, we will pay $100 bonus to implement this with good UX (user experience).

If you need any clarifications, please ask in forums.

Source Code

Provided in gitlab https://gitlab.com/tc-sunshot-r2/ss2-my-sun-buddy/

Check forums to get access and Follow README to deploy the code.

The shapefile script is provided under loadzone-shapefile-search folder, the shapefile contains information for the states in these US states http://www.ferc.gov/market-oversight/mkt-electric/new-england/elec-ne-zones.pdf

Deliverable

- Git patch file of changes.

- Verification steps



Final Submission Guidelines

.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30052305