Data Analysis

Example of local business schema

Posted on

<div itemscope itemtype=”http://schema.org/LocalBusiness” align=”right”> <span itemprop=”name”>Wellbeing Institute</span><br /> <span itemprop=”address” itemscope itemtype=”http://schema.org/PostalAddress”> <span itemprop=”streetAddress”>3615 N Prince Village Pl Ste 121</span><br /> <span itemprop=”addressLocality”>Tucson</span> <span itemprop=”addressRegion”>AZ</span> <span itemprop=”postalCode”>85719-2034</span><br /> <span itemprop=”telephone”>Phone: (520) 225-0584</span><br /> <span itemprop=”faxNumber”>FAX: (520) 232-2512</span><br /> </span> <div itemprop=”image” itemscope itemtype=”http://schema.org/ImageObject”> <img src=”https://wellbeingaz.org/wp-content/uploads/2017/12/wbi-logo-initial-close-cropped-transparent.png” alt=”Wellbeing Institute” width=”50″ itemprop=”url”> </div> </div>   ### P.S.  Google […]

Data Analysis

State data within a Python Class definition

Posted on

From my procedural language days, state data was easier for me to understand than in some OOP languages. It took me a while, for instance, but I finally got the syntax correct below for creating a local state variable within a Python class here: [the solution was to create the var “self.count” with the _init_ method below… […]

Data Analysis

Combinatorics problem

Posted on

You are given a ten piece box of chocolate truffles. You know based on the label that six of the pieces have an orange cream filling and four of the pieces have a coconut filling. If you were to eat four pieces in a row, what is the probability that the first two pieces you eat have an orange […]

Data Analysis

Debugging Javascript – one useful tool

Posted on

Here’s an idea for displaying those pesky ephemeral variables that come and go like ghosts in JavaScript. Check this out. I want to know if I’m reading in a CSV file properly or not. You can use for any variable / array / object. <script> // Read in a .csv file d3.csv(“../datafile.csv”, function(someData) { debugMe(someData); }); function debugMe(whateverData) […]

Data Analysis

Python Immutable strings, integers, booleans

Posted on

In Python, STRINGS, INTS, BOOLs etc. are IMMUTABLE… meaning, for example, that you cannot convert a df column that is a string to a column that is int.  However,  you can ASSIGN the values (objects) to another variable or create a new instance of that column in another dataframe   … or use .astype(int) to perform […]