Instantly share code, notes, and snippets.

Embed
What would you like to do?
Frontend CARTO test

Create a small application for styling data:

Take the data behind this SQL(1) and implement a component for styling it on top of the map.

Description

The component will let users change as many attributes of a data layer as possible (for example the fill and stroke of the geometries, the size, etc.). The data layer should be refreshed when any change happens.

Note: we currently have a solution for this in our BUILDER (see image below). You can take it as a starting point, but it doesn't mean you have to create the same components.

hello

Rules

  • For the application itself, you CAN'T use any JS framework. Use vanilla JavaScript.
  • For rendering the map you CAN use any map library out there (Leaflet, D3, Google Maps,...). Some of them have support for GeoJSON format, so you could use the data from the SQL query.
  • Choose a default basemap for your map.
  • Take as much time as you need.

Bonus points

  • How would you implement a choropleth map?.
  • Do you feel a legend would be needed?.
  • We love Easter eggs 😬.

How to send the test or contact us?

  • If you have any question, contact frontend@carto.com.
  • Then, if you want to submit the test, you could upload your solution to GitHub, create a bl.ocks or send the code in a ZIP. Don't forget to attach a README.md file with the decisions you took.

  1. We encourage you to check our docs about SQL API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment