RSSAmplifier

Blog

Diego Ripley – Hi, my name is Diego Ripley

Recent content in Hi, my name is Diego Ripley on Diego Ripley

diegoripley.caRSS feed ↗2 posts

Latest posts

What I Learned From Processing All of Statistics Canada's Tables

Over the past few weeks I have processed all of Statistics Canada’s data tables (also known as cubes and referred as product_id in the tables embedded in this post) that are available through Statistics Canada’s Web Data Service (WDS). I have always been interested in making statistical data products easily accessible to users, and after analyzing the current way of disseminating data…

Calculating Polygon Centroid with OGR

A simple recipe for calculating the centroid values for polygon features. from collections import OrderedDict import ogr def calculate_centroid ( spatial_file , unique_field ): ''' :param spatial_file: The path of the spatial file. :param unique_field: The unique id to use as a key for our dictionary. :return: Ordered dictionary of the centroid of features (longitude, latitude). ''' data_source =…