You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,19 +53,29 @@ This way you go about completing these goals is meant to be open-ended, so tackl
53
53
54
54
In `map/serializers.py`, supplement each community area with data on the amount of permits issued in each area during the currently filtered year. From here, the view will pass that data to the front end.
55
55
56
-
### Step 2: Filter results by a specific year
56
+
### Step 2: Write a test for your data endpoint
57
+
58
+
In `tests/test_views.py` implement a test to validate the data that your endpoint produces. You will want to create some test `CommunityArea` and `RestaurantPermit` objects and then assert that the expected values are returned when querying the endpoint.
59
+
60
+
Use this command to run tests:
61
+
62
+
```bash
63
+
docker compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app
64
+
```
65
+
66
+
### Step 3: Filter results by a specific year
57
67
58
68
In `map/static/js/RestaurantPermitMap.js`, create a filter that allows users to send a request for a specific year to the backend. The options shoulds be any year between 2016 and 2026, inclusive. Then, use the fetch api in the map component to make a request and receive that data.
59
69
60
-
### Step 3: Display results on the page
70
+
### Step 4: Display results on the page
61
71
62
72
In the map component, process the community area and use it to display shapes for all areas on the map. Then, display the total number of restaurant permits that year as well as the maximum number of permits in any one area.
63
73
64
-
### Step 4: Make the map dynamic
74
+
### Step 5: Make the map dynamic
65
75
66
76
Start displaying some data! Use the `setAreaInteraction()` method to shade the map according to how many permits it has in a year, making sure that it updates automatically when a new year is selected. In this same method, have each area display a popup during some kind of user interaction. The popup should have some light details to help the user understand what they're looking at.
67
77
68
-
### Step 5: Submit your work
78
+
### Step 6: Submit your work
69
79
70
80
To submit your work, create a feature branch for your code, commit your changes, push your commits up to your fork, and open up a pull request against main. Finally, drop a link to your pull request in your application.
0 commit comments