Сообщения

Сообщения за май, 2023

Power BI Infographic Designer

Изображение
Step-by-step instruction for using custom Infographics visual: Before start using this visuals, you should add it by import from the file or get it from the Power BI visuals store. The Infographic Designer initially displays a bar chart based on item quantity and item category. To configure the visual, click on the pencil icon, which represents the edit mode. You can zoom in or use focus mode for easier configuration. Start by choosing the shapes for the visual. Since it belongs to a garment shop, select a garment-related shape, such as a shirt. As soon as you choose an image, you will see a different image for each category. Walk through the properties to understand their functions. You can change the image by selecting a different one from the available options. The "fill percentage" property allows you to indicate the level of filling based on item quantity. It gives the impression of relative values. Choose the background and fill directions for the visual. For exampl...

Today's activity report #17

Изображение
Today I re-cleaned the primary data for the second round of the survey. Reduced the number of pseudo-unique names and patronymics. Converted respondents' dates of birth from text to date and verified their correctness. Found about 80 errors (for example, people born in 2023 and 2064). In the part of names, when entering, the Latin letter 'i' was used instead of the Ukrainian one. In addition, I found 9 cases of missing names or patronymics (surname or first name written twice) Time spent: 4h

Today's activity report #16 (intermediate)

Изображение
There was too much shelling today, so I just had time to sum up the month's activities and write a report for the program director. Time spend: 1h

Best free speech-to-text AI with YouTube videos processing support

Изображение
Here he is: Whisper Jax AI Whisper JAX is an optimised implementation of the Whisper model by OpenAI. It runs on JAX with a TPU v4-8 in the backend. Key features and advantages include: Fast performance: Over 70x faster than PyTorch on an A100 GPU Accurate transcription: Provides accurate transcription of audio files Progress bar: Displays progress of transcription through a progress bar Create your own inference endpoint: To skip the queue, users can create their own inference endpoint using the Whisper JAX repository. Use cases for Whisper JAX include: Transcribing audio files quickly and accurately Improving the efficiency of transcription services Streamlining the transcription process for businesses and individuals. Whisper Jax GitHub introduction with python Whisper JAX vs PyTorch  

Useful map tools

Изображение
Geojson.io is a user-friendly and intuitive web-based platform that allows you to effortlessly create, edit, and visualize GeoJSON files. With its simple interface, you can easily draw, import, and modify spatial features, customize their properties, and preview your maps in real-time. Geojson.io empowers you to collaborate with others by sharing and exporting your maps, making it an indispensable resource for anyone working with geospatial information. Mapshaper.org is a user-friendly web application that simplifies and manipulates geographic data. It provides powerful tools to import, edit, and export map files in various formats. With its intuitive interface, you can easily simplify geometries, adjust attribute data, and perform other data operations. Additionally, Mapshaper.org offers a Command Line Interface (CLI) feature, allowing you to work with very large files efficiently. Turf.js is a powerful and lightweight JavaScript library for geospatial analysis. It provides a w...

Power BI: using a TreeMap instead slicer

Изображение
Step 1: Insert a Treemap Open Power BI Desktop and go to the Report view. From the Visualizations pane, select the Treemap visualization type and insert it onto the canvas. Position the Treemap visualization above the chart. Step 2: Add Fields for Slicing In the Fields pane, locate the desired field for slicing, such as "Product Category." Drag and drop the "Product Category" field onto the Treemap visualization to slice the data by this field. Step 3: Add Values to the Treemap Since the Treemap requires a value field, drag and drop a numerical field, like "Total Sales," onto the "Values" area of the Treemap visualization. To ensure uniform square sizes in the Treemap, create a measure that returns a constant value. Rename the measure to "Slicer Size" and set its value to 1. Drag and drop the "Slicer Size" measure onto the "Values" area of the Treemap visualization. Step 4: Resize the Treemap Slicer Adjust the siz...

Today's activity report #15

Изображение
Got new humanitarian items distribution datasets from the MEL officer as the source to improve my  survey data wide-table VBA reading tool utility. Performed primary files profiling and set next change target. Added automated search for already received items by a beneficiary and calculated scoring for the beneficiary at the humanitarian goods distribution. Time spent: 4h 
Изображение

Microsoft Excel multiple Dependent Drop-Down Lists

Изображение
To create multiple dependent drop-down lists in Excel, we can use the data validation feature along with named ranges. Step 1: Set up your data Organize your data in a worksheet. Each column should represent a category, and the subsequent columns should contain the options for each category. For example, let's say we have a list of countries in column A, and in column B, you have a list of cities corresponding to each country. Step 2: Define named ranges Select the range containing your countries (excluding the header) and click on the Name Box (the box beside the formula bar). Enter a name for the range, e.g., "Countries", and press Enter. Repeat this process for the cities range, naming it "Cities". Step 3: Create the first drop-down list Select the cell where you want the first drop-down list to appear. Go to the "Data" tab in the Excel ribbon and click on "Data Validation". In the "Data Validation" dialog box, choose "L...

Microsoft Excel searchable drop down list without VBA

Изображение
https://www.youtube.com/watch?v=INFoqDqkhLk The classic drop-down list in an Excel sheet cell, made through Data - Validation, is a simple and convenient thing that many users use every day. However, this list has one very serious drawback - it does not have a quick search by the first characters, i.e. filtering (selecting) only those values ​​where the input fragment is included as a substring. This seriously impairs usability even if there are only a couple of dozen positions in the list, and with several hundred it kills usability completely. Let's look at how to implement such a trick. As a guinea pig, let's take the list of the 250 best films according to IMDb. The end goal is to create a drop-down list (cell G3) where you can quickly find the movies you want by entering just the genre, year, or part of the title, such as "gump". Determine who we need First we need to understand which of the source cells to show in the list, i.e. determine whether the text en...

Transliteration from UA to EN with python

Изображение
Transliteration UA to EN are based on Resolution of the Cabinet of Ministers of Ukraine #55 (01.27.2010) Python code ukr_eng_chars = { 'зг': 'zgh', 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'h', 'ґ': 'g', 'д': 'd', 'е': 'e', 'ж': 'zh', 'з': 'z', 'и': 'y', 'і': 'i', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', 'ф': 'f', 'х': 'kh', 'ц': 'ts', 'ч': 'ch', 'ш': 'sh', 'щ': 'shch', ...

VBA dynamic UserForm conrols: how to find out is worksheet exists

Изображение
To check if a worksheet exists in Excel using VBA and create it if it doesn't, you can use the following code: VBA Sub CheckAndCreateWorksheet() Dim ws As Worksheet Dim wsName As String wsName = "Sheet2" On Error Resume Next Set ws = Worksheets(wsName) On Error GoTo 0 If ws Is Nothing Then Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = wsName MsgBox "Worksheet '" & wsName & "' created." Else MsgBox "Worksheet '" & wsName & "' already exists." End If End Sub In this example, we're checking if a worksheet named "Sheet2" exists. You can change the wsName variable to the name of the worksheet you want to check. If the worksheet doesn't exist, it will be created using Worksheets.Add method, and if it already exists, a message box will be displayed indicating that it already exists.

VBA dynamic UserForm conrols: how to add a number of pairs of label and textbox controls based on sheet columns count

Изображение
To dynamically add a given number of pairs of label and textbox controls to a form in Excel using VBA, you can follow the steps below: Open the VBA editor in Excel by pressing Alt+F11. Insert a UserForm by clicking on "Insert" -> "UserForm." Design your UserForm by adding a label and textbox controls.  Place them in the desired location on the form. In the code module for the UserForm, declare the necessary variables VBA Dim labelArray() As Object Dim textBoxArray() As Object Dim numRows As Integer Add a procedure to dynamically create the label and textbox pairs based on the given number of rows. VBA Sub AddLabelTextBoxPairs(numPairs As Integer) Dim i As Integer Dim topPos As Integer Dim leftPos As Integer numRows = numPairs ' Clear existing controls, if any ClearControls ' Initialize arrays ReDim labelArray(1 To numRows) ReDim textBoxArray(1 To numRows) ' Set initial position...

Today's activity report #14

Изображение
Today I finished making changes to the partner's activity planning form. It is automated, with verification of the correctness of almost all fields and automatic substitution of some values ​​(if this is the only option). Also, changed the warning about the need to allow the execution of macros. At a meeting with a senior MEL officer, we discussed which project indicators we can already calculate. Summarized this information in a separate table with the possibility of automatic updating from an external file. Time spent: 8h

Microsoft Excel: using INDEX and MATCH instead VLOOKUP

Изображение
Using INDEX and MATCH instead of VLOOKUP in Excel offers several advantages: Flexibility in column selection: Unlike VLOOKUP, which only retrieves data from the column to the right of the lookup column, INDEX and MATCH allow you to fetch data from any column in the table. This flexibility is particularly useful when the desired data is not adjacent to the lookup column. Improved performance: In larger datasets, INDEX and MATCH tend to perform better than VLOOKUP. VLOOKUP scans columns sequentially, which can result in slower processing times. In contrast, INDEX and MATCH locate the position of the lookup value and retrieve the data directly, potentially leading to faster lookup operations. Handling sorted or unsorted data: VLOOKUP requires the data to be sorted in ascending order based on the lookup column. Conversely, INDEX and MATCH can handle both sorted and unsorted data, as they don't rely on the data's sorting. Adaptability to column order changes: If the colu...

