A report on the steps taken to build a database on local farmers markets, the attending vendors, and vendor suppliers, then serve that information via an online-capable application.
2. Introduction
• My background:
• B.Sc. (Biology) – Acadia University
• B.Tech (Public Health) - CBU
• Food Safety Specialist
(Department of Agriculture), Dartmouth NS.
• Came to COGS with an interest in expanding
my skill set to include up-to-date mapping
techniques & technologies.
3. Introduction
1) in Ontario the Pork Producers Marketing
Board of Canada has completed a Premise ID
project with the University of Guelph’s
Department of Land Resource Science called
“BarnBase” in which the location of each hog
farm in the province is added to the database
and mapped according to its GPS
coordinates1.
4. Introduction
2) Chicken Farmers of Ontario (CFO) has entered
the location data of its members into a GIS
database, which contains producer
information such as the farm name, its
owner, phone numbers, the address, how
many chickens are on the farm, their buyers
and many other details2.
5. Introduction
3) The Dairy Farmers of Ontario (DFO) has
recorded the locations of all dairy farms and
bulk storage tanks in a GIS maintained and
used by the DFO to route milk trucks and
provide data in the event of a disease
outbreak3.
6. Introduction
4) Consumer Education
GIS can be used by farmers and vendors at public markets to
show consumers where and how their foods are grown, raised
and prepared.
Such transparency confers a marketing advantage for their
products as increasingly media-savvy consumers are
encouraged to develop a closer relationship through improved
visibility and accessibility of information pertaining to the food
source, thereby winning customer trust4.
(food security, supporting local economy)
7. Introduction
• This project merges the growing popularity of:
• online applications
• consumer interest in locally-grown foods (“Buy local”)
• Goal was to create an application that
promotes local foods by showing consumers
not only where to buy them but also tracing
those foods back to the farms and suppliers
whose foods are used as ingredients.
8. Introduction
• Suppliers can be:
1) The vendor themselves (farm) typically selling
raw produce, meat, etc.
2) Value-added vendor offering baked goods,
ready-to-eat foods, frozen pies, etc.
9. Introduction
• Target Questions for the App to Answer:
1) Where can Local Foods be purchased?
2) When can Local Foods be purchased?
3) Where do those foods originate?
13. Introduction
Not all required data could be collected from vendor
questionnaires - e.g. latitude / longitude of suppliers.
Some Lats / Lons
gathered at
www.selectnovascotia.ca
Remainder estimated
by entering civic address
into Google Earth.
16. Introduction
• Programming Languages Involved:
1) HTML / Javascript (client-side)
2) PHP (server-side)
• Behind-the-scenes requirements for the
application:
1) Database Storage System capable of serving data
2) Web-server
– Both needs filled by MAMP
17. Introduction
MAMP stands for:
i) MacOsX (the operating system it’s designed for)
Versions for Windows (WAMP) and Linux (LAMP) also exist.
ii) Apache (the internet server)
iii)MySQL (the database management system)
iv)PHP (the programming language used to communicate
with the database)
Best of all, it’s open source.
21. Introduction
• Javascript is the
“muscle” that puts
action on a website
(e.g. addMarker function)
• GoogleMaps API
– a programming
extension for online
mapping
– Free under 25,000
hits/day and no charge
to visitors.
22. Introduction
• php scripts send SQL queries requesting
data in certain order by specific columns
• SQL returns data as “rows”
• Data of interest from each row is placed into
variables ($var).
• Data “echoed” back to Javascript.
26. Introduction
Step 1) Search by Market… Day… & Category using the
drop-down select lists
Step 2) Click a Market icon on the Map to see Vendors
Step 3) In the Market infoWindow click “Show Me the
Vendors at this Market”
Step 4) In the Vendors List infoWindow “click a Vendor
to map Suppliers”
Step 5) In the Foods List infoWindow “click from the list
of Food Categories… to see Product Details”
28. Introduction
1) Keeping the ‘Action’ on the Map
(navigation through InfoWindows vs. ‘side panel’ in
earlier versions {below} – “distracted experience”)
29. Introduction
2) Navigation (forward and backward) within
InfoWindows
3) Vendors displayed in Alphabetical Order
4) Introduction Pop-up Window offering
background & user instructions
5) Intuitive user experience (directing the
users’s eye, efficient wording of instructions)
30. Introduction
6) If a food category was specified in the initial
search vendors selling it are listed first and
highlighted as selling that food
31. Introduction
7) Foods selected for further “Product
Details” are also highlighted.
(example below: “fruit” is highlighted to indicate the
product details being displayed are for that category.)
32. Introduction
8) Visual Concealment of Supplier Markers
- In lieu of transparent infoWindows the main infoWindow is
briefly closed and re-opened in Step 5, at least making the
user aware of supplier markers that may be behind it.
33. Introduction
1) Marker Clustering
- issues to work out with emptying the array
of GoogleMap API’s “MarkerClusterer”
method.
2) Enable typing searches
3) User input / interaction (reviews,
comments)
35. Introduction
1. Oger, R., Krafft, A., Buffet, D., Debord, M. (2010, June 28). Geotraceability: An
Innovative Concept to Enhance Conventional Traceability in the Agri-Food Chain,
Biotechnol. Agron. Soc. Environ. 2010 14(4), 633-642 Retrieved from HYPERLINK
http://popups.ulg.ac.be/1780-4507/index.php?id=6375
2. Wang, L., Lu, C., Xie, J., Hu, Y., (2005) Review of Traceability System for Farm
Animals and Their Products. Retrieved from HYPERLINK
http://www.jaaslib.ac.cn:88/daamnet/DAAM-
7/Review%20of%20Traceability%20System%20for%20Farm%20Animals%20and%2
0Their%20Products.htm
3. Mann, S., (2005) What to do When an Emergency Strikes: Farm and Industry
Groups Prepare Their Defenses Against the Next Foreign Animal Disease Outbreak.
Retrieved from HYPERLINK http://www.betterfarming.com/2005/bf-
dec05/cover.htm
4. Haines, R.J., (2004) Farm to Fork: A Strategy for Meat Safety in Ontario. Retrieved
from HYPERLINK
http://www.attorneygeneral.jus.gov.on.ca/english/about/pubs/meatinspectionrep
ort/
Notes de l'éditeur
----- Meeting Notes (2014-05-28 21:11) -----
Google Maps API is free as long as sites using it do not charge visitors, and there less than 25,000 visits / day.
----- Meeting Notes (2014-05-28 21:03) -----
Step 1 - Due to the wide variety of foods, all foods were assigned to categories
----- Meeting Notes (2014-05-28 21:11) -----
DEMO THE APPLICATION HERE
----- Meeting Notes (2014-05-28 22:26) -----
1. Show "App Introduction" and "Development" Pop-up Windows
2. Search for "fruit" at Bridgetown Market
2. Search for