1. A quick bookmarklet for off-campus library access

    Tue 17 December 2013
    cfarmer

    I have been doing a fair bit of research off-campus lately, and as usual, have been having trouble accessing research materials (mainly academic publications) from home. Fortunately, Hunter College provides off-campus access to all electronic resources available to Hunter students, faculty and staff via their Library proxy server. Unfortunately, it turns out to be a huge pain to use anything other than the library search facilities (like Google Scholar) through the proxy server*. In fact, when working off-campus, you actually have to preface each URL address to licensed resources with http://proxy.wexler.hunter.cuny.edu/login?url= in order ...

    read more

    comments

  2. Essential Python Geospatial Libraries

    Fri 12 July 2013
    cfarmer

    Just so I don’t forget, here is a list of really awesome Python libraries that I’m using these days to do lots of fun things with spatial data [UPDATE: I’ve added a few more]:

    • pandas - For data handling and munging
    • shapely - For geometry handling
    • cartopy - For plotting spatial data
    • rtree - For efficiently querying spatial data
    • nodebox-opengl - For playing around with animations
    • statsmodels - For models and stats in Python (otherwise I’d use R)
    • numpy - For pretty much anything that involves arrays
    • geopy - For geolocating and things like that
    • ipython - For a wondering interactive environment in which to play
    • freetype-py - For converting font glyphs to polygons (odd I know…)
    • ogr/gdal - For reading, writing, and transforming geospatial data formats
    • pyqgis - For anything and everything GIS
    • fiona - For making it easy to read/write geospatial data formats
    • matplotlib - For all my plotting needs
    • networkx - For working with networks (duh!)
    • pelican - For blogging about all this stuff…
    • pysal - For all your spatial econometrics needs (and more)
    • descartes - For plotting geometries in matplotlib

    Based on Twitter and some of the comments below, I should also add:

    • geographiclib - For solving geodesic problems
    • pyshp - For reading and writing shapefiles (in pure Python)
    • pyproj - For conversions between projections

    Any others I’ve missed?

    read more

    comments

  3. manageR and rpy2 installation problems

    Sat 06 October 2012
    cfarmer

    Unfortunately, I haven’t had much time recently to update or work on manageR, but I’m hoping that will change in the next few months… Having said that, there are quite a few people out there that have been having trouble installing manageR (and the required rpy2) on their system to get things working at all! I have had some individuals provide possible fixes and suggestions on how to get things working properly on various platforms, and I’m going to use this post to amalgamate them, and hopefully create a one stop post for all your rpy2 and manageR needs. I’m also hoping that people will post potential fixes in the comments to help others with more specific problems?

    read more

    comments

  4. Cross-browser iframe scaling

    Mon 06 August 2012
    cfarmer

    This is just a quick post to document an annoyance (and solution) that I’ve recently discovered when trying to scale a webpage embedded in another page using an iframe. When trying to come up with a nice way to embed this page inside this page, I found that webkit based browsers were not behaving as they should. After a lot of fiddling about, I discovered that the following css seems to fix the issues:

    #wrap {  
        width: 630px;
        height: 300px;
        padding: 0;
        overflow: hidden;
    }
    #frame {  
        -ms-zoom: 0.5;
        -ms-transform-origin: 0 0;
        -moz-transform: scale(0.5);
        -moz ...

    read more

    comments

  5. Because its fun to map stuff…

    Fri 30 March 2012
    cfarmer

    Its been quite a while since my last post, and its Friday and I was feeling creative, so I decided to map something! I’ve been looking for an excuse to produce a nice graphic like the one Anita Graser created to represent Vienna’s green-spaces. She used Quantum GIS to produce a hexagonal grid for representing the density of Viennese trees instead of the standard heat map or kernel density map, and the results are quite nice! I’m a huge fan of QGIS, but I tend to do most of my work in R, so I decided to ...

    read more

    comments

  6. Adding direct editing of geometry fields in QGIS

    Sat 12 March 2011
    cfarmer

    Being able to add/remove attributes isn’t actually a very new feature for QGIS at this point. However, to date non of the fTools functions (Vector menu) have taken advantage of this capability. If a tool needed to create a new field in the input vector layer, it simply wrote a new version of the vector layer to disk with the additional fields added. There have been several requests to allow some tools to add/update attributes directly on the input layers, so I went ahead and created a script to test this functionality out. I’ve provided a copy here for anyone who would like to test it out before I add it to QGIS permanently. Basically, the script will replace/update three of the Vector menu tools, including Analysis \> Sum line lengths, Analysis \> Points in polygon, and Geometry tools \> Add/Export geometry info.

    read more

    comments

  7. pgRouting, OpenStreetMap, and QGIS

    Thu 14 October 2010
    cfarmer

    I mentioned a few posts back that there was a great resource for downloading OpenStreetMap data, and that it was relatively easy to import osm data into PostgreSQL/PostGIS for use with pgRouting to calculate shortest paths and various other network-based operations. In this post, I’ll outline the steps required to get all this up and going, and provide a quick example to show how this can be combined with QGIS to visualise the computed shortest path directly.

    read more

    comments

  8. OSM data by country

    Thu 13 May 2010
    cfarmer

    For part of a traffic simulation project I am currently working on we need country-wide road network data for Ireland. In the past, getting decent road network data for an area this large was quite a task (not to mention expensive and time consuming), however, with OpenStreetMap we have access to this type of data instantly, and for free! In order to download full country coverage all at once, all I had to do was turn to this extremely useful site, which provides links for daily excerpts of OpenStreetMap data for any country in Europe plus several non-country regions such ...

    read more

    comments

1 / 3

twitter

recent visitors