Skip to content

Instantly share code, notes, and snippets.

@xavijam
Last active December 4, 2022 17:43
  • Star 26 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save xavijam/8bf55f5e4da51bc79d94d676a471f77b to your computer and use it in GitHub Desktop.
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.
@kolharsam
Copy link

kolharsam commented Jan 31, 2019

this link cannot be opened, it says I'm unauthorised to access it: https://xavijam.carto.com/api/v2/sql?q=SELECT%20*%20FROM%20ne_10m_populated_places_simple&format=GeoJSON

Could you provide a solution for this?

@VictorVelarde
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment