Skip to content

Datamade 2026 Code Challenge Submission#9

Open
achamor1 wants to merge 9 commits intodatamade:mainfrom
achamor1:andres-code-challenge
Open

Datamade 2026 Code Challenge Submission#9
achamor1 wants to merge 9 commits intodatamade:mainfrom
achamor1:andres-code-challenge

Conversation

@achamor1
Copy link

@achamor1 achamor1 commented Mar 17, 2026

Overview

My submission for the DataMade 2026 Code Challenge

  • Implemented get_num_permits() for CommunityAreaSerializer() to return the number of permits per community area for a given year.

  • Added getPercentageOfPermits() helper function to calculate what percentage of the citywide total each community area has for a given year.

  • Implemented getColor() to shade each community area by calculated permit volume (split into quartiles).

  • Implemented setAreaInteraction() and added a pop-up functionality to display the permit data statistics per community area.

  • Added display for citywide total permits and maximum permits in a single community area for a given year.

  • Added accessibility improvements: semantic HTML, aria-live loading state, error state, map legend, and keyboard-accessible popups.

  • Includes a test

Demo

image

Notes

Added a map legend for clarity and to better align with what I've seen on other DataMade projects.

Testing Instructions

Project setup

  • From the project root directory run: docker compose build.
  • Then load in the data with: docker compose run --rm app python manage.py loaddata map/fixtures/restaurant_permits.json map/fixtures/community_areas.json.
  • Run the app: docker compose up.
  • visit http://localhost:8080.

Running tests

  • From project root directory, run: docker compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app.
  • Test creates CommunityArea objects for Beverly and Lincoln Park and RestaurantPermit objects for a given year.
  • The test validates that the /map-data/ endpoint returns correct permit counts per
    community area for a given year (In this case, 2 & 3 permits respectively for Beverly and Lincoln Park in 2021).

@achamor1 achamor1 marked this pull request as ready for review March 17, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant