#6813 closed enhancement (fixed)
The whole world in a graph
Reported by: | ncohen | Owned by: | rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3 |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | sage-4.3.alpha1 | |
Authors: | Nathann Cohen | Reviewers: | Adam Webb |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This patch adds a function WorldMap? to graph_generators.py, which lets the user load the graph in which vertices are countries and links denote a shared boundary between two of them. The data I used to build this comes from The Cia Factbook ( mentionned in the docstring )
To use it, you need to apply the patch, but also to move the file graph_world.sobj to SAGE_ROOT/data/graphs/
Thank you for your help ! :-)
Attachments (3)
Change History (13)
Changed 11 years ago by
Changed 11 years ago by
comment:1 Changed 10 years ago by
- Summary changed from [with patch, needs review] The whole world in a graph to [with patch, needs work] The whole world in a graph
comment:2 Changed 10 years ago by
that was with 4.1.2.alpha2
comment:3 Changed 10 years ago by
- Summary changed from [with patch, needs work] The whole world in a graph to [with patch, needs review] The whole world in a graph
I get a totally different checksum..... Good job noticing it !!!
I just retried to load the graph with a version of the file graph_world downloaded from the TRAC server and it worked for me. My checksum is the following :
sage: sage: g=graphs.WorldMap() sage: g Graph on 251 vertices sage: import md5 sage: sage: md5.md5(sage.misc.misc.SAGE_DATA + 'graphs/graph_world.sobj').hexdigest() '805fdf0227e964c41f3892c6979f62dc'
As I suspect it may come from some weird encoding, here is a .rar version of the file : http://www-sop.inria.fr/members/Nathann.Cohen/world.rar
I also copied the file on sagemath in the directory as ~/ncohen/graph_world.sobj
On my machine
~$ md5sum /usr/local/sage/data/graphs/graph_world.sobj 438bc195a9486caebeb47442ff8b8d8c /usr/local/sage/data/graphs/graph_world.sobj
On sagemath
ncohen@sage:~$ md5sum graph_world.sobj 438bc195a9486caebeb47442ff8b8d8c graph_world.sobj
Could you check if this version works, and if the checksum is correct ? Thank you !!!
Nathann
comment:4 Changed 10 years ago by
I get the same checksum as you do.
{{{$ md5sum data/graphs/graph_world.sobj 438bc195a9486caebeb47442ff8b8d8c data/graphs/graph_world.sobj }}} I was unable to apply the patch to sage-4.1.2.rc0. I guess a rebase is needed. Once I had the patch applied there were some warnings when I tried to do sage -docbuild. I made some changes to fix that. Specifically, I changed the reference so that it was similar to other ones on the same page. I hope that it is still fine. Otherwise, if you are happy with my small changes than I would give it a positive review.
Adam
comment:5 Changed 10 years ago by
- Reviewers set to Adam Webb
comment:6 Changed 10 years ago by
These changes are perfect for me ! Thank for your help :-)
comment:7 Changed 10 years ago by
- Status changed from needs_review to positive_review
- Summary changed from [with patch, needs review] The whole world in a graph to [with patch, positive review] The whole world in a graph
comment:8 Changed 10 years ago by
- Merged in set to sage-4.3.alpha1
- Report Upstream set to N/A
- Resolution set to fixed
- Status changed from positive_review to closed
comment:9 Changed 10 years ago by
I had to add the .sobj file to the graphs-20070722 spkg.
comment:10 Changed 10 years ago by
- Summary changed from [with patch, positive review] The whole world in a graph to The whole world in a graph
I get errors. At the bottom, I copy the md5 digest to check my download: