[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Nebraska DHHS / PHINMS



http://odlug.org/tmp/map.png

On Apr 2, 2013, at 1:07 PM, "Loyall, David" <david.loyall@nebraska.gov> wrote:
> The top three graphs in the png you posted.  (queues with no service/action pairs pointing at them.)  For my draft printout, I switched go.pl's output format to 'canon', then hand-added "NONE / NONE" nodes to fall where the missing nodes "should have" been, then ran dot map.canon -Tsvg > map.svg .
> 
> How would I do that programmatically?

Oh. Ya. So currently the program is just parsing the two files and blindly add_edge()'ing. If you wanted to start QAing the data I'd separate the parsing from the graphing. So: (1) Parse in hashref(s), (2) QA that data, (3) Graph the data that passed QA.

I can re-org the code to work like that if you want.

> Incidentally, it just took me half an hour to figure out that the $graphviz inside sub add_edge {...} is the *same* $graphviz object that you declared up top.  I mean, I wasn't looking for it, because I am not used to that kind of scope...  Hm.  That's powerful, but I could see it $getting $out $of $hand $quick. ;)

Ya, the global $graphviz is pretty sloppy. #gitRdone  :)   You'd clean it up if the program grew to any significant size / complexity. 

>>> * db.table nodes should be grouped by DB
>> 
>> Ah. Ya, GraphViz doesn't really let you control node ordering as far as I know.
> 
> Sure it does!  Maybe the Graphviz2 library (perl) doesn't.  http://www.graphviz.org/Gallery/directed/cluster.html  Though I must admit that playing with these features is a good way to identify bugs in graphviz.

Oh? I did not know that.  :)  Ya, looks like GraphViz2 does it too:

   https://metacpan.org/module/GraphViz2#scripts-cluster.pl

I haven't played with that feature. 

> So if I really wanted that I'd probably build up your networks in a nested
> hashref first, then loop through that hashref and run Graphviz on each
> terminating node,[]  [...]

Yes, I'd like to learn to do that.  Then, each one could go in a subgraph (cluster).

> Hm, there's a whole class of data-flow-path missing from here.  Oh, there it is: https://github.com/daveloyall/sandbox/commit/9fd3e686fc58807f0a577f3e4c8a89aa23c8b228 :)

Nice!  :)

Let me know if you wanted me to re-org to (1) parse (2) QA (3) graph. I don't want to spoiler you if you're already working on that.  ;)

Jay Hannah
Project Lead / Programmer
http://www.iinteractive.com
Email: jay.hannah@iinteractive.com
AOL IM: deafferret
Mobile: 1.402.598.7782
Fax: 1.402.691.9496