Today's activity report #13

Изображение
Today, I continued to take the final steps of creating a dashboard and sent the finished MEL result to the officer. A new task appeared to create a table for partners to fill in their activity plan for the coming months. Time spend: 8h

Today's activity report #12

Изображение
Today I have been trying different Power BI map visuals (Filled Map, Shape Map with directly uploaded .geojson, ArcGis Map, Icon Map and a few variations of .geojson maps with Mapbox) for our data interpretation. I still can't find out why Mapbox studio ignores set zoom levels from uploaded file and hide small objects for zoom levels less 8. It's possible to combine 3-scale objects like states, districts and communities at a one .geojson layer with a few pseudo-layers, but this zoom issue is annoying. Suddenly, I found how to make "map" for any compatible dataset. Some part of the map visuals did not succeed to use because of their trial restricted features.  Time spent: 8h

How to upload any .geojson data into Power BI Shape map visual

Изображение
Online convert tool link

Power BI Fields Parameter. How to change colors for different measures

Изображение
When we are using a few filters by Fields Parameter feature, our visuals behavior is ordinary. We can customize legend colors as we wish, but when the slicer applied this possibility has gone. Even using Fields Parameter as legend did not permit us choose  different colors of each data set separately. To fix this issue: Go to Table view Create a new column like Measure = 'Name of FP'[Name of FP] Select first one option in related slicer Put the measure name in a legend Go to visual Bars settings and set up the first data set colors Repeat for remaining options

DAX calculations measures group up

Изображение
For now, we can switch for Model view and select at Data pane needed measures with Ctrl button. Then will opened Properties pane where we should use Display folder field. If we type some name of a folder in the field, there will be created a new folder inside selected table. For existing folder, we can move a measure with drag&drop. But this possibility is available only in Model view. Also, we can go to Home page -> Enter data to create a new empty table and group up our measures inside it.

Today's activity report #11

Изображение
Met again with the MEL officer. We discussed the new changes to the dashboard and immediately made some changes to the visualizations. I also slightly changed the structure of the presentation and made corrections to some objects. So far, the main problem remains the choice of convenient map presentation for distant locations of Ukraine. My tries: Set allowable zoom levels with tippecanoe. Unsuccessfully. Merged ADM1/ADM2/AMD3 layers into one file with manual zoom correction. Unsuccessfully. Converted maps to multilayer KML. Unsuccessfully. Additionally, I created a geographic hierarchy reference book to verify the primary data. Important : found the new problem, Mapbox visual legend shows wrong aggregated values.

Today's activity report #10

Изображение
Today's tasks were to create an evaluation table of beneficiaries for KfW distribution and to prepare the second iteration of the Power BI dashboard. The main problem during the development of the scoring table was to compare the raw data from the external form and the evaluation criteria of the beneficiaries. For example, the initial data lacked information about the composition of the household and had to be reproduced from other data in the table. Some of the fields were repeated several times, and the information in the records had a dirty look and had to be additionally cleaned. Time spent: 4h

Manual zoom level fix .geojson without tippecanoe

Mapbox Studio environment automatically chooses max and min zoom levels for uploaded tilesets. In the .geojson file format case we can modify it manually.

Power BI Fields Parameters

Изображение
How to dynamically switch between measures using Field Parameters Ensure that Field Parameters is turned on in Preview Features. Firstly, navigate to Options and Settings > Options > Preview Features, and ensure that Field Parameters is enabled. Next, restart Power BI Desktop to begin using the Field Parameters feature. Set up Field Parameters To get started with Field Parameters, go to the Modeling tab in the ribbon and there is an option 'New Parameter', select 'Fields' from here to open the Parameters pop-up. Then, you need to provide the name of your first parameter. In this example I will be calling our parameter 'Orders Parameter'. Then select the fields from the Fields section you would like to include as your field parameters. In this example, I will be using the 'Customers' and 'Products Sold' measures. Ensure that you select 'Add a slicer to this page' and press 'Create'. This will automatically add the sli...

Today's activity report #9

Изображение
Today I continued creating the dashboard. To unify the process, I prepared a separate file with auxiliary tables and aggregated indicators of the first round of distribution. Made edits to the Power BI report structure and filled in gaps with new data. I performed primary data analysis and reconstructed approximate data on the age distribution of children in aid recipients based on the skewed distribution of the first round survey. I also added calculated columns for calculating and aggregating distribution data in monetary terms. Prepared the preliminary data of the questionnaire of the needs of the respondents from the first round. But did not add them, since most of them are related to CfW distribution. In addition to creating the dashboard, I made changes to the cleaned list of beneficiaries. When the MEL officer converted the data to reflect the main distribution indicators, we lost some of the beneficiaries' personal data. It was necessary to filter and transfer them from the...

