Posts

Showing posts from March, 2021

Local Authority Shape Map in Power BI

Image
 This post can now be found here Thought it was about time to get in shape This is a bit of a tangent but wanted to share useful links as this is something that I have pulled together with multiple sources and not something that I could find a joined view of. So maps are tricky. Getting your data in the right format, right place and most difficult correct shape is really difficult. One approach is to focus only on getting your data in the right place by using latitude and longitude to plot data in the correct places but shape maps are definitely the best way to present data about geographies such as Countries, Regions, Local Authorities, Postcode Areas etc. Out of the box there are a few shape maps like US states, UK countries but for my purposes I need shape maps for Local Authorities, Postcode Areas, Regions and other geographic distributions inside the UK. Custom maps can be loaded and as this article says:  "You can use custom maps with Shape Map as long as they are in th...

VADER and Power BI

Image
 This post can now be found here "Search your feelings. you know it to be true" Valence Aware Dictionary and sEntiment Reasoner ( VADER ) is the main alternative to TextBlob and is designed to work with social media text primarily. Again this has been a really simple adaptation of the code used so far in all of the text analytics tools we have applied . The outputs of VADER are a little different to TextBlob and does not include scoring for subjectivity but does break down into 4 aspects the Compound Score which is the key sentiment scale but also individual scores for pos: positive, neu: neural and neg:negative that are ratios of the proportion of the text analysed so you can drill into a bit more context. TextBlob in Power BI import pandas as pd from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer analyser = SentimentIntensityAnalyzer() data = [] for idx, row in dataset.iterrows(): if not isinstance(row['text'], str): continue s...

TextBlob and Power BI

Image
 This post can now be found here TextBlob makes me polarity:1  Expanding text capabilities with Sentiment in Power BI is one of the key things I have always wanted to be able to do. The code for this is pretty much the same as covered in previously and as with all of the tools I have covered so far this is the most basic application of each tool - there is a lot more that can  be done with further customisation based on the types of data you are working with. TextBlob is a Natural Language Processing tool (NLP) to identify the sentiment (polarity) of a text string on a scale of -1 (negative) to 1 (positive). As well as sentiment you can export a subjectivity score on a scale of 0 (objective) to 1 (subjective) which can be a really useful way of exploring your and the correlation between sentiment and subjectivity. TextBlob in Power BI import pandas as pd import textblob from textblob import TextBlob data = [] #create a for loop of the rows in the df dataframe for id...