Building a Data Driven Organization, Part #11: Power Global Supply Chains

998
2
01-25-2022 07:28 AM
BruceHarold
Esri Regular Contributor
1 2 998

Let's expand the scope of the 'data driven organization' theme just a little to include every organization in the world, or at least all those you care about in their B2B interactions.  If you're an agency responsible for promoting business efficiency you might like to curate data like in the below map in your SDI, it is all businesses in a country with all their functional locations uniquely keyed, the map view is centered in a city industrial zone (there is an estuary in the middle - it's a very scenic industrial zone):

Company LocationsCompany Locations

The dots on the map are coming from an ArcGIS Knowledge graph service, I'll get to the details in a bit, but more importantly what is the big picture?  It is standardized, authoritative, shared access to entity location in a way you can build into your B2B processes and trust its validity and persistence.  Using a standard in other words.  The dots are GS1 Global Location Number (GLN) locations.  Any legal, physical, functional or even digital location can get a GLN, and where they have a location, be used for logistics - i.e. supply chain analysis.  When combined with other operational data like purchase orders, inventory value, goods in transit between GLN points etc., a graph analysis opens up many more analytic opportunities to improve near real time business decision making.  Even just adopting GLN as a shared foreign key in an economy will enable efficiencies and reduce errors.

The dots on the map above are where registered businesses identify their primary location to be.  Well, more correctly I geocoded the locations from addresses contained in a bulk download of a day's snapshot of GLN data.  I used the ArcGIS Online World Geocode Service and I worked in ArcGIS Pro, using the ArcGIS Data Interoperability extension to handle the JSON data in the download.  I didn't write any code.

If you read up on the GLN, you'll see its a 13-digit number and does not in itself encode location.  To create geometry from GLN data you will need supporting address or coordinate data.

Lets discuss GLN a little before having some fun with the data.  There are many approaches to encode 2D geometry into a single value, such as geohash, Google's S2 library, Uber's H3 library, several distributed global grid (DGGS) hashing schemes and at first I wondered why GS1 didn't use one.  On reflection businesses can relocate, or even be mobile, and locations may be 3D.  Digital GLN numbers (web domains etc.) aren't even physically located, so a number was chosen as the 'encoding'.  13 digits is a little awkward, it overflows a long integer type and using a double precision type runs the risk of some storage or transport formats creating a decimal from the number (adding '.0') so for my purposes I handle GLN as char(13) and generate geometry as 3D WGS84 points, with 0 as the default elevation above the ellipsoid.  I suppose if I was doing this for real I would store the epoch too so tectonically fast-moving places like Australia could maintain 2D accuracy over long time periods.  Some businesses are hundreds of years old!  Anyway, on to a scenario!

The simplest use case for keying B2B transactions with GLN is logistics - shipping goods.  Things like sale and purchase agreements would come for the ride, recording any transaction's GLN details.  My (fake) scenario is the International Space Station has a need for a new dishwasher, your transactions may be more mundane.  The purchasing folks for the ISS are very smart (after all, they are rocket scientists) and looked for an innovative appliance manufacturer closely located to a launch provider.  After a little research they found a good pair of suppliers and organized delivery of a custom zero-gravity dishwasher.  The agency where the companies are located made an enlightened decision to base their corporate registration system on GLN, so this high value (or any) transaction can be driven by GLN!

In the blog download is a locator, unzip it into an ArcGIS Pro project folder and add it to your project.  Make two maps in Web Mercator coordinate system, make the basemap Imagery Hybrid and arrange them side by side.  In the left map use the Locate tool to go to the location 9429040747378 and in the right map go to 9429034019108.  I built the locator to return a company name in a field EntityName.  When you geocode to the GLN locations the candidate popup will reveal the suppliers I'm talking about.  They are real companies that really operate in the industries I mention.  A human interest factoid, the CEO of the rocket company used to work at the appliance manufacturer, and so did I.

Here is how things should look with the maps at 1:2000 (you will not have the blue dots), obviously the companies would use their GLN locations for shipping arrangements in their contract.

Appliance manufacturer and launch provider locations via GLN locatorAppliance manufacturer and launch provider locations via GLN locator

So that's a shout out to GLN as a hook to hang B2B processes on.  It is simple, official, and extensible - organizations can have any number of GLN numbers for delivery points, including ones they might keep private for internal purposes.  All that remains is for you good folks to build it out.  Ask your local Esri representative for help building out GLN as part of your SDI.

I said I created a Knowledge graph with the data.  The source dataset was ~6GB of zipped JSON, I got it into the graph in three steps (without unzipping):

 Extract Company DataExtract Company Data

 

Load EntitiesLoad Entities

 

Load RelationshipsLoad Relationships

 In hindsight I could have done less flattening of the JSON and retained more expansion tables but it doesn't matter for this exercise.  The graph has these object counts:

Graph Investigation ContentsGraph Investigation Contents

 

That's the whole database, including historic records.  I might not retain everything if I was doing this for real.

I mentioned I flattened everything in the JSON, so I ended up with very much a star schema, not a snowflake one.  The Company entity is the sole fact table, everything else is a dimension with a relationship starting at Company, hence the names I gave them beginning "co".  You can go either way with a graph.

Lets see a couple of things the graph can tell us.

In the map of GLN locations I noticed a lot of business locations in amongst residential housing, to the east of the map.  What's going on there?

Businesses in a residential areaBusinesses in a residential area

I sent in this query to the graph:

match (ra:RegisteredAddress {postCode:'2016'})<-[:coHasRegisteredAddress]-(co:Company {entityStatusDescription:'Registered'})
with co
match (co)-[:coHasIndustryClassification]->(ic:IndustryClassification)
return ic.classificationDescription, count(*) as icCount order by icCount desc

Here is what is returned:

Business Classifications in Postcode 2016Business Classifications in Postcode 2016

 

They are a bunch of property developers!  Well, the data has a long tail, there are 689 business classifications represented, making fascinating reading, right down to motor wreckers, milliners and milkers of cows.

Back to the graph theme.  I can see 10 construction carpentry businesses and can get them into a link chart:

match (ra:RegisteredAddress {postCode:'2016'})<-[:coHasRegisteredAddress]-(co:Company {entityStatusDescription:'Registered'})
with co
match (co)-[:coHasIndustryClassification]->(ic:IndustryClassification {classificationCode:'E324220'})
return co

Construction Carpenters in Postcode 2016Construction Carpenters in Postcode 2016

 

At this point I run out of steam with my analytical abilities with graphs so I'll stop while I'm ahead.  That's a personal limitation, not the technology, I just haven't spent time refining my skills.

The point I really wanted to make is the world's businesses and transactions can be modelled in ArcGIS and there is a handy linking key available to you in the GS1 GLN.  Talk to the responsible people in your organization, province, state or country and help get everyone on the map!

2 Comments