Using Filters to query data in CartoDB


Using the Filters tool in CartoDB to perform queries on attribute values in a dataset. The demo dataset is a Point map representing school locations and the attributes of the schools. The demo will create a map of schools that are secondary and owned by the Church. The attribute values for the filter or queries are contained in the Type column and Category column respectively.



Sign into Cartodb user account. Click DATA VIEW to scrutinize the attributes.

On the Data table of the demo, two field are boxed. The category field indicates values that describe the classification of the schools based on ownership structure while the type field(red boxed) contains attribute values classifying the schools based on whether it is a primary, secondary or both.


Click on filters to open the filters window. In CartoDB, queries are executed using the Filters tool.


Click on the Select a column to filter by- For the demo, type column is first selected.



The different types are listed on the filter window. The demo selection is for secondary.



Switch off other options and leave the secondary (sec on the filter window). Automatically the filter is effected on the MAP VIEW. Click on the point features and the info window shows Type- sec.



To further filter the data, Click on the drop down button in the red box.



This time for the demo, category column is selected. The objective is to filter out schools of secondary type and church ownership.



For Category column, we uncheck other options leaving only Ch (represents Church). The filter is also automatically effected on the MAP VIEW.



Click on as many points as possible to confirm that only the results of the filter remain on the MAP VIEW. User can then title and save the map.



Thank you for the audience.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s