Alternative Proteins Ecosystem

A new web application has been developed for GFI to help visualize and interact with geographical “hot spots” of alternative proteins activity across the globe.

The alternative proteins ecosystem (or APE 🦍) utilizes data from our Airtable databases. Leveraging Google’s Geocoding API, we’re able to convert address data into coordinates which then we can plot on a visual map using Google Maps API.

APE’s true power comes from using taxonomies to allow users to create maps that filter out certain data points. A user might filter down to companies working in plant-based chicken products or researchers that are hiring graduate students. Complexity can increase with multiple filters active at once.

After filters are applied, a user can share the map by simply copying and pasting the URL.

Embedding

For websites running the GFI theme, administrators can now directly embed maps into pages and posts. Search for the “ecosystem” block, and paste in the desired map URL to add. The block uses an iframe element to visually show the data. This means that external websites can also utilize the map data by using an iframe.

Cron Functionality

airtable_cron_main()

APE syncs with Airtable every minute cycling through each data type (researcher, company, student group) with 100 rows being returned by Airtable. This means that the entire database is refreshed with the latest approved data on an hourly basis. All data is overwritten by Airtable which means modifications within the WordPress instance will never be saved with the exception of the custom map field. Media is also an exception and is overwritten once the timestamp expires typically over the course of three days to a week.

ecosystem_cleanup()

On a daily interval, APE removes out taxonomy terms that have no posts, and trashes posts that are no longer present within the Airtable database after three days. If a post needs to be deleted sooner, a WordPress administrator can log into the WordPress instance and delete the post manually. Log files that are older than a week are also removed within this function.