The Datamind

|

The personal website of Wil Black

Archive for the ‘Data’ Category

Shpinxsearch with postgreSQL and Django (Ubuntu 10.04 Server)

Saturday, May 5th, 2012

I am using sphinxsearch to index a database that is hooked up to a Django project. The database is a postgreSQL database. After going through my initial shinxsearch configuration, I ran

sudo indexer --all

This did not work. I kept getting an authentication error.
(more…)

South Database Migration Workflow

Friday, January 27th, 2012

My workflow for Django and South. I always forget how to do this. See http://south.aeracode.org/docs/tutorial/part1.html#converting-existing-apps for more info.
(more…)

Matplotlib and Plotting Matrices

Tuesday, December 13th, 2011

For one of the projects I am working I needed a web application to produce dynamically generated geo-spatial overlays on Google Maps. From my graduate school days using Matlab I knew how to produce the geo-spatial figures. So I set about doing this in Matplotlib on a Ubuntu 10.04 server with a Linux, MySQL, Apache, Python/Django stack. The generated images are then displayed on a Google Maps as a GroundOverlay.
(more…)

ERDDAP Oceanographic Data and Google Maps

Sunday, August 7th, 2011

I spent the better part of the this weekend exploring the ERDDAP Oceanographic dataset API. It can be found here.

SST of the northeast Pacific

I created a few demos to play with here

Simple Demo

Complex Demo with Animation
(more…)

Installing PostGIS on Ubuntu 10.04 Server

Saturday, May 21st, 2011

Update Jan 19, 2012

I have an existing django app I have been working on. I want to now move from the sqlite dev database I have been using to a postGIS data. I am on the same machine as I used to preform the steps below so the libraries should already be installed. Also I do not need to rerun the template script.
I first create a database for my app named dev_bb

createdb -T template_postgis dev_bb

Then I source my vertualenv and try to syncdb and get the following error.

File "/home/wilblack/virtualenvs/bb_env/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in 
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named psycopg2

It looks like python cannot see psycopg2 because it is installed outside the virtualenv. Pip to the rescue. A simple

pip install psycopg2

and I’m back in business.

 


I just got done installing PostGIS 8.4 on my Ubuntu 10.04 Server. apt-get makes this process very simple.
(more…)

Switch to our mobile site