MAPLight.org

Import CSV into properly sized columns

Categories:

At MAPLight I occasionally have to convert CSV files to SQL. The Table Wizard module handles the import well, but the columns are all long text.

I made a quick module to resize the columns. It uses Table Wizard’s built-in analysis and Drupal’s Schema API to do some basic conversions. It is nowhere near complete functionality or UI-wise. Just barely good enough to get me through 12 tables with 165 columns.

I put it on GitHub since it is incomplete and I don’t have time to do more work. And I wanted to try out GitHub.

Remote Control

Categories:

I have been doing Drupal development and database work for MAPLight.org. They completed a new report, Remote Control, showing locations of contributions to U.S. House members. On average, 79% of contributions are from outside the congressperson’s district. I helped import and export the data, run queries and built out pages like legislator geography.