Jump to content

Grants:Programs/Wikimedia Community Fund/Rapid Fund/Colored maps (ID: 23732189)/Final Report

From Meta, a Wikimedia project coordination wiki
Sophivorus
Colored maps
03 April 2026 - 31 May 2026
Report ID: 13595
Report status: Under review
Report due date: 30 June 2026
Grant ID: G-RF-2601-21462
Amount funded: 7013311 ARS, 5000 USD
Amount spent: 7013311 ARS
Rapid Fund Final Report

Application type: Tech project

Parts 1-3: Project and impact

[edit]

1. What was built or achieved during the project, and how did it align with your original goals, milestones and technical plan? (required)

I completely rewrote Module:ChoroplethMap so that it now generates dynamic maps using Kartographer, instead of static maps using SVGs like it did before. This change has many advantages, but perhaps the most important one was that it opened up the possibility to generate choropleth maps of any regions whatsoever (technically, as long as they are defined in OpenStreetMap and linked to Wikidata), whereas before it was only countries. In other words, we can now easily generate choropleth maps of countries, US states, provinces of Argentina, administrative divisions of China, neighborhoods of New York City, whatever (as demonstrated in the template documentation). This far surpassed my original goal, which was just to add support for US states, Argentine provinces, Uruguayan departments and Spanish autonomous communities.

Other major advantages of this transition are the possibility to enlarge maps, zoom in and out, add text labels to colored entities, merge the style of the maps with that of image thumbnails, and have choropleth maps inherit all future improvements to OpenStreetMap and Kartographer.

The transition was not without difficulty though. Initially I struggled to get the data from OpenStreetMap efficiently enough. After weeks of failure, I finally came up with a solution, which was to create Commons:Data:ChoroplethMap.map with geographical data about countries, and only use OpenStreetMap data for subnational entities, which are less frequently requested and in lesser amounts.

As to my original stated goals:

  • Add support for a new and better syntax - Done The new syntax is much cleaner and clearer
  • Display small countries as circles - Done Not with circles, but the motivation here was to make small countries visible, and this is now possible by zooming into the map.
  • Think and implement some convention or solution for countries with disputed borders - Done The "source" parameter now allows to alter the source of the data, so if some wiki or user wants to load an alternative version of any map, they can do so. The default map is de facto, as documented.
  • Add support for automatic, localized legends, as well as custom legends - Done
  • Add support for thumbnail-style for the maps - Done
  • Think and implement some solution to enlarge the maps - Done
  • Add maps for some countries, for example Spain, United States, Argentina and Uruguay - Done
  • Deploy the map in other top wikis (fr, pt, it, de) and document it - Done
  • Use the map in a few high-visibility articles per wiki, to spread awareness - Done Among other articles, I strategically included maps in the articles about the FIFA World Cup, which is currently underway and very popular.

Going beyond these initial goals, the new module supports logarithmic scales, minimum opacities, captions, alternative text, and control over the initial width, height, latitude, longitude and zoom level. Several maps have already been created spontaneously by various users, and the module has already been adopted spontaneously by the Thai Wikipedia (th:Template:Choropleth map)

2. Share links that demonstrate your project's impact, usage, and technical outcomes. (required)

Required links:

  • Project page on relevant Wikimedia spaces (e.g. Phabricator, Wikimedia projects, Toolforge)
  • Code repository (e.g. Gerrit, GitHub or GitLab)
  • Documentation or user guides
  • Dashboards, metrics tools, or analytics used to track usage or contributions

Optional links you may include:

  • Diff or mailing list announcements
  • Community feedback
  • Demos or product presentations
  • Survey results or user testing feedback
  • Examples of integrations or usage within Wikimedia projects

enwiki:

eswiki:

frwiki:

ptwiki:

itwiki:

dewiki:

3. What are the key lessons you learned during this project, both technical and non-technical? (required)

