Archive for June, 2011

June 24, 2011

Exploring other ways to create map visualizations

Here’s an intersting google map with zipcode and county boundaries added: Maps.Huge.Info Mapping Programs


Read Full Post »

June 21, 2011

Calculating Quantiles

Quantiles are buckets of data, a way of organizing data into a fixed number of bins.  It is good for ranking data, and especially useful when visualizing.  You probably are familiar with a few quantiles already and didn’t realize it.  You’ve heard of the median, right?  Well, the median is a 2-quantile.  Meaning two buckests of data, the top and the bottom.  Another one you know well is the 100-quantiles, commonly know as percentiles.  The good old  %.

I couldn’t find a simple way to calulate these in Excel, so I’m using the javascript library Protovis to do it, client side.

Polymaps is hard

I found working with Polymaps nearly impossble.  The documentation has completely empty pages and doesn’t explain some crucial magic that is going on.  In particular, I couldn’t divine the method being used to serve up tile boundaries via a restful url.  I can see where the variables for the tile positions are in the url, but the rest is obfuscated.  So, I couldn’t figure out how to create my own service for custom polygons, which makes it less useful.  Essentially good for copy pasting the examples, and substituting your own data but nothing more complicated than that.


Read Full Post »

June 9th, 2011

ST_Distance gotcha’s

ST_Distance_Sphere calculates only for WSG 80

ST_Distance_Spheroid allows you to define the sphere to calculate the distance over.

Spatial Reference System Identifier (SRID) 4326 aka WSG84 is specificed by

'SPHEROID["WGS 84",6378137,298.257223563]'

Read Full Post »

June 7, 2011

Geospatial Queries with MS Sql 2008

Amazingly you can do geo-spacial queries with MS Sql 2008.  I had been using PostgreSQL, but I have a ton of data and it is taking me a lot of time.  Here are the important bits:

This converts the text “Point (<longitute> <latitude>)” to the geography sql data type:

geography::STGeomFromText(‘POINT(<longitute> <latitude>)’, 4326);

This returns the distance between two geography points in meters:


Helpful links:

How to form a date_time from the individual units

	CONVERT(VARCHAR(5),year)+' '+

Read Full Post »

June 6, 2011

MS SQL Incorrect syntax near ‘)’ problem

Had a weird issues with sql statement, giving me the error:

Incorrect syntax near ‘)’.

It gave the line number of the last ) in the statement, but after nashing my teeth for a while I discovered it was actually a missing ) thousands of lines further up in the statement.  Ugggg… vague error messages always ended up costing time.  Remember to help your users when writing error messages.

PostGIS notes

Is a point inside a box, where lat, long column is called geospatial_point?

            ST_Point(-93.3857,42.3029),ST_Point(-93.1915, 42.2275)),

Read Full Post »

Art Requires Influence – Part 1 and Part 2

The Peekskill Meteor of 1992 – – This would make a very exciting, and mysterious way to start a game.  It implies a lot of interesting questions, like What is that?  What does it mean?  Is it safe?  What will change?

Torque 3D 1.1 Released –

Show Me The Games Bundle – Includes Gratuitous Space Battles, Castle Vox, Evochron:Mercenary, Fate of The World and Smugglers IV

Garry of Garry’s Mod expirments with causal iPhone game, nice break down of revenue and graphs comparing paid and ad business models. –

Do not laugh at this:

Read Full Post »

June 3, 2011

Updating 32-bit app to x64

I’m trying to compile an old project in x64 for the first time and ran into some issues.  The build is spitting a couple warnings and an error:

  • Warning 1 Assembly generation — Referenced assembly ‘mscorlib.dll’ targets a different processor
  • Error 3 File “<filename>.dll” is not a valid assembly.
Dealing with the Warning: Assembly generation

The warning is ignorable.  Basically, 64-bit (aka x64) programs can reference and run old 32-bit (aka x86) dependencies.  (even more at stackOverflow) If you are one of those people who likes an nice clean and empty Error List then add the warning number 1607  to the Suppress warnings section of the projects settings on the Build page.

Dealing with the Error: Not a Valid Assembly

The error is a little more tricky.  In short, you need to un-check the Register for COM interop on the project’s build settings.  Of course, then things might not work because the assemble isn’t registered!  You can add a custom Post-Build step to register with the x64 GAC.  But, that might not be convenient because on Windows 7 you need Adminstrative privileges to register.

32-bit App Can Not Run x64 Add-Ins

After all that, it turns out that the add-in for Outlook isn’t useful, because the 32-bit version of Outlook is running and, naturally, can’t see (use) 64-bit Add-Ins.

Read Full Post »

Older Posts »