Archive for the ‘Open Source Software’ Category.

Playing with heatmaps

My 'hello world' heatmap

Over that past few days I’ve been playing around with creating heatmaps to overlay onto OpenStreetMap – the image on the left is where I’ve got to so far. My interest in this is for creating heatmaps from data collected during my colleagues health sciences research in Ethiopia.

There are already several programs and services available to create heatmaps, for example gheat and OpenHeatMap. But none of these quite suited me, gheat because I didn’t want to create a full tile server – just an image to overlay on a particular area of the map and OpenHeatMap because I wanted to have access to the code to tweak how I wanted.

I then found heatmap.py which (using a similar algorithm to gheat) did almost exactly what I wanted. There were only a couple of changes that I needed to make:

1) Update to account for the Mercator projection – I wanted my overlay to be on a view of the whole world (zoom level 2 in OpenStreetMap). When I first ran the program the areas over northern Europe (and others) were almost but not quite inline with the marker overlays, but this was due to the projection. I just edited the input script to convert my lat/lng coordinates into Mercator coordinates. I also hooked up the heatmap.py script to read the lat/lng coordinated from a MySQL database.

2) Allow the script to have weights against each point. The current script looks at the number of points in a particular area (or on top of each other) to generate the ‘heat’. I also wanted to allow for points to have a weight – as mentioned here. I’ve not yet implemented the weighting, but I’m not anticipating this to be too tricky. GHeat (as far as I can tell) doesn’t allow for weights on points, but OpenHeatMap does (please let me know if I’m wrong about this).

All has been much easier than I’d expected, I’ve learnt a little more about python and once I’ve got the weighting working how I’d like, then I’ll share the code back.

elearning Africa conference – day 3

Giraffes at Chaminuka Game Reserve

Another really good day at the conference, most of the presentations and discussions I attended today revolved around the use of open source software. There are some particular issues with using open source software in Africa, for example the fact that although there is huge amount of help available to support people when trying to implement software, much of the help and documentation is online only – which can make it difficult to access. In one of the presentations some of the audience were still a little sceptical about how you can get something for free – surely there is a catch?

Late in the afternoon, I gave my presentation about the Digital Campus project. All went well and I was really pleased with the response and how many people had questions about the project. I finally met more people from Ethiopia, the Head of ICT from Jimma University and the Curriculum Expert and Pedagogical Editor from the Ethiopia Civil Service College in Addis. I’ve also been approached about setting up some study/tutor partnerships with universities in UK and Canada, so the tutors and students in Mekelle can pair up with tutors and students abroad to share teaching and learning experiences.

Overall the conference has been well worth attending, it’s the first conference I’ve been to for a long time and differs somewhat from the much more technical and programming focussed conferences and workshops I used to attend whilst at the OU. Now need to make sure I get another presentation accepted for the eLearning Africa 2011 in Tanzania.

Saturday was a day free for me, so after being at the conference much of the week, I headed out to a game reserve (Chaminuka) about 30km from Lusaka and had a relaxing day there, by coincidence I met several other people there who had also attended the conference – but we managed to avoid talking too much work.

Barcamp Ethiopia

Hopefully I’ll be around in Ethiopia in September later this year so I can attend ‘Barcamp Ethiopia‘.

Running my own OpenStreetMap server

UK map generated on my OSM server

UK map generated on my OSM server

After using OpenStreetMap in a fairly limited way for the past year or so, essentially just to upload data/tracks from wandering around Ethiopia, I thought I’d have a closer look, especially as a possible replacement for Google Maps which I was using a lot whilst at the OU.

Firstly I looked at how I could use OSM and the OpenLayers API as an alternative for the map in my Online Users Map – which certainly looks feasible. So I’m now thinking about making this an option in the block settings, as shouldn’t be too much work to provide the option.

I also set up my own open street map server (instructions for installing on Ubuntu Lucid Lynx). Although quite a long process everything worked well first time with no errors. I didn’t download the entire 8Gb+ OSM dataset to generate my tiles, rather I just selected a much smaller area of detailed data (using extracts from GeoFabrik and CloudMade). This avoided the potential ’30 hours or longer’ process of importing the world into my database – the whole dataset for Ethiopia took less than 30 seconds to import.

