Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bokeh help
#1
Im trying to figure out how to make a graph with these modifications :

Create the following visualization (i.e. scatterplot) that shows the relationship between the total vaccinations (x axis) and people fully vaccinated (y axis) for the states of California, Colorado, and Texas.

I don’t know how to single out the three states from the rest.

I tried this
cal = df[df[ 'location' ] = = 'California' ]

cool = df[df[ 'location' ] = = 'Colorado' ]

tx = df[df[ 'location' ] = = 'Texas' ],
but my code will not work.

It’s a csv file with all the states from

USA COVID-19 Vaccinations | Kaggle

I just started with bokeh, jyputer and thonny this week, so all of this is very new to me.


This is my attempt.


import bokeh

import pandas as pd

from bokeh.plotting import figure

from bokeh.io import output_notebook, show

output_notebook()

df=pd.read_csv ('us.csv')

print(df)

# not working df['total_vaccinations']= pd.to_daytime(df['total_vaccinations'])

#total_vaccinations x red bold

#people_fully_vaccinated y black

#filter data

#location

#California red

#Colorado green

#Texas blue

# (3) Include a ‘grey’ border around the visualization with line width of 8 and alpha value of 0.8



cal=df[df['location']=='California']

cool=df[df['location']=='Colorado']

tx=df[df['location']=='Texas']
Larz60+ write Jul-28-2022, 07:46 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Fixed for you this time. Please use bbcode tags on future posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting dictionary in the bokeh ColumnDataSource v_mn 1 997 Sep-15-2022, 07:12 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020