I have a csv file with a large number of columns. I've gotten to a point where I can add multiple columns on the same plot.
What I have so far: -
import pandas
from bokeh.plotting import figure, output_file, show
df=pandas.read_csv("finalMergedv1.csv")
p=figure(plot_width=600,plot_height=400,tools='pan,resize')
p.title="Some Title"
p.title.text_color="Gray"
p.title.text_font="arial"
p.title.text_font_style="bold"
p.xaxis.minor_tick_line_color=None
p.yaxis.minor_tick_line_color=None
p.xaxis.axis_label="x Axis Title"
p.yaxis.axis_label="Column header"
p.circle(df[df.columns[0]],df[df.columns[1]],size=10, color="Black")
p.circle(df[df.columns[0]],df[df.columns[2]],size=5, color="Coral")
p.circle(df[df.columns[0]],df[df.columns[3]],size=7, color="Gray")
output_file("Example.html")
show(p)
I would like to add a drop down widget to be able to select a specific column and view that specific one. The second part would be to change the y_axis_label based on the header of the column selected to view. I'm working with a dataframe thats about 50 -100 columns, so would really appreciate it if someone can tell me there is a better way to visualize that data other than bokeh. I have tried plotly, but would prefer other solutions.
Related
I'm trying to create a filter view in Google Sheets that will only show certain rows of the spreadsheet based on the last few characters of the URL of the images that are inserted in every row. For example, most rows have an image that is simply named "image1.png", "image2.png", "image3.png", etc, but every once in a while there'll be a row where the image is named "image63_s.png", "image176_s.png", "image271_s.png", etc. What I'd like to do is create a filter view that will only show rows where the name of the image in the URL ends with "_s".
EDIT: The images are inserted into the sheet with the formula =IMAGE("https://www.example.com/site/image1.png"), so I don't think regex can work here.
use custom formula:
=REGEXMATCH(A1, ".*_s.png$")
update:
=REGEXMATCH(FORMULATEXT(A1), ".*_s.png.*")
or as suggested have a hidden helper column of urls
Is there a way to conditionally format my table so I can add a bar like below? (it was created in excel)
Image I want to create:
I am currently stuck with the following - I highlighted the dates but need to know how I can highlight the holidays in my table with that grey color. (the picture below uses Thanksgiving as the example). My goal is to highlight each individual holiday in the table in grey.
Image I need to conditionally format
Here is what I tried with the formula provided below:
Attempt
You need a date dimension that has an attribute like isHoliday.
Create a measure where you specify the color in the Hex Code format ("#A1A1A1")
for instance:
measure_color_coding_holiday = SWITCH ( TRUE (), 'Date'[IsHoliday] = "yes", "#808080", 'Date'[IsHoliday] = "No", "#FFFFFF" )
Go to the conditional formatting for the column > Background Color. Choose Field value and pick the new measure.
/Tom
I am new to SSAS and after trying for hours to solve this problem I asking here.
I have a msOLAP cube that I want to import into SSAS PowerBI
but due to large database I want to pre-filter it befor importing.
The cube has measures in cpe_fact table and many other dimensions i.e. dim_time, dim_product, dim_material etc...
What I am trying to achieve is getting all the fields from the fact table joined with a subset of dimensions (i.e. only dim_time and dim_product) and filter them by date (i.e. cpe_fact.sale_date < now-6 month)
I tried to put this as MDX query but could not get any data by usin this MDX:
SELECT
{ [CPE_FACT].[MAIN].[SALES_Q]} ON COLUMNS,
{ [Selected_Date].[POSTING_DATE] } ON ROWS
FROM [CPE_Analytics]
I get this error: cube either does not exist or has not been processed evewn before I had a chance to define the WHERE part.
I tried DAX :
evaluate(filter('CPE_FACT', [AGENT] >= "26003"))
it worked but only for CPE_FACT table but i didnt understant how to join with the other dimensions...
My Question: How can I import some Facts Join Few dimentions from the Cube?
Example SSAS Connection -
Instead of using an MDX/DAX query use Power Query editor in two steps :
chose the tables you want to import (cpe_fact,dim_time and dim_product).
apply a filter on the date column in the fact table (cpe_fact) to load the desired resultes.
visit : https://radacad.com/only-get-the-last-few-periods-of-data-into-power-bi-using-power-query-filtering
I'm trying to import current inventories from google-form based inventory sheets for multiple rooms (each room's inventory is on a different sheet). I'd like to import the last non-empty row/column from another sheet using ImportRange or similar to grab the last inventory that was done for that space. I've also tried importing these inventories into another sheet in the same document and use the "Sheet 1"!A:A format to grab the last occupied column, but I haven't found a way to grab all 42 cells in the column without needing to type them out one at a time using this formula
"=FILTER('Sheet 1'!2:2 , COLUMN('Sheet 1'!2:2) =MAX( FILTER( Column('Sheet 1'!2:2) , NOT(ISBLANK('Sheet 1'!2:2)))))"
But that just grabs a single cell , instead of the whole column. Any suggestions?
getting the last column:
=ARRAYFORMULA(INDIRECT(
ADDRESS(2, MAX(IF(2:2="",,COLUMN(2:2))))&":"&
ADDRESS(ROWS(A:A), MAX(IF(2:2="",,COLUMN(2:2))))))
I wanted to see if there was a formula or something that I could do to get something like this accomplished in Google Sheets.
Table 1 is the input I am getting
Table 2 is the output I want to generate on a separate sheet
I am trying to use output I get from a Google form into a Google sheet and create a CSV to import into Google Groups.
=ARRAYFORMULA(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(IFERROR(SPLIT(B2:B, ","))<>"", "♦"&SPLIT(B2:B, ",")&
REGEXEXTRACT(A2:A, "(#.*)")&"♣"&A2:A, )),,999^99)),,999^99), "♦")), "♣")))