The only part where I ran into a problem was at the very end when I wanted to generate all the tiles. When I ran ./generate_tiles.py I kept getting an error telling me that osm-local.xml didn’t exist. Fortunately this was quite an easy fix, I just needed to edit ~/bin/mapnik/generate_tiles.py to point to ~/bin/mapnik/osm.xml instead, then all ran fine (generating 55Mb+ of png images).

I could then create an alias in my Apache to point to my generated tiles and create a slippy map using OpenLayer and the tiles generated on my desktop.

I still have a lot to learn about all this, especially with what can be done with Mapnik for generating tiles (and the python script necessary to achieve it) and using OpenLayers as a replacement for Google Maps API – but all going well so far :-)

Fix for ‘bad gateway’ issues with Online Users Map

After a long, long delay, I finally had chance to look at the ‘Bad Gateway’ problem that seemed to be stopping the Moodle Online Users Map block working. Whilst in Ethiopia my internet connection there wasn’t good enough to be able to spend time debugging this, but now I’m back on a more reliable connection I’ve been able to have a look.

It turned out to be a relatively simple issue to resolve, basically I wasn’t correctly constructing the call to the geonames website, so it gave the ‘bad gateway’ response.

If you are using (or trying to use) this block then please update to the latest version as soon as possible (go to: Moodle Modules and Plugins).

I’ve not yet had chance to test the changes when the Moodle server is behind a proxy server, I’ll try to get this tested soon. If you are using a proxy server I’d be very interested to know if it’s now working (or not).

[Update 20 Apr 12:30]: have just tested by going through a proxy server and appears to be working fine, but please let me know if it doesn’t work for you.

Getting ATI Graphics Card working with Ubuntu

Monitor comparison - my new 22'' desktop vs the 7'' of my Asus EEE PC

Since coming back I seem to have been unexpectedly busy – I had assumed that I wouldn’t have much to do, but have lots to prepare ready for returning to Ethiopia in June and attending the eLearning Africa conference at the end of May – where I’m giving a presentation about the Digital Campus project.

I’ve managed to catch up with many friends so far, but it’s been a little different than I’d expected. My time is very flexible and free at the moment, but everyone else still has work and other commitments, especially during weekdays.

I spend a very frustrating Monday trying to get my new computer set up correctly. I bought a new desktop machine with an ATI Radeon HD 5450 Graphics Card which doesn’t seem to work well with Ubuntu (9.10). I had a hard time figuring what was causing the display to freeze up at apparently random times. After being in use for anything from 5 mins to 8 hours, the screen would freeze up, with only the mouse moving and the only way of getting out of it being to do a hard restart.

I had got the ATI drivers installed as it was the only way I could get the full resolution from my monitor (1920 X 1080). I’m quite sure I had everything installed correctly, despite being confused by all the advice and postings about installing these drivers.

In the end I read a post which mentioned trying out the next release of Ubuntu, Lucid Lynx (10.04) – even though it’s not officially released for a week or so, it apparently has better support for ATI graphics cards. After the installation of Lucid Lynx, I haven’t need to installed any proprietary drivers and the monitor is working well at it’s full resolution. There are a few other issues at the moment (such as not being able to install Adobe Flash plugin), but then it’s still an Alpha pre-release so these issues are to be expected and should be resolved when the full release comes out next week.

Moodle Certified

Whilst I was away in Ethiopia I signed up for the MoodleBites for Teachers Course, leading to the Moodle Course Creator Certificate (MCCC). The course was excellent for me to really learn about some of the Moodle features (especially activities) that I’d previously never looked into. Just over a week ago I passed the MCCC exam, so I am now Moodle ‘certified’. To verify that I really did pass, then please visit the Moodle Certification site.

Mobile Internet in Ethiopia with CDMA on Ubuntu

