Mapping My Travels with Mathematica
Reading Theo’s blog post about his website reminded me that our excitement about the grand projects that get done in Mathematica often make us forget to talk about all the exciting little things that Mathematica makes possible too.
It would be easy to think that Mathematica is only suitable for website production if you have something on the grand scale and high traffic of periodictable.com. So I wanted to write about using Mathematica to make a website that is anything but grand and far from popular… my own.
My pages are just an attempt to put my footprint on Google so that I can be found. It mostly consists of a few basic pages about me and my work with Mathematica.
So what advantage did I get out of doing it in Mathematica?
Well, the first was pretty basic personal practicality—why learn new tools if you don’t have to? I know Mathematica, and I knew it would be faster for me to create it in Mathematica than to find and learn how to use other content management and authoring tools.
Once I had coded up a page template in the symbolic XML features of Mathematica, I could create any new page by applying that function to the page content text. The whole lot is automatically written out as HTML and uploaded to the server by Mathematica.
But the one unusual part of the content is ONLY practical with Mathematica. My work with Mathematica takes me to a lot of places—giving talks about it, meeting business and technology partners and all kinds of users. I also travel for fun. I wanted to make a definitive list of places that I have been to and to present that visually.
I first thought about the project a couple of years ago, but abandoned it because I got so bored of looking up the latitude and longitude of each place. I even wrote a Mathematica tool where I could click on the map to get those values, but found I still had to spend too much time looking up where each city was on the map.
Now with the CountryData and CityData in Mathematica, I can create the 28 country pages of my website from just a list of city names, and at last the project has become practical.
I went to the UAE for the first time in December. Updating the index page and the thumbnail of the Middle East, creating the UAE page and adding Dubai to the map in the right color took only the following addition to the code:
{"UnitedArabEmirates", "Dubai","Work","9-Dec-2007","Meeting journalists on my way to the Gulf Mathematica conference"}
I don’t make use of the last two bits of data yet, but at some point I’ll enable the 10 lines of code that will build and link a page for each of the 400+ towns and cities currently in my database.
The biggest problem I have now is to remember when and why I went to all these places and where else I have been, but I don’t think Mathematica can help with that.
i want to make a cart of my travels
That is an interesting concept. I would like ot have a record of all the places I have travelled to. Not sure I would like it in the format as you show it but with some changes I think I could become quite sought after.