sfbrigade / datasci-sba

Solving problems with the Small Business Administration
10 stars 18 forks source link

Business visualization #60

Closed avdonovan closed 7 years ago

avdonovan commented 7 years ago

1. Brief Summary of what this PR accomplishes (140 characters or less. If you find trouble describing what you are doing in this length, consider breaking the PR into multiple ones.)

Allows toggling the visualization to show all the individual businesses as map markers, instead of grouping by region.

2. Link to Trello Ticket

https://trello.com/c/A9R7N54G/29-create-successful-business-visualization

3. More detailed description and other questions to address in code review

I pushed the new API endpoint Amit and I were working on, and wired it up to the frontend. It's using random lat/long coords and yelp ratings for each business until we get the geocoding and yelp data into the database. You can toggle between regions and businesses using a dropdown in the upper right, but we'll need to improve the design. I also found out that rendering 45000 markers in the map is painfully slow, so I added a clusterer that will group nearby businesses until you zoom in farther.

screenshot from 2017-09-10 08-07-29

4. Remember to tag reviewers!