How to create a visual with support several different tooltips

Изображение
Multiple tooltips in Power BI are a useful feature that allow users to display additional information when hovering over a visual object. Using multiple tooltips on the same visual object can provide even more context and insights, by allowing users to access different layers of information with ease. This can be particularly helpful when dealing with complex datasets or when trying to convey multiple messages through a single visual. In this way, multiple tooltips can enhance the user experience and improve the overall effectiveness of a Power BI report. Configure your visual Create a new page and configure it as below: Go to Format page -> Canvas settings -> Type. Change the Type for Tooltip Go to Format page -> Page information. Set the checkbox Allow use as tooltip to on Go back to your visual's setup. Go to Format visual -> General -> Tooltips set to on Change Page option to your tooltip page name Add a new measure to detect the selected level of detali...

Tippecanoe zoom levels

Изображение
Tippecanoe CLI syntax: -z zoom or --maximum-zoom=zoom: Maxzoom : the highest zoom level for which tiles are generated (default 14) -zg or --maximum-zoom=g : Guess what is probably a reasonable maxzoom based on the spacing of features. -Z zoom or --minimum-zoom=zoom : Minzoom: the lowest zoom level for which tiles are generated (default 0) -ae or --extend-zooms-if-still-dropping : Increase the maxzoom if features are still being dropped at that zoom level. The detail and simplification options that ordinarily apply only to the maximum zoom level will apply both to the originally specified maximum zoom and to any levels added beyond that. -R zoom/x/y or --one-tile=zoom/x/y : Set the minzoom and maxzoom to zoom and produce only the single specified tile at that zoom level. If you know the precision to which you want your data to be represented, or the map scale of a corresponding printed map, this table shows the approximate precision and scale corresponding to various -z options i...

Today's activity report #8

Изображение
As a MEL officer, I met with a senior colleague today to discuss our strategy for visualizing the first round of merchandise distribution. We reviewed and compared our Power BI sketches, and also sought input from other team members to ensure we were on the right track. To further inform our approach, we conducted a thorough analysis of the previous quarterly report, gathering expected project outputs project and comparing them with our current progress. With this additional information in mind, we held continue our meeting and create our first iteration of the project visualization. Time used: 8h

tippecanoe installation issues

Изображение
Tippecanoe is an open-source command-line tool for creating tilesets from large datasets, primarily used for creating vector tiles for interactive maps. Developed by Mapbox, Tippecanoe efficiently converts large geojson, CSV, or other geographic data formats into vector tiles that can be served and rendered quickly in web mapping applications. The tool utilizes a technique called "spherical mercator tiling" to optimize the storage and retrieval of geographic data, making it an essential tool for developers and cartographers working on web-based mapping applications. Tippecanoe does not have a Windows version, instead there are only MacOS and Linux versions. So, our first step is installing chosen OS. My case it's Ubuntu. I used Oracle Virtuat Box ver. 7.0 and Ubuntu Linux ver. 22.04.2 under Windows 10 Pro LTSC. When you are installing the Linux, strongly not recommended to use Unattended Installation option in your virtual machine preferences because can catch some p...

MapBox-compatible file formats and limitations

Изображение
In general, the file formats used for representing geospatial data have similar advantages and we should focus on their limitations relative to our current dataset: File Format Advantages Limitations MBTile Compact, can store large amounts of data in a single file, suitable for offline mapping Limited to raster data, does not support vector data KML Can contain a variety of data types, easy to share, can be opened in a variety of mapping applications Large file size, may not be suitable for large datasets GPX Can store GPS data for activities such as hiking, biking, and running, easy to share, can be opened in a variety of mapping applications Limited to GPS data, does not support other types of geospatial data GeoJSON Can store vector data, compact and easy to share, can be opened in a variety of mapping applications Can be larger than other formats, may not be suitable for large d...

Today's activity report #7

Изображение
Today's solved tasks: Dealt with tippecanoe installation under Ubuntu Linux. Figured out (I hope so) how to show user-friendly map interface for two far away situated regions of Ukraine in three scales with filter by several database columns. Made third map view model for the purposed database view. Picked up the values for each map view, zoom, latitude and longitude. Time used: 5h

Today's activity report #6

Изображение
Today's solved tasks: Got checked files from the senior MEL officer and convert them into PDF according to organization report template. Have discussed and made decisions of interaction with our partners about additional data gathering for eliminating incomplete beneficiary records. Provide training for organization MEL officer in geo-based data visualization create with MapBox. Time used: 4h

Today's activity report #5

Изображение
Today's solved tasks: Took a part in the visualization plan discussion. Investigated MapBox tools ecosystem. Investigated MapBox compatible file formats and limitations. Time used: 3h