I've been trying to import my geojson file in PowerBi in order to create a map. I want actually to create a map showing the polygons by region. Why? because i have already a column that contains the dtype: geometry, so I already have polygons with a set of coordonates. But everytime i import my file in PowerBi and I use my visual the polygon column is not recognised. Do you know if I need to prepare my data in python before? My initial file is geojason and I export it in csv. I'm open in recommendation and I attach photos of what I've done so far.seperating lat et lon displaying my polygon i tried to tranform my column wkt, but it's not working
Related
After converting shapefile from mapshaper.org and importing it to Power BI I'm getting the below data structure in power query. I have seen countless custom map tutorials where the data is loaded straightaway to power query but I cannot seem to understand how to make this structure work. Can anyone please help me with this?
Data can be found here: data link: radacad.com
If you want to use the imported topoJSON file in the Power BI Shape map visual, you do not import it via Power Query. It is imported via the option in the visual in the Shape '+Add Map' option.
You then need another dataset that you can drag into the location field of the Shape map to map the data.
Hope that helps
I am working on Google Cloud Platform and I am using the IoT related services available there. But, to plot a line chart of temperature vs ts (timestamp) in Google Data studio, with the data from Google Cloud BigQuery, I am facing the following issue:
My data:
What I wanted to plot: (It's done in Google excel sheets):
What I am getting:
Basically, in Datastudio I am able to plot, only the average of all data points available. I am not able to plot with respect to "minute axis", other than for a day-wise average plot. Please help me fix this
Thanks in advance
this is what i did, it is a workaround but it works in my case
copy timestamp and format it as hh, rename it hr
make another copy of timestamp and format it as mm, rename it as minute
add new calculated field and use this formula
CAST(CONCAT(datetime,hr,minute) AS NUMBER)
edit : more context
data studio support only YYYMMDDHH , the lowest level of details is day-hour, if you want to show day- hour-minute, you need to create a new calculated field, it has to be string or number ( I prefer number, as I want to do some calculation on the date).
all I am doing is creating a number that look like this 201908121400, and use it in my chart
edit : 22-Aug-2019, DS support it now, not need for a workaround
https://support.google.com/datastudio/answer/6311467?utm_source=in-product&utm_medium=feature-panel&utm_campaign=whats-new
Introduction
I am using Power BI desktop and noticed some limitations on the pre-made graph models like the Line Graph. That's why I am trying to make a graph using Python Visuals. I am familiar with Python but I am not familiar with the Python Visual module in Power BI. Currently I am trying to make a simple Line Graph with this module.
I verified that I can draw a graph using Python Visuals (using matplotlib.pyplot) with some of my variables
# dataset = pandas.DataFrame(User field, Tag, Value, Resultaat, Timestamp)
# dataset = dataset.drop_duplicates()
import matplotlib.pyplot as plt
x = dataset.Timestamp
y = dataset.Value
plt.plot(x, y, 'ro')
plt.show()
However I am unable to plot some of my variables
For example I have the following two variables:
User field (timestamp)
Resultaat (int)
And I want to plot these two values.
x = dataset['User Field']
y = dataset.Resultaat
plt.plot(x, y, 'ro')
plt.show()
Unfortunately the code shown above does not create a working graph. I want to know what is going wrong. That's why I would like to print the variable dataset['User field'].
Question
Is it possible to debug a value in Python Visuals? Can I dump/print a variable like print(dataset['User field']) to see if the data of this variable is correct?
I was not able to print the values in the Python editor in Power BI. However it's possible to edit the code that is used Power BI in an external editor.
When clicking on the export button a Python script is being generated and automatically opened in your default editor for Python files. All the variables from Power BI are exported to a CSV file. The automatically generated Python script reads these values.
Because a Python script is generated and can be used outside of Power BI all the Python functionalities can be used. This includes printing variables.
# Prolog - Auto Generated #
import os, matplotlib.pyplot, uuid, pandas
os.chdir(u'C:/Users/Fakeuser/PythonEditorWrapper_886e059e-ab5c-423e-a20b-a224ee311990')
dataset = pandas.read_csv('input_df_d776f9db-be3f-4120-90f8-d9abe5c31964.csv')
matplotlib.pyplot.figure(figsize=(5.55555555555556,4.16666666666667))
matplotlib.pyplot.show = lambda args=None,kw=None: matplotlib.pyplot.savefig(str(uuid.uuid1()))
# dataset = pandas.DataFrame(User field, Tag, Value, Resultaat, Timestamp)
# dataset = dataset.drop_duplicates()
import matplotlib.pyplot as plt
tags = set(dataset['Tag'])
print(tags)
I have a data set that contains ~4 million rows. The visual component I am using is a Matrix visual. After selecting the data I need, the Matrix visual is 150 rows and 25 columns. I would like to export this into a csv in the exact way it is shown in the Matrix. When I try exporting the data set via the export data option in the menu, I get a message indicating that my data set is too big.
Is there a way of exporting the data in this format, or perhaps a python / R script that can gain access to the data the visual is using?
Any help appreciated, Thanks in advance
Exporting data as is from a matrix, is not supported. However, it is planned and you can vote for it, if you want to. You can only export the underlying data, but you obviously reached it's limits.
What you can do, is to connect from Excel to your data source and create a pivot there, the same way as your matrix in Power BI.
I am performing a PCA operation on my dataset using WEKA (filter-unsupervised-principal component). Once I apply, I am getting the PCA. However I am not able to export the PCA in a separate file for further processing. How do I export first 3 PCA in a csv or a txt file from Weka?
The "Save..." button at the top right of the Preprocess tab in Weka Explorer will export your PCA-filtered data. You will be prompted for the name and type of file you'd like to export to.
You can control the number of allowed principal components via the -M parameter to the filter, or you could export to a .csv file, open in a spreadsheet application, and remove all but the first three columns.