Technical:

  • Querying Wikidata and OpenStreetMap to generate maps works, but has an undocumented and uncertain limit, that is dependant on how busy the Wikimedia tile servers are at the moment of generating the maps, and even when it works it may take several seconds.
  • GeoJSON hosted at Commons loads very fast and is very flexible. It can be used to generate other map-related modules in the future.

Non-technical:

  • It pays tenfold to have direct and fluid communication with a user interested in what you're developing, to validate changes and get a fresh look at everything (in my case it was User:AdrianUei).
  • When wanting to spread awareness about a module or template, add it to articles that are not only popular in general, but also popular at the current moment (like the FIFA World Cup, in my case)

4. How did the Wikimedia community or your target audience engage with your project during its development or release? (required)

During development, I chatted privately as well as publicly with User:AdrianUei who validated and in some cases questioned some of the changes I did to the module. This helped me anticipate and avoid many pitfalls and complaints when the new version went live.

Once that happened though, the reaction was generally very good. I immediately got feedback and help regarding the documentation (see the history of the template documentation pages), and as the days and weeks passed, new maps started appearing in varied and unexpected articles (see the WhatLinksHere pages linked above). I also got a few bug reports here and there that I fixed (see the talk pages of the English template and module).

5. What risks or challenges did you encounter (related to delivery, safety, or security), and how did you address them? (required)

Regarding safety and security, I didn't encounter any issues because this was all developed on-wiki and with available systems, which means that MediaWiki already takes care of all safety and security concerns. As for delivery, the issues I encountered were those that are perennial to the Wikimedia ecosystem, namely the lack of a centralized way to develop and deploy modules and templates. This I already knew about though, so I was careful to develop and refine the code and documentation as much as possible in only two languages (English and Spanish) before deploying the module in any more languages and translating the documentation, so that I wouldn't have to go back to every language again and again with every new change. Also, my Synchronizer tool was very helpful in getting the little bug fixes and feature tweaks delivered to the various wikis once the module was deployed in them.

6. Who will maintain the project going forward, and what is your plan for long-term maintenance? (required)

Going forward, I will take care as a volunteer of little bug fixes and feature requests, as I do with other modules and tools I developed. Furthermore, I was also very careful to keep the Lua code of the module as simple, clear and short as possible (it's only on file 282 lines long!) so that other developers are not daunted to read, fix and improve it. Lastly, if too many large feature requests accumulate over the years and I'm unable to tackle them as a volunteer, I may request a second grant to implement them.

(questions 7-9 are skipped)}}

Part 4: Financial reporting

[edit]

10. Please state the total amount spent in your local currency. (required)

7013311

11. Please state the total amount spent in US dollars. (required)

5000

12. Report the funds spent in the currency of your fund. (required)

Upload the financial report

12.2. If you have not already done so in your financial spending report, please provide information on changes in the budget in relation to your original proposal. (optional)


13. Do you have any unspent funds from the Fund?

No

13.1. Please list the amount and currency you did not use and explain why.

N/A

13.2. What are you planning to do with the underspent funds?

N/A

13.3. Please provide details of hope to spend these funds.

N/A

14.1. Are you in compliance with the terms outlined in the fund agreement?

Yes

14.2. Are you in compliance with all applicable laws and regulations as outlined in the grant agreement?

Yes

14.3. Are you in compliance with provisions of the United States Internal Revenue Code (“Code”), and with relevant tax laws and regulations restricting the use of the Funds as outlined in the grant agreement? In summary, this is to confirm that the funds were used in alignment with the WMF mission and for charitable/nonprofit/educational purposes.

Yes

15. If you have additional recommendations or reflections that don’t fit into the above sections, please write them here. (optional)

The financial spending report doesn't seem prepared for cases like mine, where the only real expense was my time as a developer.

When uploading the financial specing report, the instructions say "Use 'financial document' for the file label", but that is not an availabel option. The closest one is 'financial report'. Perhaps you want to update the instructions to avoid questions and confusions.