Tag Archives: software

Leaflet.js – layer order, layer address and links

Leaflet is great for mapping in epidemiology with quick results of just cut & pasting a few lines. Problems do start, however, whenever running a more advanced project. It’s a pain, as plugins overwrite functions and basic css layouts. Or layers do not allow clickable links (as propation is being prohibited). Or geojson data that are rejected for whatever reason.
A showcase project, that had been planned for 2 days, took more than 1 week as the documentation is frequently unclear, incomplete and often hard to understand without any (jsfiddle) example. Numerous Google searches helped, as well as peaking into the sourcecode, while also other stack overflow posters have been very helpful. Continue reading Leaflet.js – layer order, layer address and links

Better figures

A recent paper identifies 10 rules for better pictures. As I have also given several lectures on that topic, I was excited what the authors think…
1. Know your audience. This is trivial as you never know your audience.
2. Identify your message. True and not true at the same time. True as it makes your findings more evident – not true if you are allowing a reader to find his own message.
3. Adapt the figure to the support medium. Trivial. May be very time consuming.
4. Captions are not optional. Absolutely true, I also suppport good captions – mini stories for those who can’t read the whole text.
5. Do not trust the defaults. Trivial. No one does.
6. Use color efficiently.  Not really,  avoid colors for those of us who are colorblind and to avoid expensive page charges.
7. Do not mislead the reader. Why should I?
8.  Avoid Chartjunk. Absolutely. Most frequent problem.
9. Message trumps beauty. Sure, form follows function.
10. Get the right tool. Maybe correct while the further recommendations look like a poor man’s effort to make his first graphic at zero cost: Gimp, Imagemagick, R…

Mapfactor Navigator: Convert you POIs

I am currently switching to Mapfactor Navigator mainly to use now also offline Open Street Maps.
The main problem is to get all those old waypoints converted. Unfortunately it is confusing what developers but users are reporting on different forums. MN obviously used different tools at different times and even different directories.

Before you start, get the most recent version Continue reading Mapfactor Navigator: Convert you POIs

PLINK: Bug or feature?

I am struggling now for 4 weeks with some unusual behaviour in PLINK that gives me different results with a trait of the alternate phenotype files either by calling that trait directly

plink –file mydata –tdt –pheno pheno2.txt –mpheno 1

or from a loop over all traits

plink –file mydata –tdt –pheno pheno2.txt –all-pheno

It seems that I am working with different numbers at both occasions – click to enlarge the log Continue reading PLINK: Bug or feature?

Playing with your browser

Some blog authors are nuts about protecting their web site from copying files. There are many ways to protect your site – but only one really good (publish nothing). I often see small javascripts that disable the ability to right-click where javascript.about.com has a much simpler solution:

<body oncontextmenu=”return false;”>

Please try a right click now…
If you are fooled by a web author in such a way, what could you do? tech-recipes has the answer: Of course, we can use javascript to turn it back on.

When visiting the offending website, type the following into the URL bar of your browser:
javascript:void(document.oncontextmenu=null)

Happy browsing, yea, yea.