Pajek .net file

2 views
Skip to first unread message

diddy

unread,
Aug 25, 2009, 10:48:47 AM8/25/09
to UrlNet Python Library
Hi,

Would it be possible to make URLNET output the Pajek .net file? This
is the file I'm after, but I have to go into Pajek, open the .paj file
then output the .net file from there.

Many thanks!

Dale Hunscher

unread,
Aug 25, 2009, 11:34:25 AM8/25/09
to urlnet-pyt...@googlegroups.com
There is a method on the UrlNet class to do this that is not
documented in the manual. I am on a public computer and don't have
immediate access to the source, but I will write later with more
explicit directions.
--
Dale A. Hunscher, MSI
Sr. Business Systems Analyst
University of Michigan Medical School
734-678-5178

diddy

unread,
Sep 1, 2009, 6:12:23 AM9/1/09
to UrlNet Python Library
Hi!

That would be great, thanks. I thought it might be there, but I'm not
a programmer, so I couldn't tell.

Also, is it possible (within the .net output) to include subdomains?
Sometimes in output one of the highest domains is: -

blogspot.com

Which is a conflation of many xxx.blogspot.com domains.

Finally (sorry!), are you able to output a simple 2-columns edge
network, e.g.: -

david<tab>john
david<tab>mike
david<tab>jeff
sally<tab>john
sally<tab>mike

etc.

That could be used to import directly into NodeXL for example.

Thanks! Dave.

On Aug 25, 4:34 pm, Dale Hunscher <daleh...@umich.edu> wrote:
> There is a method on the UrlNet class to do this that is not
> documented in the manual. I am on a public computer and don't have
> immediate access to the source, but I will write later with more
> explicit directions.
>

Dale Hunscher

unread,
Sep 3, 2009, 3:41:50 PM9/3/09
to urlnet-pyt...@googlegroups.com
Here is an alpha version of the library with demo programs that handle problems #1 and #3. There is a way to do #2 already but I need to play around a bit to figure it out again.

This code hasn't been through all the tests, but it should be pretty stable. You should back up your urlnet directory and then copy the urlnet directory contents in the zip file into it. The example programs you are looking for are write*.py, one do output just a pajek network and the other to do the pairs. Both of them were already implemented in the urltree.py module, but they were buggy and needed some beefing up. Let me know if these work for you. I'll get back to you regarding the *.blogspot.com issue ASAP.

Cheers,
Dale
examples.zip

Dale Hunscher

unread,
Sep 3, 2009, 5:45:43 PM9/3/09
to urlnet-pyt...@googlegroups.com
Oops! In preparing the zip file I threw the baby out with the bath water - the two key library files were missing. These have now been replaced in the attached version. Same instructions apply for where to put the files still apply.

Regarding the *.blogspot.com issue, I found the already-implemented solution and will prepare an example of how to do it ASAP.

Cheers,
Dale
examples.zip

diddy

unread,
Sep 8, 2009, 5:51:21 AM9/8/09
to UrlNet Python Library
Hi!

That's great - thankyou. I probably won't get the chance to test it
this week, but I'll let you know how I get on once I do.

Best regards, Dave.

On Sep 3, 10:45 pm, Dale Hunscher <daleh...@umich.edu> wrote:
> Oops! In preparing the zip file I threw the baby out with the bath water -
> the two key library files were missing. These have now been replaced in the
> attached version. Same instructions apply for where to put the files still
> apply.
>
> Regarding the *.blogspot.com issue, I found the already-implemented solution
> and will prepare an example of how to do it ASAP.
>
> Cheers,
> Dale
>
>
>
>
>
> On Thu, Sep 3, 2009 at 3:41 PM, Dale Hunscher <daleh...@umich.edu> wrote:
> > Here is an alpha version of the library with demo programs that handle
> > problems #1 and #3. There is a way to do #2 already but I need to play
> > around a bit to figure it out again.
>
> > This code hasn't been through all the tests, but it should be pretty
> > stable. You should back up your urlnet directory and then copy the urlnet
> > directory contents in the zip file into it. The example programs you are
> > looking for are write*.py, one do output just a pajek network and the other
> > to do the pairs. Both of them were already implemented in the urltree.py
> > module, but they were buggy and needed some beefing up. Let me know if these
> > work for you. I'll get back to you regarding the *.blogspot.com issue
> > ASAP.
>
> > Cheers,
> > Dale
>
>  examples.zip
> 254KViewDownload- Hide quoted text -
>
> - Show quoted text -

diddy

unread,
Sep 9, 2009, 5:35:37 AM9/9/09
to UrlNet Python Library
Hi,

When I try to run writepairfile.py, I get this error: -

>>>
Traceback (most recent call last):
File "E:\URLnet\examples_new\writepairfile.py", line 6, in <module>
net.WritePairNetworkFile('urltree1', 'urltree1urls', urlNet =
True)
AttributeError: UrlTree instance has no attribute
'WritePairNetworkFile'
>>>

Am I doing something wrong?

Dave.

On Sep 3, 10:45 pm, Dale Hunscher <daleh...@umich.edu> wrote:
> Oops! In preparing the zip file I threw the baby out with the bath water -
> the two key library files were missing. These have now been replaced in the
> attached version. Same instructions apply for where to put the files still
> apply.
>
> Regarding the *.blogspot.com issue, I found the already-implemented solution
> and will prepare an example of how to do it ASAP.
>
> Cheers,
> Dale
>
>
>
>
>
> On Thu, Sep 3, 2009 at 3:41 PM, Dale Hunscher <daleh...@umich.edu> wrote:
> > Here is an alpha version of the library with demo programs that handle
> > problems #1 and #3. There is a way to do #2 already but I need to play
> > around a bit to figure it out again.
>
> > This code hasn't been through all the tests, but it should be pretty
> > stable. You should back up your urlnet directory and then copy the urlnet
> > directory contents in the zip file into it. The example programs you are
> > looking for are write*.py, one do output just a pajek network and the other
> > to do the pairs. Both of them were already implemented in the urltree.py
> > module, but they were buggy and needed some beefing up. Let me know if these
> > work for you. I'll get back to you regarding the *.blogspot.com issue
> > ASAP.
>
> > Cheers,
> > Dale
>

Dale Hunscher

unread,
Sep 9, 2009, 9:01:13 AM9/9/09
to urlnet-pyt...@googlegroups.com
Hi David,

It sounds like Python is not finding the right urltree.py source file. I sent two examples.zip files containing source, but the first of these inadvertently left out the two files needed to make this work. I sent a second message a little bit later with the right one, but I will attach it to this message to be sure.

When you open up this zip file you will get two subdirectories, examples and urlnet. It sounds like you have the right examples, but you may not have got the right urltree.py and urlutils.py. To be safe, copy the entire contents of the zip file's urlnet directory into the urlnet directory where you originally installed.

I hope this helps.


Dale A. Hunscher, MSI
Sr. Business Systems Analyst
University of Michigan Medical School
734-678-5178



urlnetandexamples.zip

diddy

unread,
Sep 10, 2009, 5:01:17 AM9/10/09
to UrlNet Python Library
Ah perfect! Sorry, I didn't see the previous post. All working fine
now.

Did you manage to nail down the sub-domain issue? The problem here is
that when I look at the pair data (e.g. in NodeXL), I get vertices
that are huge for "blogspot.com" rather than seeing
"xyz.blogspot.com".

Best regards, Dave.
>  urlnetandexamples.zip
Reply all
Reply to author
Forward
0 new messages