Click here to see the SAS code.
Click here to see the example.
I know of many/many people who would like to be able to take a floorplan
and tie it in with various databases (such as employee info, inventory
info, etc) and show the data on the floorplan, by room#.
One way would be to use a gif image of the floorplan, and then annotate
'invisible' hotspots on the exact right location, but that's a lot of
work to figure out where to put each hotspot, and make sure they line up
correctly.
Another way would be to try to import the AutoCAD floorplan file into
sas/gis, and then gis could draw the floorplan (but it still wouldn't
have a concept of which walls make up which room, since the walls are
probalby only lines, and the room#'s are probably only labels in the
autocad file).
So, in order to be able to handle the floorplan like a 'map', where
each room is an indivually addressable area in the map (like 'states'
are the areas in a US map), and to be able to color the rooms based
on some data value, and to be able to add charttips and drilldowns
to each room, I painstakingly created a sas/graph map data set,
entering (at least) 4 x/y coordinates per room to describe the
geometry of each room. This took a *lot* of work, but once I was
done I could re-use the sas/graph map data set *many* hundreds of
times, plotting different data on the map in different ways, so
it was by far worth all the hard work :)
In this example, I use fake/contrived data, and show what a sas/graph
floorplan map looks like, whowing 1 floor of a building, and color-coding
each office based on the department of the person in the office.
I also use sas/graph gmap's "html=" option to specify a variable that
contains html title= charttip/flyover-text, so you can mouse over the
rooms and see information about the occupant (if you're using the
Internet Explorer web browser - title= charttips are not supported
in netscape and mozilla).
I have created many internal applications which do the following
sort of things with this kind of sas/graph map, allowing the user
to enter some criteria, and dynamically producing the desired
map via SAS/Intrnet:
Locate a specific room#.
Color-code the selected floor by division.
Color-code the selected floor by department.
Show the offices containing certain kinds of inventory.
Do gradient shading of the offices based on years-of-service of the
person in each office.
Indicate the offices that are scheduled for a move, so the movers
will know exactly where to look for the offices.
And so on...
Back to Samples Index