Rui Barros

Published at PÚBLICO
on September 14th, 2020

What are the coffee shops and restaurants 300m from schools? Check out the map

Project screenshot
Project screenshot
Project screenshot

When schools reopened after the first national lockdown amid the coronavirus outbreak, the Portuguese government made it forbidden to have more than 4 people in a table in every coffee shops and restaurants that is located 300 meters near a school.

The rule was to prevent big groups to gather on these places after school. But how did anyone know if that specific coffee shop is close to a school? And how many businesses were affected by this measure? Not even the government seemed to know.

I’ve started by locating all schools in the country. Fortunately, the Portuguese government had a website with this data, but since it was available to download, I’ve ended up just getting the API endpoint that was feeding that website and turning it into a csv.

Then, using R and the Google Places API, I’ve searched for all coffee shops and restaurants 300m from schools. I’ve found out that at least 21 thousands of businesses were affected by this rule.

I’ve built a map using Mapbox to allow people to geolocate themselves and see the nearby businesses affected by it and a reporter reached contact to some of these businesses to find out what they thought of the measure - or even if they were aware they were that close to a school.



Claudia Carvalho Silva, Inês Moura Pinto

Technologies Used

R, Mapbox, Google Places API


Coronavirus, schools, businesses, maps, geolocation