Einstein Analytics Applications, create/update templates

Did you create your first Einstein Analytics application? Clean and neat! I assume that you’ve already designed a data flow, ran it already to generate your application dataset. Created a dashboard with lenses in place, filters, lists, charts to visualise the dataset.




It’s already great, now you can go to Einstein Analytics, click on your application. Check the charts, read your data, understand it easier than before. Read any change at a glance, easy peasy. You answered your own questions with it but there are many people out there who are struggling with the same problems. What’s next?

Well, you can share your solution with them from A to Z. However, you first need to create a template. Here is how! 

At this step if you have no clue about what are the templates, go ahead and watch these two short videos.
Einstein Analytics Templates: Build, Customize. Sell.

Before you start, you need to make sure that all the prerequisites are set correctly. If you are not sure take a quick look at this page 🌍.




Well, after the making sure that all prerequisites are on place, go to https://workbench.developerforce.com/ and logging in to your org.

Check out the Step 1 to Create (or Update) the Template Objects then you follow the next steps according to the interests of your Einstein Analytics applications.

If you need to define rules or create a wizard for your Einstein Analytics application then it’s possible to change this by following Step 3 to Edit the JSON Files.




For example, the wizard is how you ask your future template user to decide which dimensions in a dataset to include and which to exclude, what name a new dashboard, or how to label a field in a chart. You control all this by editing the four types of JSON files discussed in this step (template-info.json, ui.json, variables.json, and any number of rules.json), which constitute the template assets.

Variance Analysis using Einstein Analytics (Wave Analytics)

In order to create more insight on sales data, Einstein Analytics can be great help. In order to bring Einstein Analytics into the game, it’s required to create relevant data flows, datasets, dashboards in other words an EA application.




The aim here is to bring a solution for better understanding the relations between profitability/loss at first sight. In order to achieve this goal, daily data collection is important, this means running the data flow everyday and get the ‘exchange rate’, ‘price of the products’, ‘partial and/or total volumes’ and naturally the ‘revenue’ and ‘date’. Basically take a snapshot of the data.

The data flow runs daily and stores the data in a table. The data table grows by addition of new rows. The data table also includes ‘snapshot date’, ‘exchange rate’, ‘price’, ‘volume’ and ‘revenue’ fields as columns. 




In order to calculate the changes shown in the figure above, you need to use the compare table. 

when you edit a lens in the dashboard,
choose ‘compare table’

You need to add measures then click on the ‘arrow down’ icon and select ‘Edit this column’ option of a measure to define formulas for the column.

add new measures and edit them

While editing the columns (measures) you can assign new aliases. For example in the use case which is defined here, one can expect two snapshots having two different revenue values and a new column to calculate the ‘change in revenue’. It’s easy to set the alias R1 for ‘snapshot #1’s revenue’ as R2 for ‘snapshot #2’s revenue’. It’s simple! Defining the ‘change in revenue’ requires a new column with a formula calculation of ‘R2-R1’.  You can also define window functions for different groups of data.

give alias, column names and define formulas when
editing the columns of the compare table




Once you have all the columns and their formulas defined, you can save the compare table and transform it into a chart. The calculations are done, dynamically and displayed as bars, slices or as gauges according to your chart choices.

Problem: I guess until this point everything was clear. The problem I was facing with was to define two date fields (as string) ‘Snapshot Date 1’ and ‘Snapshot Date 2’ and filter the data ‘Revenue’, ‘Price’ etc. on selection. 

The tricky part was having only one table (dataset). So I defined two columns for date (as string) which are calculated (computeExpression) everyday when the data flow run happens.




When you use one field ‘Snapshot Date 1’ and select a date, because of faceting, every element on the dashboard was filtered. This restricts comparison of two dates.

Overcoming such a problem requires ‘disabling faceting’ on the list selector fields and on the chart and define manual binding of the fields as filters to the steps. 

revenue comparisons for two different snapshot dates

Solution: I basically modified the compare table, disabled the faceting and bound the steps with list selectors in a custom fashion. The bottle neck was the binding filters and the steps.




To do that hit Ctrl+E (windows), Cmd+E (mac) and edit the code as below for each column you want to filter per list selector.

"filters": [
  [
      "SnapshotDate1",
      [
          "{{column(SnapshotDate1ListSelector.selection, [\"SnapshotDate1\"]).asObject()}}"
      ],
      "=="
  ]
]

In order to make the binding happen and filtering work, the real trick was using “==” operator rather than “in”.

Custom (re)ordering of legend/bar segments in Einstein Analytics

Problem:

Recently I tacked with the problem of ordering the legend/bar segments in Einstein Analytics and this is how I solved it.

