Submind YouTube summaries
Thumbnail for Smart Canvassing with Mergin Maps

Smart Canvassing with Mergin Maps

Watch on YouTube

Video summary

The video demonstrates how to set up a Mergin Maps application for efficient canvassing during municipal elections using QGIS as the desktop interface. The process begins by creating a new project and importing open data layers, such as aerial photography from PDOK services and neighborhood boundaries specific to Rotterdam. To optimize field operations, the presenter filters these national datasets down to the target municipality, exporting only essential fields like household counts and names into a GeoPackage format. This streamlined approach ensures that volunteers have immediate access to critical information regarding flyer quantities without being overwhelmed by unnecessary data layers. Once the base maps are prepared, the tutorial guides users through downloading building footprints using the BGT Downloader plugin and clipping them precisely to the neighborhood boundaries for better performance on mobile devices. A custom non-spatial table is then created to manage campaign activities, linking daily tasks like volunteer registrations and activity types back to specific neighborhoods via a relational database structure. The form interface is meticulously configured with automatic fields that capture the user's email address and current date upon entry, while manual inputs allow for recording details such as conversation outcomes, flyer distribution status, and handwritten notes on multi-line text widgets. To provide real-time visual feedback in the field, rule-based styling is applied to building outlines so their color changes dynamically based on interaction status; buildings turn green when marked as completed or red if a conversation occurred. The app also supports map sketching features that allow campaign organizers to draw team-specific routes and zones directly onto the map before synchronization, ensuring volunteers know exactly where to go upon arrival. Additionally, users can log poster placements with photos and notes, while optional settings like position tracking remain configurable depending on privacy needs or battery constraints. The video concludes by showcasing how all this data synchronizes seamlessly between desktop QGIS and mobile devices via Mergin Maps cloud services, enabling live updates for campaign leaders to monitor progress from a dashboard. This integrated workflow not only streamlines the canvassing process but also provides valuable analytics through heat maps of poster density and activity distribution across the city. The presenter notes that this system was successfully utilized by their political party in Rotterdam during recent elections, highlighting its practical value for modernizing grassroots campaigning efforts with accessible geospatial technology.
Read the full video transcript
[music] >> Hello, welcome back. Recently, we had municipal elections in the Netherlands and I've helped my political party in Rotterdam with canvassing and other activities by developing a Mergin Maps app. In this video, you see how I've set it up. Let's use the Mergin Maps plugin to create a new basic QGIS project for mapping. Give the project a name, for example, canvassing, and create a project in a folder. Click finish and it will first synchronize the project. The default project loads a vector tile layer of OpenStreetMap and a survey layer. Let's zoom in to Rotterdam. Use the locator bar to search the city of your interest. Use larger than a space and then the address and it will find it quickly. Now, we need some layers that we're going to use. For the Netherlands, a lot of nice open data is available through the PDOK services plugin. So, here I install the PDOK services plugin. After installing, click the icon. I'm first going to add an aerial photograph of 8 cm resolution. Here, we can see it. Next, I'm going to search for neighborhoods. And I'm going to use the latest data set for neighborhoods. And there we have the neighborhoods. The neighborhood layer is in the Dutch projection. Let's set the project to the same projection. I click right, I choose layer CRS and I set project CRS from the layer. Now, the whole project is in the Dutch projection. But, these are all the neighborhoods in the Netherlands. So, I'm going to select the ones that are in Rotterdam. There's a field with the name of the municipality, and there I can type Rotterdam. Change to equal to and click select features. Now, the neighborhoods in Rotterdam turn yellow. Close the dialogue. And we're going to export the selection. Click right, choose export, save selected features. And we're going to save this in a GeoPackage. Use the browse button to browse to the folder where you store your project and give the name neighborhoods. Under select fields to export and their export options, deselect all. And make sure you only have the ID and the number of households because I want to show that in the form later, because that's useful for the amount of flyers that you need to take with you for a campaign activity. And the name of the neighborhood. Click okay. And here's the exported layer. Remove the original layer from the layers panel. Let's style the layer. Open the layer styling panel. Click the simple fill and change it to a simple line. And we'll use a red line. And we make it a little thicker. Now, we can also modify the vector tiles layer. It has a bit too many labels, which I'm going to remove. And if you want, you can also change the style, but I'll keep it like this. The next step is to download the buildings. For the Netherlands, we can use the BGT Downloader plugin. And BGT is the Dutch large-scale base map and it has different features that we can download specifically from the plugin. Click this button. And there you find all the features. Change the extent to neighborhoods so it covers Rotterdam. Deselect all. And make sure only pond is selected. This is a building. Click run. And then it will take some time to download the data set. And there it appears from the GeoPackage that was downloaded. The next step is to clip the buildings to the boundary of Rotterdam. I don't have a boundary polygon at hand so I'm going to temporarily dissolve the neighborhoods layer. Click run. And there we have the boundary of the municipality of Rotterdam. I'm going to use that for clipping. Go to geoprocessing tools, clip. There make sure your input layer is the BGT and the clip layer is dissolved. And save the result as building. Click run. And there's the clipped layer and I remove the layer group that was previously created. Now we're going to style the buildings layer. Change the simple fill to a simple line so we only have an outline and I keep the default stroke width. Next I would like to use the survey layer for tagging posters. Our own posters in the city or posters of others and we could optionally later render this as a heat map so we can see where the different political parties have their posters set up in the city. Next I'm going to create a non-spatial layer. And that layer or table will store for each day the different campaign activities that can be then linked to the neighborhood. I'll create a new layer called campaign. I change the geometry type to no geometry. And I'm going to add a few new fields. I need a field for the UUID that's necessary for the relations that we'll set up later. I want a field for the username. Add a date field. A field for the amount of registered volunteers. Field for the campaign type. And click okay to create the layer. Now we're going to set up the relation. You do that in the project properties. There, go to the tab relations. Click add relation. I give the name campaign per neighborhood. With the referenced parent, choose neighborhoods. And then for the field, choose ID. Then for the referencing child layer, choose campaign and the field foreign key UUID. And click okay to create the relation. Now we're going to create the widgets for the neighborhoods layer. You can do that in the layer properties. Go to the attributes form tab. There, change auto generate to drag and drop designer. Remove FID and ID because we don't want those to be visible in the form. Then we're going to configure the number of households. In the alias setting, you can give an alias which is a more human readable title for that field and I make it non editable so the number of households just presented to the user and then I change it to text. Then for the neighborhood name I also change the alias to something more readable. And it should also not be editable but just presented to the user. Then I drag the relation also to the form layout. And that will then give [clears throat] our subform from the campaign layer. Now let's configure the campaign form which will be filled in by a user every time we have a campaign activity. Also there in the drag and drop designer we're going to remove the unnecessary fields. And let's configure the username. Create an alias. And we want the username to be filled in automatically on default so I go here to the expression builder and there I look for the variable that stores the merging username or user email and probably email is more useful but you can choose there what you need. And now every time when the form is updated the user email address will be automatically filled in. Now let's configure the date field. It automatically detects that the widget type is date time. I change the alias date of activity. I can change the display format to custom setting there. So for example I can use this. Also here I want to automatically update the date when the user updates the form. So, I use the dollar now expression and check the box apply default value on update. The next field I'm going to figure is registrations. That will be used for the amount of registered volunteers. So, I change the alias to number of volunteers. It automatically assigns the range widget. And then the editable widget. Which is okay here. So, I use a minimum of zero and a maximum of let's say 40. And the last one to configure here is type, which will be used to register the campaign type and we'll do that with a drop down menu. So, I change the widget type to value map and I define here the drop down menu. Click okay to apply and close the dialogue. Just to make sure that our relations remain correct. I'm going to replace the ID values with a UUID. So, I'm going to update an existing field in the field calculator of neighborhoods. And there I use the UUID function to create unique values for the UUID. I'll go off the editing mode and the UUIDs are saved in the layer. Now, let's check this part of our form. I open the attribute table. There I see the UUIDs. I toggle to the form view. And there I can also edit the sub form. Where I can fill in the username, the date of the activity automatically filled in as we wanted, the number of volunteers. And the type of campaign activity from the drop down menu. So, it corrects to 40 because it doesn't allow 50 and that works. And here we see the result in the form. Now, let's do some finishing touches here to the campaign form. I'm going to change the order to make it a little bit more logical. And change the alias of the campaign type, which we forgot before. Then go to the display tab. And there, change display name to the date of the activity instead of the username, which is more logical. So, you'll see for each date an entry. Let's now work on the buildings layer, which the volunteers will modify in the field when they are walking past each building. Um we see here that there are a lot of different fields that we don't need. So, let's remove them first. Go to the field step. Go to editing mode. And select the fields that you don't want to use. In this case, I only want to keep the FID. And then, create the fields that you need in the form. And I've done that already. And here you see it. Go out of editing mode and save the result. Go to the attributes form, and there you see that I have inserted some tabs. You can easily do that with a plus there. Give a name to the tab, and then drag the fields that you want under a tab on the tab. And here I configured date time as we did before with the now function. For username, the variable for merging maps. Then, is the property done or not? Is a checkbox widget. Where I change the check state yes, unchecked no. >> [clears throat] >> Then, the campaign type is a value map as we had before. And I also define here different flyer types in a value map. Then, under canvassing, another tab, I put conversation if there was a conversation or not with the person in the property. And a special field for taking notes, which is a multi-line widget. Let's now work on the styling of the buildings layer. I want the styling to be dependent on the answers in the form. And I'm going to use here a rule-based styling from the layer properties symbology tab. Let's change the first rule. Which will be for conversation. So if a conversation has taken place, I want it to give a specific styling. So under filter, I can click on the expression builder button. And there I add conversation equals and then in single quotes, the string yes. So if that is yes, then it should give a certain style. And if you scroll down there, the simple line can be changed to a red line. And that's our first rule. So if there was a conversation, we'll get a red boundary around our building. The second rule is if you have done the building, if you have put a flyer in the uh in that property, and there choose done equals yes. So if you've rang the bell or if you have put a flyer in the property, then the color should be changed to green. And no line. So when we combine the two, when it's done and there was a conversation, it will show up green with a red boundary. Then the last one is not done, that's for everything else. There change simple fill to simple line. And then you'll just have the black boundary of the polygon. Now, let's test this. I select the building here. Then I open the attribute table for the selected feature. Toggle to editing mode and here we see the two tabs and the fields that I can then modify. I save the edits and I deselect it. I see there the styling correctly applied, so that works. Now, I'm going to configure the form for posters. Go to the attributes form. >> [gasps] >> And there I'm going to also use the drag and drop designer. Remove FID. Set up date as we did before. Rearrange fields as needed. Photo field was default to this project. So, we don't need to configure much. All settings look right. Comes with the integrated document viewer. For the political parties, I want a drop-down menu using the value map where I define the different political parties. You could extend this form by also adding the date that the poster was removed because at the end of a campaign we need to remove the posters and the styling could be set to a heat map, but for now I just keep it like this. I would like the user to be able to switch between OpenStreetMap and the aerial photograph. For that purpose, I'm going to define map themes. You can do that here. Click add theme. And now I only have OpenStreetMap checked, so I call this one topographical map. And now I uncheck OpenStreetMap. And in the same way I create a theme aerial photograph. Now we can easily switch between the two. Now we'll do some final configurations for Mergin Maps. In the project properties, go to the Mergin Maps tab. There you could set up selective sync for the pictures, but then you need a dedicated folder for the pictures. I'm not going to set it up here. Um, we're going to set up map sketching because there the organizers of the campaigns can uh, sketch on the map uh, the different team colors, team red, team green, team blue, and indicate where they need to go, or they can set out routes that need to be walked for uh, putting flyers in uh, the mailboxes. So, you can set up here the colors that can be chosen then in Mergin Maps. Optionally, you can also set up enable position tracking where the user can see the track where they walk. But here I don't switch that on. So, now we're ready to synchronize the project with the cloud and check the result in the Mergin Maps app. So, I've synchronized the project with my mobile phone. And the first thing the organizer of the campaign can do is go to the neighborhood's layer and search for the neighborhood for a campaign activity. So, go to this neighborhood called Cool. And the number of households is 4,040, so we know how many flyers we should take. And then I add an item here an activity on 26th of April, and I enter the information. And then it's added there with the date. So, I can add for multiple dates for this neighborhood the activities. Another thing the campaign leader should do is to select a color for sketching and then set out the areas for team red, blue, etc. So, when the volunteers gather, then they know where to go. You can also set out routes for the flyers. When you synchronize the app, all the volunteers will have this information. Now the volunteers can use the app and they can tap on a building and there they can save the property is done or not. If it's done, it will automatically fill in the date and the username. I can fill in the campaign type and the type of flyer. And you can indicate if you had a conversation and make some notes. When you save it, the information is saved to the property and the color is adjusted based on our rule-based styling. You can also select multiple buildings. Let's say you didn't speak with the owner and you only put a flyer there, you can select multiple here. And you can indicate that you did the property, but you don't indicate that you spoke with the owner. And then when you store it, the buildings are green. Future improvement would be to select based on a line, so you can go really fast. Now I'm going to add a point for the posters. So, you tap record and there you can fill in the date. You can take a picture. You can choose the party and you can make some notes. You can extend this also by putting the date that it was placed and the date that it was removed and automatically generate uh heat maps in your project. We can also swap the map themes between aerial photograph and the topographical map. Note that the map sketch was not added to the map themes, so it they disappear. So now you can synchronize the project and all the users will have that updated information. In the Mergin Maps dashboard, you can get live updates from the field about the campaign. You see here the map sketches, the poster, and the buildings with the legend. If you use this drop down in the layers, you can also find the legend here. So I hope this was a useful video on how to use Mergin Maps for canvassing during uh election campaigns. And yes, the political party won the municipal elections in Rotterdam on [music] 18 March 2026. >> [music]