Skip to content

Commit aa39fbf

Browse files
Xavier MedranoXavier Medrano
authored andcommitted
fill out readme instructions a bit more
1 parent 4497676 commit aa39fbf

1 file changed

Lines changed: 29 additions & 14 deletions

File tree

README.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@
44

55
Welcome to the DataMade code challenge! 👋
66

7-
## Contents
8-
9-
1. [Overview](#overview)
10-
2. [Installation](#installation)
11-
3. [Completing the Challenge](#completing-the-challenge)
12-
a. [TODO:](#step-1-todo)
13-
147
## Overview
158

169
Your task is to complete the following programming exercise to show us some of your code! This exercise is based on work that DataMade does every day: pulling data from the web, debugging tricky code, and presenting information to the world.
1710

1811
Submissions should be submitted as a pull request against your fork of this original repository. **Make sure to make your pull request against your own fork of the repository, not the original DataMade repository**.
1912

20-
There’s no time limit, but don’t feel the need to go over the top with your submission. We expect this task to take about two hours to complete, but it could take more or less time depending on your familiarity with Django and JavaScript. When you’re all set, share your code with us as a repository on GitHub.
13+
There’s no time limit, but don’t feel the need to go over the top with your submission. We expect this task to take about two hours to complete, but it could take more or less time depending on your familiarity with Django and React. When you’re all set, share your code with us as a repository on GitHub.
2114

22-
We’ll be evaluating whether the code works, as well as its quality. Before submitting, make sure that your code does what you expect it to do, that it’s clean and neat enough to meet your standards, and that you’ve provided us some instructions on how to run it. Be warned: there are some intentional bugs in here that you'll have to iron out to get things working!
15+
We’ll be evaluating whether the code works, as well as its quality. Before submitting, make sure that your code does what you expect it to do, that it’s clean and neat enough to meet your standards, and that you’ve provided us some instructions on how to run it.
2316

2417
_Note: If you would prefer to keep your code challenge private, please share access with the following members of DataMade on GitHub:_
2518

@@ -37,13 +30,18 @@ Keep in mind that you cannot create a private fork of a public repository on Git
3730

3831
Development requires a local installation of [Docker](https://docs.docker.com/get-started/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). These are the only two system-level dependencies you should need.
3932

40-
Once you have Docker and Docker Compose installed, build the application containers:
33+
Once you have Docker and Docker Compose installed, build the application containers from the project's root directory:
4134

4235
```bash
4336
docker compose build
4437
```
4538

46-
Next, run the app:
39+
Load in the data:
40+
```bash
41+
docker compose run --rm app python manage.py loaddata map/fixtures/restaurant_permits.json
42+
```
43+
44+
And finally, run the app:
4745

4846
```bash
4947
docker compose up
@@ -53,8 +51,25 @@ The app will log to the console, and you should be able to visit it at http://lo
5351

5452
## Completing the Challenge
5553

56-
Once you have the app up and running on your computer, you'll need to flesh out certain code blocks to make the map functional.
54+
Once you have the app up and running on your computer, you'll need to flesh out certain code blocks to make the map functional. You'll be using [Django](https://docs.djangoproject.com/en/6.0/) and [React-Leaflet](https://react-leaflet.js.org/docs/api-components/) to complete this task. By the end of this challenge, you should have:
55+
- a map that displays Chicago's community areas, shaded depending on how many new restaurant permits were issued in a given year
56+
- community area shapes that show some light details on that community area when a user interacts with them
57+
- a filter that allows users to request permits that were issued in a given year
58+
- UI components that display the total number of permits and max number of permits in one community area for that year
59+
60+
This way you go about completing these goals is meant to be open-ended, so tackle the following steps in whatever way you're most comfortable!
61+
62+
### Step 1: Supplement the community area geojson data
63+
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.
64+
65+
### Step 2: Filter results by a specific year
66+
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.
67+
68+
### Step 3: Display results on the page
69+
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.
5770

58-
### Step 1: TODO:
71+
### Step 4: Make the map dynamic
72+
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.
5973

60-
TODO:
74+
### Step 5: Submit your work
75+
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

Comments
 (0)