Django form geocode submitted address to get lat, lon and postal code

django form

One of my Django applications includes a form where user can enter and submit a property address. The user submitting the form might not know the postal code so I left it optional. However the postal code is a key piece of information for this particular application so I wanted to ensure Continue Reading →

Leaflet.js choropleth map color by count using geoJSON datasource

map1

I have a Django web application that needed an interactive map with shapes corresponding to Canadian postal code FSA areas that were different colors based on how many properties were in each FSA. It ended up looking something like the screenshot below. This exercise turned out to be relatively easy Continue Reading →

Statistics Canada Canadian potato production data using Power Query

potatoe

This data comes from Statistics Canada. Statistics Canada download pages often provide the opportunity to modify the data structure and content before it is downloaded. For example clicking on the [Add/Remove data] link provides options select different groupings of data by provinces. I choose to group data by provinces. I Continue Reading →

Canadian TCS FDI Officers Twitter List Member Analysis

tcs

The Canadian Trade Commissioner Service maintains a Twitter List named CDN TCS FDI Officers that has a bunch of Canadian Trade Commissioners as members. I used the Twitter API and Python Tweepy to retrieve data about list members including: screen_name name statuses_count (# of Tweets) followers_count friends_count favourites_count listed_count created_at (Twitter account create date) acct_age Continue Reading →

Use OneDrive API to upload files to Office 365 Sharepoint Site

sharepoint python

I have automated uploading files from my web site host’s server to my Office 365 Sharepoint site using scheduled cron jobs running Python scripts on my web host. The Python scripts use Microsoft’s Azure Active Directory Library (ADAL) to authenticate off Azure Active Directory (Azure AD or ADD), and  OneDrive API and Python Continue Reading →

OneDrive API features

Microsoft has three file storage options: OneDrive Personal OneDrive Business Sharepoint These have recently been unified into one new OneDrive API https://dev.onedrive.com and oAuth is preferred method of authentication. However there are some key differences how the API: OneDrive Personal authenticates against oAuth account created at Microsoft Application Registration Portal using a Microsoft account (Live, Microsoft.com). Continue Reading →