# Notes

## Misc coding

• knitcitations handling of html formatting in tooltip: html inside the tag must needs be escaped. knitcitations/#37

• pmc functions

hmm.. how do we easily wrap a function such that it returns its arguments (given and default) in a named list (appropriate for do.call(function_name, args_list))? match.call() inside the function will give the literal string of how the function was called, which, if evaluated in the same environment with same variables in working space, will return the same results, but doesn’t lend itself to updating any one of those arguments. Hoped to extract variable values with some combination of formals and match.arg() but no luck.

## nonparametric-bayes

• Implement the SDP calculation for the posterior distributions returned in the parametric comparison case nonparametric-bayes/allen.Rmd.
• Working out the integration over uncertainty for the parameter distribution. Brute force approach clearly doesn’t scale, even on coarse grid, to many parameters. After discussion with Marc, implementing as Monte Carlo instead. As we get samples from the posterior out of the BUGs fit in the first place, this is much more efficient. Should of tried that the first time. nonparametric-bayes/par_uncertainty_sdp.Rmd

## warning-signals

• Analytic calculation of eigenvalues for managed vs unmanaged system

## Geospatial coordinates from plain text

Discussed the problem of geolocation from plain text discriptions with Simon a few days ago. I’ve written a simple iR function to query place names against the Google Map API, but as Simon has demonstrated, this will often return the coordinates of a cafe in San Fransisco rather than the lake in Italy you meant to get. At DataCite 2011 I had met some folks who mentioned developing a machine learning algorithm for this, though stupidly it looks like I did not record this in my notes. Oh well, Google turned up the following interface: https://geoparser.digmap.eu/advanced.jsp

Click the geoparse example and scroll down in the XML; they assign probabilities of possible spatial matches. For instance, Hiroshima as the name of a “railroad station” gets 0.05 probability, whereas the majority of the weight falls on “populated place” in Japan.

It looks like you could query against the service directly, haven’t really explored.

They have a paper out on this too, https://oa.upm.es/4367/1/INVE_MEM_2008_60075.pdf