Ethiopian Telecoms Company (ETC) started to provide a pre-paid mobile internet service several months ago, though as I (usually) have a good connection at work, I’ve never really considered purchasing a dongle and setting up an account for myself. However, my housemate Martin, with not having a computer, let alone internet connection through work, recently set himself up with CDMA.

The dongle comes with a driver/installation CD for Windows, so this morning I thought I’d have a go getting it set up on my laptop running Ubuntu 9.04. Getting it all set up proved to be much more straightforward than I had anticipated. Here’s what I needed to do:

1. Install wvdial (I have Ubuntu 9.04 Netbook remix, so if you have the normal desktop version this step may not be necessary): sudo apt-get install wvdial

2. Plug the CDMA dongle into a USB port

3. At the terminal enter: sudo wvdialconf

4. Then enter: sudo gedit /etc/wvdial.conf

5. In the text editor change the block that reads:

; Phone =
; Password =
; Username =

to be:

Phone = #777
Password = etc
Username = etc

Then save and close the editor. Note that the username and password should be in lower case.

6. At the terminal enter: sudo wvdial

7. Without closing the terminal open the browser and you should be connected.

Now that it’s working I have the opportunity to spend huge amounts of money using the internet whilst at home. I’m not sure of the exact tariff, but given our usage so far it seems to be around 0.5 birr per minute (approx 2p).

Infamy

When I got into work today many of my colleagues have been commenting about the fact that I was on Ethiopian TV yesterday – it’s from when we were interviewed at the Meskel celebrations in Adigrat a couple of weeks ago. Unfortunately, not having a TV at home, I missed it completely and it’s unlikely there’ll be a repeat – so will just have to wait for the DVD to be issued ;-)

Slightly less high profile, I was asked a few weeks ago to write an article for the Digital Planet blog site about my experiences of living and working in Ethiopia, at the end of last week my article was posted up on their site, you can have a read at: The hidden issues of IT development in Ethiopia.

Other significant developments this week include:

  • Approval of the Mekelle University Elearning Strategy. This was actually much easier than I thought it would be – the strategy is based on a JISC template, geared towards UK universities and other HEIs, but was relatively straightforward for us to adapt for use here.
  • Upgrading of university internet connection – to 10Mb. A proposal is underway to double the speed of the connection – but I’m unsure yet when this is likely to happen. With all the new computer labs being built it will be important to ensure that the internet speed is also increased. The cost of this will be huge, an extra 5Mb will cost 10,000 US dollars per month.
  • Work has now started on the network installation in the new Computer Science building – the same week that students return to lectures for the coming academic year. Unfortunately though, only 12 computers are currently working for the 100 third year students to use. I’ve suggested that one of the labs currently reserved for training is opened up for students to use. A proposal has been made to get nearly 200 new computers for the department, but is will take some time for the purchase of these to be processed and approved – likely to be several months.
  • I’ve been asked to help run a workshop for the University management to persuade then that the university should adopt and open source policy – and that . There’s already been some success in this area, more IT staff are using Ubuntu and also in the Computer Science department.

Keeping Organised

When was back in the UK I made a lot of use of RememberTheMilk (RTM), after a bit of a play around with a number of ‘to do’ applications. Now, without good internet access I’m unable to make much use of RTM. I know it’s meant to have an offline mode (using Google Gears), but I’ve never managed to have that working reliably.

Since being in Ethiopia, I was back to using a notebook and pen for keeping track of things I needed to do – which, obviously worked anywhere, anytime, but isn’t great at reminding you which things need to be done in the future.

I started having a look at the programs available in Ubuntu and found Tomboy notes (http://www.gnome.org/projects/tomboy/). There are other to do applications but none appeared to allow synchronisation (the most useful feature in my opinion) between different computers. Although Tomboy is not really a to do list application I have been able to use it as such. I have a number of notebooks, one of which is called ‘todo’ (unsurprisingly), then I add notes (tasks), the title preceded with the date the task needs to be done, in the format YYYY-MM-DD (so they keep in proper date order). This has proved to work well over the last couple of months and I’ve had no problems at all.