RAMP 2.0 is a location intelligence application that I built for Dynamic Planning and Services to enhance their Risk Assessment and Mitigation Planning (RAMP) service. The app is built with React, Redux and the Carto platform. It allows analysts to visualize the risk of earthquake, flood, wildfire and other natural hazards within a county and see how they overlap with its population, property, content and critical infrastructure.
The app provides support to manage filters for jurisdiction and other categories, toggles and legends for all layers, query filters and summary tables among other UI enhancements. Before this app, these reports were accessed via many different maps designed with the Carto Builder application that required users to navigate extensive sets of controls and remember the application's state while performing analysis. This version brings together multiple maps and simplifies support for the complex queries that are most relevant to risk and damage assessment analysis.
Choosing the right mapping libraries
I made by biggest mistake with this application right off the bat. Carto offers a ton of API's and I picked the wrong library for the job. I started the project using CartoVL, carto's latest javascript library that greatly enables developers making vector based mapping applications with mapbox-gl. I completed the project to about 90% before I conceded that the vector based mapping did not scale to meet the needs of the application. Some of the maps needed to load over a million features and they were loading slowly and practically impossible to pan around.
If you are building your first app with Carto, be sure to test their technologies with your largest datasets and consider the scalability of your design for the application that you are developing. If I could have done this project differently, I would have made sure that I conducted my analysis with DP+S largest datasets and I would have spent more time analyzing the platform's performance before I started constructing the app.
The right mapping library stack for this application turned out to be:
- carto.js - Javascript library for Carto API interaction
- airship - Stencil.js component library for building location intelligence apps
- leaflet - Javascript library for mobile-friendly interactive maps
Location Intelligence
This was my first foray into location intelligence. Before DP+S approached me for the project, I had never heard of Carto. At first I found it difficult to wrap my head around the support that the platform had to offer. It really is an amazing platform with a wealth of tools and a great development community.
My favorite part about the project was working with content that described the physical world. I have spent the majority of my career developing for knowledge based content and it was a really nice change to work with content that describes physical space. It brought unique challenges and each bit of progress felt really impactful.
Working Together
DP+S was an amazing partner for this project. Brian Greer at DP+S had an amazing vision for the application and he and his team did an amazing job preparing all of the implementation details for the feature rich application. A project like this would have been a huge undertaking if it were not for the clarity and technical excellence of my partners at DP+S.
When Brian introduced me to this project, he showed me a wall with the source code for the closest project he could find pinned all over it and the code references strung together. The way his mind works is amazing. Before we started the project, it was important for me to clarify that I was being asked to produce a javascript web application and to explain how it would be delivered and what it would take for DP+S to reconfigure the app for multiple different projects. It has been a great experiencing sharing my knowledge of git, node, javascript and apache to help DP+s take ownership of the project and deploy it for themselves.
Looking Forward
When we started the project, there was a high level of interest in a Lasso selection feature that would filter the selected datasets for features within its boundary. We scoped the project down to just the essential features so that we could establish a proof of concept and MVP release as early as possible. I look forward to collecting feedback on how this app is used, what enhancements are most desired and working together on the next version. It is an exciting greenfield project with a tremendous opportunity to support highly impactful analysis and planning.