Skip to content

ldavies99/asap-coding-challenge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asap-coding-challenge

This repository is for the ASAP February 2025 away day coding challenge. It is a web application created with Flask that is used to display an interactive JavaScript map created with Folium (a Python API for the Leaflet JavaScript library). Your task will be to extend this app to make it more useful.

Instructions

  1. Fork the repository to your personal account and clone the repository

  2. Create a virtual Python environment for the project (tested on Python 3.11)

  3. Navigate to the top level project directory and install the requirements using pip install -r requirements.txt

  4. From the top level of the project directory, run the app using flask run

  5. Access the app from http://127.0.0.1:5000/

Project structure

  • data contains:

    • local_authority_district_boundaries.geojson: this contains the spatial data for each local authority.
    • median_annual_pay.tsv: this contains the median annual pay for each local authority where available, from 2004 to 2024.
  • The mapping module is used to process the data:

    • mapping.prep_data is used to read and process the median annual pay data into a Pandas DataFrame.
    • mapping.folium_map is used to convert the spatial data into a GeoPandas DataFrame, which is then merged with the annual pay DataFrame. This merged dataset is then used to create a Folium Choropleth map.
  • app.py contains the Flask code. It calls functions from mapping.folium_map to generate a Folium Choropleth map, which is then rendered as an iframe inside templates/home.html and served when calling flask run.

  • notebooks can be used as a space to conduct exploratory data analysis and prototype Folium maps. It contains an example notebook.

Submitting your challenge

When you have finished the challenge, push your changes and open up a merge request.

Resources

Flask

Folium

GeoPandas

DuckDB

About

Repository for the ASAP February 2025 away day coding challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 41.3%
  • Jupyter Notebook 36.4%
  • Python 22.3%