Using the Einstein Analytics user interface, I could sort bar segments of a stacked column chart in asc/desc order or keep it unsorted. However, I needed to sort them in a custom fashion like in the image. 

Apparently, its possible by using custom SAQL and with final touches using the extended meta data a.k.a XMD.

Solution:

if you are familiar with Einstein Analytics, you know this one 😉




Then you need to add a similar code like the following into the SAQL code:

q = foreach q generate (case 
when 'Fruits__c' == "Berry" then "03 Berry" 
when 'Fruits__c' == "Apple" then "02 Apple" 
when 'Fruits__c' == "Orange" then "01 Orange" 
end) as 'Fruits__c';

After this step, the legend is going to show its contents with numbers in front. To fix this using the eXtended Meta Data (XMD) .json file.

Go ahead download the XMD.json file after clicking “edit” dataset. As seen in the screenshot below, click “download” to get the latest .json file.

you will see it, when you click ‘edit’ dataset

Now you need to edit the “dimensions” part like in the example code below. Define the member and label fields, if you want to override the color as well then also color too.

Next step is to replace the XMD .json file. Click the ‘replace‘ button and upload the updated file.




{"dataset":{},"dates":[],"derivedDimensions":[],"derivedMeasures":[],
    "dimensions" : [
  {  
    "field":"Fruits__c",
    "linkTemplateEnabled": false,
    "members":[  
      {  
        "color":"#EB271F",
        "label":"Orange",
        "member":"01 Orange"
      },
      {  
         "color":"#F7B92B",
         "label":"Apple",
         "member":"02 Apple"
      },
      {  
         "color":"#FD9226",
         "label":"Berry",
         "member":"03 Berry"
      }
    ],
    "recordDisplayFields": [],
    "salesforceActions": [],
    "salesforceActionsEnabled": false,
    "showInExplorer": true
  }
],"measures":[],"organizations":[],"showDetailsDefaultFields":[]}

Niceness! Now you have an ordered/coloured legend/bar segments in the stacked column chart and no more misleading/confusing numbers in front the legend elements.




Einstein Analytics Building a Data Flow

Before you start with this post, make sure that you already read “Salesforce Einstein Analytics” post.




Here we are climbing the steps of building a dataset by forming our very first dataflow. Don’t forget, it all starts with data and it’s better to have data of good quality. If you know the data that you’re working on, if you understand it well then Einstein Analytics will make your data easy peasy for you to interpret and visualize. In other words, make sure you know what to achieve with your data and have a good use case in hand, for validation and testing purposes.

Put your hands in the air, then on the keyboard & trackpad. 🙂 We are good to go.

Remember the ‘create‘ button? You should be also remembering the SampleDataset and SampleDataflow titles. Next step is to pick the Salesforce or custom objects you have in the org and the fields that you want to include in the dataflow. When you click on it, the wizard will already take you to the next step.

Now it is time to click on the object (the initial selection) and pick the fields you want to use (to be included in the dataset) also select the connections to other Salesforce standard or custom objects. You can select Fields and Relationships and each join click will make you access to another object and its fields. The wizard is a great help to get any field and object in the org.

Einstein Analytics team together made it really handy. If you already know the objects you are going to work with, simply selecting the parent (the top object) will give you an advantage. Joining a new object and selecting new fields will be simple clicks.




Go ahead! Play with the wizard, experiment, fail, break and learn how to use it with confidence and success. You can select the main node of the tree then add branches, like in this example. Once you are done with the wizard, you need to navigate and click Next.






When you are done with the selections and click next, then your dataflow will be prepared by the wizard for an easier data engineering progress. Dataflow manager will generate the simple and complex dataflow, with respect to your selections. The dataflow may look like the screenshot below, but this screenshot is not the best possible one. It may differ with every other dataflow preperation.

Now we can get our hands dirty and dive into the world of manual dataflow manipulations, changes, fixes and building brand new dataflows from scratch. I hope you already are familiar with Transformations for Analytics Dataflows, if not check the post I linked above.

To be continued…



Salesforce Einstein Analytics






Get your data in!

It all starts with the data anyway, so you need to bring it in. How? Salesforce made it handy.

Once you login to your Einstein Analytics enabled org, click on the App Launcher and select Analytics Studio. Search for the ‘Create’ button and select ‘Dataset’. Here you have two options ‘CSV File’ or ‘Salesforce’. Here is a sample dataset. If you want to use the Salesforce native or custom objects in your org, then you need to select ‘Salesforce’. At this step basically you are transforming the existing data (from .csv files or salesforce objects) into an Einstein Analytics dataset.




Data Source Selection

CSV File:
I will write about this later.

