Hacking my maps
Day 196
Morelia, Mexico
I spent 2 days messing about with my maps, getting them linked to my blog posts, and its been a minor nightmare. Its not good to have to edit them manually so I’ve been working on automating the whole process through macros. After much effort I finally succeeded and so now I only have to press a few buttons and its mostly sorted out.
So, in case anyone is interested, here is the code. I will do a better post sometime in the future. Maybe. The results should be apparent in a few hours…
Sub Macro1()
‘
‘ Macro1 Macro
‘ Macro recorded 1/19/2008 by Travel Trousers
‘
‘ Keyboard Shortcut: Ctrl+q
‘
‘initial cut to 10kmh subroutine
‘Application.ScreenUpdating = False
‘delete first row
Range(“A1″).Select
ActiveCell.EntireRow.Delete
Range(“A2″).Select
Do
If ActiveCell.Offset(0, 5).Value < 10 Then
ActiveCell.EntireRow.Delete
ActiveCell.Offset(-1, 0).Select
End If
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
‘delete last row
ActiveCell.Offset(0, 0).EntireRow.Delete
Application.ScreenUpdating = True
‘delete unneeded time and distance columns
Columns(“E:F”).Delete
End Sub
Sub Macro2()
‘
‘ Macro2 Macro
‘ Macro recorded 1/19/2008 by Travel Trousers
‘
‘ Keyboard Shortcut: Ctrl+w
‘
‘second macro to halve the output each time it runs
Range(“A2″).Select
‘Application.ScreenUpdating = False
Do
ActiveCell.EntireRow.Delete
ActiveCell.Offset(1, 0).Select
‘ActiveCell.EntireRow.Select
‘ActiveCell.EntireRow.Clear
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
Application.ScreenUpdating = True
End Sub
Sub Macro3()
‘
‘ Macro3 Macro
‘
‘ Keyboard Shortcut: Ctrl+Shift+E
‘
‘make sure we can see the date
Columns(“D:D”).Select
Selection.ColumnWidth = 20
Dim startdate As Date
Dim datenow As Date
Dim days As String
Dim blogtitle As String
Dim blogpage As String
Dim blogloc As String
Dim currcell As String
‘define start of trip
startdate = “13/09/2007″
‘start at row 3
Range(“A3″).Select
Application.ScreenUpdating = False
Do
‘check if the dates change
If ActiveCell.Offset(0, 3).Value <> ActiveCell.Offset(1, 3) Then
‘select the row under &
ActiveCell.Offset(1, 0).Select
‘make a new line for kml info
Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove
‘remember active cell
currcell = ActiveCell.Row
‘copy the date now
datenow = ActiveCell.Offset(-1, 3).Value
Range(“K1″).Select
blogtitle = ” No blog entry for this day”
blogpage = “”
blogloc = “”
‘work out the date and then pull the info from the list of points from the K column
Do
If ActiveCell.Offset(0, 1).Value = datenow Then
blogpage = “http://www.traveltrousers.com/blog/?p=” + ActiveCell.Offset(0, 0).Text
blogtitle = ActiveCell.Offset(0, 2)
blogtitle = “<![CDATA[<p><A href=" + Chr$(34) + blogpage + Chr$(34) + ">" + blogtitle + "</A>]]>”
blogloc = ActiveCell.Offset(0, 3)
‘info found so exit loop
Exit Do
End If
‘move down to continue loop
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Offset(0, 0) = “END”
‘start back at the top
Range(“a1″).Select
‘& go back to previous cell
ActiveCell.Offset(currcell – 1, 0).Select
‘work out how many days have passed
days = Application.WorksheetFunction.Days360(startdate, datenow)
‘fill out the cell with the info
ActiveCell.Offset(0, 0).Value = “</coordinates></LineString></Placemark><Placemark><name>Day ” + days + “</name><description>” + ActiveCell.Offset(-1, 3).Text + blogtitle + “</description><styleUrl>#msn_ylw-pushpin</styleUrl><Point><coordinates>” + ActiveCell.Offset(-1, 0).Text + “,” + ActiveCell.Offset(-1, 1).Text + “,” + ActiveCell.Offset(-1, 2).Text + “</coordinates></Point></Placemark><Placemark><name>” + blogloc + “</name><description>” + ActiveCell.Offset(-1, 3).Text + blogtitle + “</description><styleUrl>#sn_ylw-pushpin</styleUrl><LineString><coordinates>”
‘move on if succesful
ActiveCell.Offset(1, 0).Select
End If
‘move down to continue loop
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
‘delete the unneeded columns
Columns(“D:N”).Delete
End Sub
Tags: isempty, morelia, blog, keyboard shortcut, subroutine, nightmare, time and distance, blogpage, datenow, morelia mexico, a3, mapsI’m going home….
Day 194
Morelia, Mexico
I bought a flight back to the UK today. I guess I had no choice, who else would be my Brothers best man? :p So on the 22nd of April I will be flying up to New York for 4 days before heading back over the Atlantic for 3 1/2 weeks. I’m not sure whether to be happy or depressed :/
Spent the day wandering around Morelia, which is a pretty nice town and took a few pics. Here are some of the better ones.
Tags: Travel, tent, best man, going home, brother, thumb, morelia mexico, blog, morelia, trousers, mexicoThe Mexican Mirror Scam
Day 192
Guadalaraja, Mexico
I finally got some new mirrors so I’m gonna be out of here tomorrow. With Easter making all the shops close for a week I didn’t want to have a 400km journey over to Morelia with no mirrors, or even my little hand held mirror taped on… I went down to the ‘Spare parts’ district on Saturday after I found everywhere was closed from Wednesday onwards and you should have seen the guys running after me when they spotted I didn’t have any mirrors. One guys seemed to think he could get some but after standing around for 5 minutes I drove off, much to his dismay, I’m perfectly capable of getting my own mirrors… Some other guys stopped me, and wanted …. $120! wow! They dropped down to $90, and kept going on about original parts. Big deal, they’re only mirrors, and they’re probably MY original parts. I wasn’t prepared to negotiate from such a high figure so left the area. Its a great scam, I saw a few other people with US plates looking for mirrors… Steal their mirrors, sell them to the shops and everyone is happy. Apart from the gringos.
I went back this afternoon and got 2 mirrors and the plates for $40. I probably should have haggled harder. He started at $60 and kept making a show of calling someone on his mobile to get a cheaper price. As usual the threat of walking away got the price down, but I suspect you could get exactly the same mirrors for $20 in a US breakers yard. So if you’re driving south bring a spare mirror, or 2. There’s a good chance they’ll be broken sooner or later anyway. So after 2 weeks of hanging out in a large city, reading, writing and learning Spanish I really have to get a move on.
With some luck I will be doing some more paragliding later in the week, apparently a place called Valle de Bravo, near Meico City, is quite good for it. Wish me luck!
Bloody kids!
Day 182
Guadalajara, Mexico
I go outside to my car and find some ass-masters have stolen the glass in my rear view mirrors! I thought about getting mad but then…. they’re only mirrors…
Tags: cars, mexico, trousers, guadalajara, blog, Travel, tent, thumb, mirrorWandering around Guadalajara
Day 181
Guadalajara, Mexico
I was getting close to finishing off the current book I’m reading, an Umberto Eco novel called ‘The island of yesterday’ which was a tour de force of brilliance but was slightly distracting in my quest to be a tourist. I must try not to read when I wake up as there is a natural tendency to fall asleep once more, which is of course what happened. It was afternoon by the time I woke and I wandered up into town to find something to eat. My car was sitting baking in the sun and I opened it up to find the new wax on my surf board had melted and dripped all over one of my camping mats :/
The city center isn’t very far so I decided against putting my bike together and just walked up. The traffic was pretty bad, but this being the second largest city in Mexico would only be eclipsed by Mexico City, a place I’m not looking forward to driving in, but shouldn’t be any worse than anywhere else, it would just be more crowded. People in the states told me that Boston had the worst drivers but I didn’t particularly find that to be true just as people in Mexico warn me that Mexico City is a nightmare to drive in, but I’m not so sure. I’m sure its only as bad as Bangkok or Kamapala in Uganda. More traffic means you go slower but also means its safer. Then you only have the problem with the cars around you. I’ve found Mexican drivers to be rather selfish though, the usual stupidity of third world thinking where everyone is looking out for number one. Yesterday I saw a ambulance sitting at the traffic lights with his lights flashing and no one moved. So either it wasn’t a real emergency or the driver realised that even using his siren wouldn’t get them out of the way. This is the scariest thing I guess, you can crash your car, get some help and the traffic still kills you on the way to hospital.
Surveys show that the vast majority of people consider themselves to be an above average driver but this is clearly impossible. I find it better to regard myself as a below average driver since I am regularly doing what is the most dangerous activity in my life it is better to regard the whole act of driving as a easy route to my own death and I would be better thinking I barely knew how to drive. Hidden oil spills, dogs on the road, blown tires, mechanical failure, gravel, dust and sand, huge potholes…. the list is endless and all waiting for an unwary driver to not be concentrating. Dying in a car crash is surely the stupidest and most pointless way to die as its highly preventable. Dying in a drink driving crash is far, far worse, but we’re in Mexico… It happens.
Maybe I should go shopping, Guadalajara has loads of stores and I think my current wardrobe is rather lacking. At least I don’t have to carry any clothes In the city center I set off in search of something to eat but I didn’t seem to have much luck. Everything seemed so… meaty! I wasn’t going to starve though I’m sure, and I’m happy to back into size 32" jeans once more, maybe I can get it down to 30" before the end of the year, something unseen for 10 years. Kira reminded me about a water/maple syrup/cayenne pepper/lemon juice diet with daily sea water enemas which would probably do it. 10 days of that and I’d be really able to eat like crazy for a few months :p If only I could find some food. I found myself in the wedding dress district which was clearly the wrong place for a hungry tourist although it was packed with hopeful looking girls all window shopping for their perfect dress, whether they had the perfect man to go with it was unclear.
Guadalajara isn’t a bad place to get lost searching for something to eat though, the architecture is stunning, with sunny plazas around every corner and neoclassic buildings towering overhead. Its still typical Mexico though with plenty of street sellers hawking their wares; beggars and buskers. I finally gave up and headed for Sanborns, a slice of the 50′s and somewhere I had eaten in before. I was disappointed to see that they give you Nescafe if you order coffee with hot milk, although I’m not sure whether that was a better option than the weak Americano coffee with those awful non-dairy creamer pots you get. What’s so wrong with milk?? I spent far too long reading but tempered my guilt with going through some Spanish-English flash cards and hopefully sticking a few more words to my dull brain. By the time I was onto the last chapter it was dark outside but it was still early and I hadn‘t even eaten. I then realised that I had gone through a time zone and lost an hour, but this is hopefully the last one I will have to suffer. I really don’t like going east!
Tags: traffic, drinks, shopping, chap, rash, sun, mexico city, hawk, bangk, sea, wanderingsTime to leave
Day 179
San Blas, Mexico
Everyone had gone! Even the two American girls camping under Cabana had left, heading into town for a hotel room before their early morning bus ride, there was only the German group left and they weren’t too keen on speaking in English all day. Maybe I should have gone to Sayalita with Ben and Noah, but they didn’t ask and I didn’t push. I made some tea (my coffee had run out) and sat on my balcony for most of the day trying to get back up to date with my blog. I wrote and I wrote and slowly the days disappeared, its funny how long it takes to get back up to date, even when you’re seeming doing very little. My legs and arms were a galaxy of red stars though, the sandflies setting off supernovas all over my body that itched like crazy. I was thinking it might be time to get out of San Blas, really break the curse and move on, I would head to Tepic and decide from there.
Tags: camping, san blas mexico, cabana, bus ride, balcony, red stars, man group, girls, german group, noah, morning busHunting Crocs
Day 178
San Blas, Mexico
![]()
![]()
![]()
![]()
boat trip/bye to kira/finding the right boat/animals etc/rope swing/laundry and ATM/dinner with boys/lazy boys/ride into town/renaming photos/looking for croc skull/guitar-surf-run/taco’s in town
Tags: mexico, kira, thumb, tent, skull, laziness, atm, crocs, blog, photos, san blas mexico, Travel, boats, animals, trousers, laundry