To whom does design address itself: to the greatest number, to the specialist of an enlightened matter, to a privileged social class? Design addresses itself to the need.

Charles Eames

Meteor Visualisation

May 12th, 2013

Today I have been creating sensible data from the fusion table CSV export. I started by throwing away all of the rows where the mass was very small, i.e. under 1kg. This leaves me with 3,807 rows from the original 34,513 which is a more manageable amount of data. Next I popped all of this into a MySQL table, which proved a bit taxing as I was working through phpMyAdmin and had to update my php.ini file to allow for a far longer max_execution_time and max_upload_size.

First thing I need to do with the data is add a true INT column for the mass field in order to calculate potential impact energy and to do numerical filtering. This column was imported from the CSV file with comma delimited thousands and is a VARCHAR(20) field. I did this by running the short script below after having created a Mass column with a type of INT(11).

UPDATE `table 2`
SET `Mass` = CAST(REPLACE(`Mass, g`, ',' ,'') AS SIGNED INTEGER)

The next big job is to create a classification column, which will require either a very big CASE statement or a lookup table. I imagine the lookup table approach will be more suitable as though I will be doing a lot of manual work I would probably end up doing this in a CASE statement anyway. So I’m back off to Excel and Fusion Tables, with the help of my glued together meteor classification chart to work out the lookups.

Categories:
Web Design|Wordpress