atoti

Turbocharge your notebook

atoti
Understanding Logs in Atoti
From the default log to how to configure additional logging Application logs are extremely important in any system! Most commonly, they are used to troubleshoot any issue that users may encounter while using an application. For instance, developers use them for debugging and the production support crew uses them to investigate outages. Not just that, in production, they are used to monitor an application’s performance and health. For instance, monitoring tools can pick up certain keywords to identify events such as “server down” or “system out of memory”. It can also serve as an audit trail to track user activity...
Atoti: Working with dates in Python
What is the most problematic data type you have ever dealt with when working with data? I would say dates! Depending on the locale, dates come in different formats such as YYYY-mm-dd, d/m/YYYY, d-mmm-yy etc. Not to mention, sometimes it comes with timestamps and time zones! We can let programs infer the date format or explicitly cast the data to date with a specific format e.g. in Python with Pandas DataFrame: What if we open the CSV file in Microsoft Excel, update it, and try to read it again? The above code snippet will throw out exceptions such as this:...
atoti: Guide to implementing lookup in a multidimensional cube
A simple example of converting your analytics into any referenced currency Today we are going to look at an exciting new function in atoti v0.7.1 called lookup! What’s a lookup? We look up words we don’t know in a dictionary, and we look up news on the internet, etc. So, what do we look up in a multidimensional cube? Answer: data in a reference table! Imagine you have the exchange rates from 1 USD to some other currencies. How would you design your cube to be able to convert your pricing to any of these currencies? Continue reading to understand...
Different authentication mechanisms to secure your atoti session
Leverage your existing authentication provider with Atoti+ This article is part of a series that explains how we can implement secured and managed access in atoti through the Atoti+ plugin. In this article, we introduce various supported authentication mechanisms in atoti such as:  Basic authentication Lightweight Directory Access Protocol (LDAP) OpenID Connect (OIDC) atoti also supports Kerberos even though we are not covering it in this article.  Basic authentication Let’s start with the most straightforward type of implementation that we can have – basic authentication. All it takes is to: Instantiate session to use basic authentication Create atoti user Assign...
Guide to Auth0 setup for Security implementation with Atoti+
Add user roles to the ID token with custom action I have always presented different use cases for the atoti Community Edition. After experiencing and being satisfied with the Python BI analytics platform, some users ask for authentication and access management. This can easily be accomplished with the use of Atoti+ plugin. This article is part of a series that explains how we can implement secured and managed access with Atoti+. It is mainly intended for projects that have decided on using Auth0 as their authentication providers. Check out the corresponding YouTube video. Type of authentication mechanisms Talking about authentication...
Weighted averages with atoti
Sometimes, the ‘standard’ average doesn’t take into account the scale or importance between the things being averaged. Enter weighted averages. Consider the following situations: a vendor sets the price for their wares as 10.00USD per unit for 9 or fewer units, 9.50USD per unit for 10-99 units, and 8 USD per unit for 100+ units a course rubric states quizzes and homework each count for 10%, each exam 20%, and the final 40% of a student’s final grade. a research student needs 10ml of 70% acetone solution, but only has 90% and 60% acetone. All of the above examples are...
Currency conversion with atoti
Currency conversion is important. In an ever increasingly globalized world, businesses are more likely to record transactions in multiple currencies: a freelancer may charge according to the local currency of their latest project; a sales firm might send a team to potential clients in another country, and have to reimburse charges accrued in another currency. Having a multi currency business adds a complication to fact finding and analysis. Even ignoring changing exchange rates based on transaction date, knowing the income or outflow of money is no longer as simple as adding up the charges. An amount column may not necessarily...
How to: Percentage of Parent in atoti
In the post “How to explain non-additive measures” we talked about how data scientists can use “parent” and “child” data relationships in atoti to analyze data and implement on-the-fly allocation rules. Today let’s make use of these atoti functions to define the percentage of parent calculation.  Percentage of Parent I’m building upon the example with a multi-level hierarchy from my previous post – an e-commerce product catalogue and the associated sales history. The same technique can be applied to a hierarchy with just 1 level – to display a percentage of grand total. We use atoti.parent_value to access the subtotal...
Building Rollup Hierarchies in Python with Treelib and atoti
A product catalogue example In this atoti tutorial, I will walk you through how you can create a hierarchy – aka parent child data structure – to interactively aggregate and drill down using python libraries Treelib and atoti.  The example I’ll be using is an e-commerce product catalog, and the same technique can be applied to create natural hierarchies with many levels: for example, legal entities structure, regional hierarchies and so on.  Users will be able to then drag and drop the hierarchy in atoti to interactively re-compute metrics, in my example, “unique sessions count” is displayed next to the...
Happy Data Scientist: How to Build a Business Intelligence App with 10 Lines of Python Code
In this post, I’d like to show how to quickly build a Tableau-like BI application on top of your data in a Jupyter Notebook using the atoti python module. It can give your users an easy way to: explore the data produced by your model with an interactive UI,  play around and see it in various projections without the need to write any code or depending on someone to ingest it into a standalone BI solution.  In the study “2020 State of Data Science – moving from hype towards maturity”, Anaconda discovered that “Fewer than half (48%) of respondents feel...
Implementing real-time sources with atoti
Watching for file updates, appending the stores and listening to Apache Kafka UPDATE: The GIFs and code snippets in this article are based on versions prior to atoti 0.7.0. They may have evolved or become obsolete. Check out the atoti documentation for the latest features. With atoti, it’s possible to plug onto “live” data feeds and continuously update the notebook and the visualizations. The atoti real-time capabilities consist of: Continuous queries feature: When new data is streamed into atoti – such as a new record in the cube itself or a contextual update like a stock price tick –  the backend precisely...
Two easy ways to perform simulations in atoti
One of the key strengths of atoti is that it was built to natively propose effortless ways to perform simulations on your data. In this article, we will detail two ways of building simulations in atoti. #1 Data Simulations This type of simulation is particularly powerful in data models where multiple tables are joined together. It simply consists in creating a new scenario where the content of a data table (or part of it) has been replaced by new data. This is done with a one-liner in atoti: And that is it. A new scenario has been created in which...
Dynamic pivot tables in notebooks: atoti
Drill down to where it matters Edit: Note that this article is based on atoti version 0.4.3 and some features may no longer be relevant. Check out the atoti documentation for the latest features. If you are reading this article because of the title, you probably already know what a pivot table is. Otherwise, a pivot table presents summarized data in a table format that allows you to perform your analysis with minimal effort. Without further ado, let’s set some assumptions and see the content that will be covered in this article. Feel free to skip to the section you...
Getting Started with atoti
atoti is a Python library for performing data aggregation and creating data-viz widgets such as pivot tables and charts in a Jupyter notebook. It comes with a business intelligence web application, enabling fuss-free dashboard creation and sharing. Note: This article has been tested against atoti 0.5.2. Installation atoti can be installed with pip/Poetry or conda. Let’s keep it simple with pip: It is optional to install graphviz, however, it is recommended for this article as we will be displaying the schema of the cube. Once this is done, you can start JupyterLab: Building and exploring a data model For this guide, we’ll work on...