NATION

PASSWORD

Embassy Ties

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Embassy Ties

Postby Letoilenoir » Tue Mar 26, 2013 12:59 am

I am currently using NodeXL to attempt to map the Embassy relationships but it is an laborious task - basically it requires two sets of vertexes to be populated with data listing every regions embassies with every other region

A preliminary example can be found here

http://www.nodexlgraphgallery.org/Pages ... aphID=3777

(the interactive experimental version is here: http://www.nodexlgraphgallery.org/Pages ... aphID=3777 )

Does anybody have a quicker way to consolidate the embassy data available from the API/Daily Data Dumps to facilitate this?
Is anybody willing to collaborate on mapping this at all?
In view of the ominous "Regions will Fall" notice is there any point in continuing it?
Last edited by Letoilenoir on Tue Mar 26, 2013 1:01 am, edited 1 time in total.
KEEP THE BLOOD CAVE FREE

User avatar
Nonce Rho
Lobbyist
 
Posts: 17
Founded: Jan 25, 2013
Ex-Nation

Postby Nonce Rho » Tue Mar 26, 2013 12:41 pm

I have no idea about your question, but I just want to say that it's really cool. Nice work. :bow:


User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Tue Mar 26, 2013 2:53 pm

:lol:

I sent a TG to New Texas earlier asking for input

In response several graphs that were previously absent seem to have materialised here:

http://nsdossier.texasregion.net/embassy.aspx
KEEP THE BLOOD CAVE FREE

User avatar
NewTexas
Spokesperson
 
Posts: 181
Founded: Antiquity
Civil Rights Lovefest

Postby NewTexas » Tue Mar 26, 2013 5:09 pm

Howdy Black Star! Image

Aren't you Johnny-on-the-Spot! We saw this post 12 hours ago, but did not have time to reply. However, we did get time to put up our prototypes. And, you already found them without us even having to point them out. You are one sharp cookie!

We see you are doing the same thing we started doing. We never finished it because of a perception of little interest. Also, we started doing the math and there is a lot of data involved here. We don't know if you saw our little snapshot at the bottom of The Oracle Of NationStates page, so we will repeat it. There are 6,988 Regions in The World with an Embassy as of Tuesday, March 26, 2013. And, There are 42,999 Relationships amongst the World's network of Embassies as of Tuesday, March 26, 2013. And, the Region of The World with the most Embassies is Guardian Network with 1,000 as of Tuesday, March 26, 2013. We were trying to make it fast and crunch the daily regional feed into a JSON structure because JSON is supposed to be fast. 43,000 nodes, even in JSON, is probably not fast. And that is just with nation names. We were trying to make it fancy with population counts, Factbook Entries, Flags, etc. It got seriously large, seriously fast. We are not sure browsers can even handle it. So, we tried to do an extract. But, thanks to Embassy-Whores like Guardian Network, virtually everyone is related to everyone. So, you cannot take a slice. It is everybody or nothing. There are exceptions amongst the onesies, but those are not really what either of us want.

So... Well, it is a lot of data. We are not sure our plan can handle it. We are not sure your plan can handle it. We can try and see. We can also post a link to the data we generate daily. However, before we go through all that, maybe you should try some sample data to see if you can deal with it. Here is the JSON we produce here. Aside from that, we are not sure how much help we can be. We could probably generate some pure XML, but that would take some work. And what more would it look like?

Probably just like the daily feed. You can extract that easily enough:

Code: Select all
<nodes>
  <node>
    <NAME>Texas</NAME>
    <EMBASSIES>
      <EMBASSY>Wysteria</EMBASSY>
      <EMBASSY>The Heartland</EMBASSY>
      <EMBASSY>10000 Islands</EMBASSY>
      <EMBASSY>Yggdrasil</EMBASSY>
      <EMBASSY>Antarctic Oasis</EMBASSY>
      <EMBASSY>Monkey Island</EMBASSY>
      <EMBASSY>Liberty Alliance</EMBASSY>
      <EMBASSY>North Pacific</EMBASSY>
      <EMBASSY>The Black Market</EMBASSY>
      <EMBASSY>Ulthar</EMBASSY>
      <EMBASSY>Kittens Sanctuary</EMBASSY>
      <EMBASSY>Canada</EMBASSY>
      <EMBASSY>Nasicournia</EMBASSY>
      <EMBASSY>The Exodus</EMBASSY>
      <EMBASSY type="invited">Gracemeria</EMBASSY>
      <EMBASSY type="invited">Houston</EMBASSY>
      <EMBASSY type="invited">San Antonio</EMBASSY>
      <EMBASSY type="invited">Turkish Islands</EMBASSY>
    </EMBASSIES>
  </node>
</nodes>


Those are some thoughts.

Big Tex
:ugeek:
Big Tex
Governor of Texas

Author: NSDossier

User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Wed Mar 27, 2013 12:56 am

My apologies if I have offended you, this was not my intention

I will be the first to admit that much of what you provide through the NS Suite is way beyond my capabilities, and in no way would I presume to have a better handle on the data involved, or the sheer scale of the project, you and the information you provide are a very underestimated facility IMHO

I merely wish to explore the possibility of a network visualisation, and perhaps not coming from a technical background am ignorant of the limitations. At the same time, being ignorant of the rules I may unwittingly break them, and sometimes doing so may show an alternative approach.

My own starting point has been the GCRs and who are they connected to, as they are considered by some to be the centre of NS - it may be that the data has to be siloed into categories defined by region TAGs perhaps, or other suitable filters to make such a visualisation possible , I honestly don't know.

Would your own facility that shows the degrees of separation perhaps provide a workable map?
KEEP THE BLOOD CAVE FREE

User avatar
NewTexas
Spokesperson
 
Posts: 181
Founded: Antiquity
Civil Rights Lovefest

Postby NewTexas » Wed Mar 27, 2013 4:56 pm

Letoilenoir wrote:My apologies if I have offended you, this was not my intention


Nothing to apologize for - don't know what gave you that impression. It is far from the truth. We even complimented you on noticing we had updated our website within minutes of doing it.

You have given us some new ideas. We are intrigued. We are thinking maybe one or two of our visualization efforts may work. For example, if you enter a region to have the visualization centered on as a starting point, then maybe it would be valuable.

There is still a lot of data - we stripped down the daily feed tot remove all the <nations> tags and the file is still 10MB with 250,000+ carriage returns. That is a lot to send to the browser. Looking at your GraphML file, you have 5 lines per relation and with 43,000 relationships, that makes a seriously large amount of data. We are not sure what we can do to help you. We can give you a list of pairs like:

Code: Select all
Texas:Wysteria
Texas:The Heartland
Texas:10000 Islands
Texas:Yggdrasil
Texas:Antarctic Oasis
.
.
.
Wysteria:Texas
Wysteria:The Heartland
Wysteria:Canada
Wysteria:The Cuckoos Egg
etc.


But, you can probably do that yourself. The real problem is going to be how to deal with so much data.

Regarding your thought on filtering, it is really not feasible since everyone is related to someone else practically. Unless, well, you could do just one side of the pairs. That would be like one region in the center with lines out to who they are related to, but not showing anybody those are related to. But that is like what NS already does, so there is not a lot of value in doing that.

We are just brainstorming here...

:ugeek:
Big Tex
Governor of Texas

Author: NSDossier

User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Thu Mar 28, 2013 12:58 am

Parsing the daily data dump through Excel (via the XML functionality) can quickly give a complete list of the relationships , however as you say it does produce a whole lot of data (43041individual rows as at yesterday's file although removing duplicates eg Asgard:Pacific/Pacific:Asgard might reduce that number slightly) and does not give a pretty result, at least in its basic form:

https://www.nodexlgraphgallery.org/Page ... aphID=3824

https://www.nodexlgraphgallery.org/Page ... aphID=3824



Perhaps using the region tags function and then drawing down the relevant data from the list could work - say for example only regions with the Tag Defender are used?

The list could then be cross referenced to a database of the connections perhaps?
KEEP THE BLOOD CAVE FREE

User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Thu Mar 28, 2013 1:59 pm

http://www.nodexlgraphgallery.org/Pages ... aphID=3835

Defender connections (links to regions tagged "Defender")

This was a manual process using Excel and NodeXL, but basically the array from the API call above was put into Excel each entry given akey value 1

A simple vlookup was used matching any region that was in the array, and assigning the value 1 to any corresponding Region/Embassy combination

Using this "key" a reduced list of nodes was obtained and fed into the NodeXL programme

I'm sure that those more versed in php/xml parsing could devise a method of automating this

The "weighting" of each region could be handled separately using criteria such as population, number of WA nations or some other criteria

Until such time as this is available I am quite happy to consider customised commissions, although NodeXL might frown at such frivolous use of their facilities!

;)
Last edited by Letoilenoir on Thu Mar 28, 2013 2:02 pm, edited 1 time in total.
KEEP THE BLOOD CAVE FREE

User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Fri Mar 29, 2013 3:18 am

https://www.nodexlgraphgallery.org/Page ... aphID=3842

Single Region Primaries & Secondaries

Using The Kingdom Of Northern Ireland as the starting point a lookup was used to generate values for the Primaries in an additional column

A second vlookup looped through this first column to populate values for the Secondary connections

The resulting list was fed into NodeXL, and the graph produced

Because their are further connections between the Primaries and Secondaries that do not link through TKNI, that region is NOT at the centre of the graph, although it is near to it
KEEP THE BLOOD CAVE FREE

User avatar
Letoilenoir
Chargé d'Affaires
 
Posts: 424
Founded: Nov 26, 2010
Ex-Nation

Postby Letoilenoir » Sun Mar 31, 2013 3:03 pm

Would it be feasible to use the update cycle as NS longitude data?
And if so what criteria could we use to calculate NS latitude?

Naturally I realise this would result in a continuous "landmass" for the length of there update with a yawning ocean between the end and start of the updates
KEEP THE BLOOD CAVE FREE


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Cuthford, Isla Pluma, Just let me grill, Omnicontrol, Wabacha

Advertisement

Remove ads