Salesforce:
If you choose Salesforce, you need to give a ‘Dataset Name’ and either create a new dataflow or choose an existing one. If this is your first trial, just name the dataset and select ‘add to new dataflow’ remind that you also need a name for the dataflow as well. I always use the same name for all, Dataset, Dataflow, Dashboard, Application, Lens but this is something you need to figure out yourself.

Now you see the list of existing Salesforce objects. What you need to do is select an object, select the fields of the object that you want to include in the dataset, then the same for the next object which is related and its fields. If you made sure that you included all the objects and fields then you are ready to move forward with dataset creation.

Before you create the dataset, you will see the dataflow manager. Here you’ll see automatically generated nodes and the relations between these nodes. These nodes are actually shows the dataflow transformations. I will explain them in the next posts in detail but go train yourself a little in advance. Transformations for Analytics Dataflows.




Do you want to learn more about Einstein Analytics, first you need a Free Einstein Analytics enabled Developer org. You can get one from here.

Kripto Para – Bitcoin, Ethereum, Litecoin ve diğerleri





Son iki senedir, üzerinde sıkça konuşulan yatırım araçlarından biri Bitcoin, eminim sizde haber sitelerinde, arkadaş ortamlarında ya da finans bültenlerinde bu terimi çokça duymuşsunuzdur. Kripto paralar arasında en ünlü para birimi olan Bitcoin, Wikipedia’da “Bitcoin (sembolü: ฿, kısaltma: BTC) herhangi bir merkez bankası, resmi kuruluş, vs. ile ilişiği olmayan elektronik bir para birimidir.” olarak tanımlanıyor. Kripto paraları içeren bu ağ, 2009 yılında Satoshi Nakamoto (kim olduğu bilinmeyen gizemli kişilik) tarafından ortaya atılan konsept ile kurulmuştur, asıl amacı para transferlerinde ödenen yüksek miktarlardaki komisyonlardan kurtulmaktır. Maksimum Bitcoin sayısı 21 milyonla sınırlıdır.

1 Bitcoin’in 2012 yılındaki fiyatı 10-50 dolar arasındayken, 29 Kasım 2017 tarihinde bu para birimi 11000 dolar civarında işlem görmüştür.

Avrupa’da yaşıyorum nereden güvenli bir şekilde Bitcoin, Ethereum ya da Litecoin satın alabilirim? Cevap basit bitcoin.de. Hesabınızı açın, güle güle kullanın!




ya da Coinbase üzerinden hesap açıp, bu dijital para birimlerine yatırım yapabilirsiniz. Coinbase daha yaygın kullanılan bir site ancak komisyon alıyorlar.

Güncelleme:
Bitcoin ya da herhangi bir kripto para birimi saklama yollarından biride kağıt cüzdan kullanmaktır. Peki nedir bu kağıt cüzdan, 10 kısa adımda anlatalım?




Kripto Para Birimleri için Kağıt Cüzdan Nasıl Oluşturulur?

1. Bitcoin için BitAddress.org üzerinden bitcoin adresinizi oluşturun (Litecoin için liteaddress.org).
2. Bitaddress.org sizden rastgele bir rakam oluşturmanızı isteyecek, bunu klavyeniz tuşlarına dokunarak ya da farenizi rastgele sağa sola aşağı yukarı oynatarak oluşturabilirsiniz.
3. Size bir public ve private anahtarlar ve bunlara ait QR kodlar (bir tarz barkod) sunulacaktır. Yalnız dikkat edin, bu QR kodları tarayıcınız ile okutmayın.
4. ‘Paper wallet’ sekmesine tıklayın.
5. Üretmek isteğiniz adreslerin sayısını girin.
6. Eğer bitcoin resimlerini istemesseniz ‘Hide art?’ tuşuna tıklayabilirsiniz.
7. Yeni cüzdanlar üretmek için ‘Generate’ tuşuna tıklayın.
8. Cüzdanlar üretildikten sonra ‘Print’ tuşuna tıklayarak, cüzdanları yazınızdan kağıt üzerine bastırın.
9. İsterseniz PDF dokümanı şeklinde de güvenli bir ortama kaydedebilirsiniz.
10. Public adresleri not alın ya da bitcoin (litecoin) uygulamalarınızı kullanarak QR kodları okutun.




Daha fazla bilgi için Coindesk‘i ziyaret edebilirsiniz.

Graphics Design: Logo

Collact.me was planned to be a complimentary social media monitoring application. Here is the logo for it.



Collact.me was planned to be a complimentary social media monitoring application. Here is the logo for it.

Graphics Design: Logo

One of my colleagues in the university asked me to design a logo representing a pipeline for the ancient genome projects. So I did, here is the logo.




Graphics Design: Logo





In 2015, I designed the logo of the ‘Quantitative Biology Center’ in Tübingen. It was a in-house design contest with more than five logo designs. I won the design.
Small compact version:

Large extended version: