Skip to content
R for the Rest of Us Logo

Interactive Map Development for the San Francisco Asian Pacific Islander Council

In March 2021, Kathleen Doll of Intention2Impact, reached out to R for the Rest of Us about a project they were working on about food resources for the Asian Pacific Islander community of San Francisco. A joint endeavor with the Asian Pacific Islander (API) Council, this project was, “part of a larger effort to explore how API community members are accessing food, interacting with various typologies of food and experiencing their community’s food resources.”

Kathleen and her colleagues knew they wanted to develop an interactive map to show what food resources were available to the API community — and where there might be gaps. What they didn’t know was how to gather the necessary data and how to make the map.

In her original email, Kathleen shared a list of data sources they had identified on a range of food resources (grocery stores, convenience stores, restaurants, etc). She suggested that her team would be happy to help doing manual data entry to gather this data in a single place. But what she didn’t know was that, working with R for the Rest of Us, such manual work would become unnecessary.

We used R to automate the data collection process in several ways:

  1. We gathered data on the Asian Pacific Islander population from the American Community Survey using the tidycensus package.

  2. We accessed neighborhood boundaries from the city of San Francisco and merged the API population data into it.

  3. We collected food resources by bringing in data from Open Street Map using the osmdata package for several food resource categories.

  4. We scraped additional food resources data from various other websites using the rvest and RSelenium packages.

Some of the food resources data needed double checking to remove erroneous results as well as duplicates. We worked directly with Kathleen and her team to ensure accurate data.

In the end, we were able to automate the process of gathering data data on the Asian Pacific Islander population in San Francisco as well as the food resources available to this community.

We then built a website to host the interactive map. In addition to a map for the entire city of San Francisco, we also built maps for individual neighborhoods with large Asian Pacific Islander populations. The maps use colors and fonts that match the API Council’s branding.

And the maps are built in such a way that they can be easily updated in the future. Any time the R code we developed is re-run to gather new data, the maps are automatically rebuilt, providing the most up-to-date information on food resources available to the San Francisco Asian Pacific Islander community.

Interested in learning more about our consulting services?

Drop us a line below.