Map Visualization Tools/Frameworks for Farm Data

Hello all!

I am reaching out to the experts here who have done visualization with mapping tools and frameworks. I’m working on an application with a few non-negotiable features and was wondering what other folks experiences were with these frameworks or if there’s already a ‘de-facto’, use this framework right out of the box for the best experience. Thanks in advance for your insights!

The application we are working on is meant to serve citizen scientists who want to enter data (primarily BRIX scores measured from refractometers) and meant to serve folks who want to use these scores to make decisions about where or what to eat.

In this application, we are envisioning a map-based interface where users can see the data previously entered within a radius (for example < 5 miles, within a 10 mile radius, etc.). This will require clustering of data points which the user should be able to click on each cluster and see a list of individual data points/values. We would also like to color code the data points based on whether the score is high or low (red to green). Finally, we are imagining filters for date, location and crop type while searching on the map.

The tricky aspect seems to be that the data points correlate to storefronts, such as Walmart or Aldi, where people have bought the produce, but doesn’t limit values such as someone’s garden or local farm/CSA. So when someone goes to type in an address/business it would probably be best that it autosuggests (like Google Maps) the local Walmart or similar.

In my investigation of possible frameworks (with a preference for Python/Javascript stacks), I’ve found a few options and was wondering about folks opinions of them:

Mapbox - https://www.mapbox.com/

  • Native clustering support
  • Search and autocomplete with geocoding API for stores/business place search capabilities
  • Paid with 50k map loads free tier (whereas map loads are triggered each time the map loads, including zooming)
  • $5 / additional 1k map loads

Leaflet - https://leafletjs.com/

  • Free
  • Requires plugins/ no native support for geocoding, autosearch, and clustering support

OpenStreetMap - OpenStreetMap

  • Free
  • Requires plugins/ no native support for geocoding, autosearch, and clustering support

Does anyone have any mapping frameworks they prefer? Does anyone have any opinions of the mapping frameworks listed? And please let me know if I’ve made any inaccurate claims! Thanks all!

sorry for the pings! but i have heard both of y’all have experience with similar?
@jgaehring @wgardiner

Rose

2 Likes

Welcome to the GOAT community, @rosemariafontana ! :wave: :goat:

It’s funny, we were just discussing maps on the farmOS monthly community call yesterday, right before I first saw this, in particular a pull request @paul121 and @Symbioquine have been working on to add Google Map layers to the farmOS-map JavaScript library:

That library is what runs in farmOS itself and several of its client applications, but can be used without farmOS just as easily. It’s essentially a thin wrapper over OpenLayers, if you care to add another one to the list to make your decision a little harder! :sweat_smile: It has some pop-up functionality kinda like you’re describing above, which might give you some good insights on how to implement it yourself even if you don’t use the library. In farmOS it’s used for displaying info about specific plantings and locations on-farm:

screenshot of farmOS dashboard, via farmos.org

I’m a bit rusty with all this, Paul probably knows more, but I was never :100: in love with OpenLayers, tbh, and would probably give Leaflet a try next time I were to start from scratch. I did a little research myself recently and noticed that OpenStreetMap now uses Leaflet (maybe always did?) for its rendering, which is a solid endorsement imo. I don’t like to admit, b/c it’s totally proprietary, afaik, but Felt is a really pretty alternative and seems quite feature-rich. Probably costs, though! :money_mouth_face:

The open GIS/mapping software terrain, if you’ll pardon the pun, is a bit rocky, since there are so many contributing factors that make it not only difficult to develop the software, but also costly to store and serve other digital assets, the tiles especially, whether they’re vectors or bitmaps. But also metadata (eg, like the retail store info you mention) and other GIS data and services, all of which are too vast for users to download in their entirety, so there needs to be a server running somewhere to provide that (another cost); that’s really what Google and Mapbox are charging you for. It’s why OpenStreetMap has limits to their free servers, too, and why even their Android app, OsmAnd, prompts you to download all the tiles for your preferred regions (I think with a max of 5 regions unless you pay for the premium). They’re big downloads, a couple gigs each, which I’m painfully aware of whenever I go camping and want to install the local trail maps (pro tip: they’re waaaaay better than Google’s!) and of course by then I’m in the middle of nowhere with one or two bars if I’m lucky!

With that in mind, there are some other cool people 'round here doing neat work with GIS data and imaging services of that sort, specifically for for open ag software, like LandPKS & Tech Matters (cc: @dwitzel; hope I haven’t misrepresented y’all!), as well as Cool Farm Tool if I’m not mistaken (@gbathree, am I totally off-base with that assertion? I forget who is specifically tied to that). They tend to focus on the soil science, agronomy, and production side of things, more than the retail and marketing side, but I should guess there’s still a lot of conceptual overlap.

Hope that’s not tmi! And again, welcome! :blush: :goat:

1 Like

There are 3 different things you are talking about here:

  1. Mapping libraries, which allow you to render map layers in an app
  2. Tile servers, which provide the back end to serve map data efficiently to an app
  3. Geospatial databases, for storing and retrieve user collected data

Mapping libraries

I would say https://maplibre.org/ is the best open source mapping library these days if what you are looking for is just a way to integrate maps into a custom application. From what I understand it is more flexible and performant that Leaflet. It is the open source fork of the Mapbox Libraries.

Tile servers

  • Mapbox also provides hosting of map layers, if you need that. Both default base layers, and your own data.
  • While you can contribute to OpenStreetMap, most people just use it as a base map data source (Including Mapbox). You would need to use one of the many tile servers out there that provide OSM layers, or host your own.

Geospatial database

https://postgis.net/ is the most popular open source option and tipg might be a good option for serving you data to the map as tiles.

3 Likes