Over the past few weeks, I’ve been following a really great blog by Carl Vogel. This blog has an excellent (growing) collection of Python examples based on porting code and examples from R to Python. In general, it is useful for those “interested in the Python data analysis toolkit and its viability as an alternative to R”. Carl draws on examples from Machine Learning for Hackers by Drew Conway and John Miles White, as well as Gelman and Hill’s Data Analysis Using Regression and Multilevel/Hierarchical Models.
- Tue 12 February 2013 cfarmer
manageR and rpy2 installation problems
Sat 06 October 2012 cfarmerUnfortunately, 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 installingmanageR
(and the requiredrpy2
) 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 yourrpy2
andmanageR
needs. I’m also hoping that people will post potential fixes in the comments to help others with more specific problems?Research dissemination and interactive visuals
Tue 10 April 2012 cfarmerOne of my goals for this year is to spend more time and effort developing effective Visualizations for my various research projects, in an effort to make my research more accessible to others. This is one thing that I think many academics are particularly bad at: letting others know what they are up to, and why it might be something worth looking at. In order to avoid this pitfall, I plan to focus on producing interactive, web-based visuals suitable for a more general audience in addition to more traditional forms of research dissemination such as journals and conference papers. It is my hope that by doing this, I will be making my research more readily available to those who might actually be able to use it, and maybe even create some compelling Visualizations in the process. While I’m not quite ready to start creating full-blown interactive websites yet, I thought it might be a good idea to start with something small to get the ball rolling; so I put together an upgraded version of my previous map of visitors to www.carsonfarmer.com.
Because its fun to map stuff…
Fri 30 March 2012 cfarmerIts 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 ...
Adding direct editing of geometry fields in QGIS
Sat 12 March 2011 cfarmerBeing 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
, andGeometry tools \> Add/Export geometry info
.Because its Friday
Sat 06 November 2010 cfarmerMy two favorite scientific programming languages are Python and R, each for their own specific strengths. I stick with R for most of my serious stats stuff, but for everyday processing, analysis, and GUI building, Python is my modus operandi. Lately however, I’ve been doing more and more things in Python… even the stats stuff. When doing statistical analysis in Python, I usually use the excellent rpy2 library to communicate between Python and R. As a result, I have put together quite a few little code snippets to work with R commands in Python. Recently, I decided to put ...
Evolution is beautiful…
Wed 27 October 2010 cfarmerCheck out this video of the evolution of OpenSteetMap in Europe! It sure is cool to see how much ground a bunch of nerds with GPS units can cover! Link courtesy of slashgeo.org.
pgRouting, OpenStreetMap, and QGIS
Thu 14 October 2010 cfarmerI 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 withpgRouting
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.