-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I took a look at the sample app on mapping of affordable houses, and I had a few suggestions:
Introductory Langauge
I think it would help to have a README at the root of the sample app directory to introduce the example in a few sentences. Talk about the overall goal of the example and what it's supposed to do, and maybe an example user flow. Something like:
This app is designed to show a user a list of affordable housing options along with a map of the options. The user can explore the different options, click on one to zoom in on the map, and find additional information for each of the options.
I would also add the set up information required to run the app (see below)
Setup Information and Alerts
I would also consider adding some information in the README to create an access token for Mapbox. Mapbox has a tutorial you could use to help write the section.
I would also add an alert in the JavaScript to check whether the person running the example has filled in the API access token. I had to take a few minutes to figure out why the app wasn't working until I saw in the code that I had to fill in the API key, and I think students (and teachers that don't have experience with the example app) would have similar difficulty.
JavaScript vs Python
It seems like to me that this example uses a heavy amount of JavaScript compared to Python, and I think that it might be confusing for students to learn how to code in Python and then use a JavaScript example.
I think it might be a good idea to use Python to read in the locations data (maybe rename it to locations.json so that the students don't have to focus on (relatively) large amount of locations used in the example.
I would try to split map.html into a Python part (moved to app.py) and the JavaScript/map handling part, and try to move as much into Python as possible so the students can use it as a good starting point.