Skip to content

Instantly share code, notes, and snippets.

@vb100
Created July 11, 2017 20:11
Show Gist options
  • Save vb100/be6a46d2338423d1b3b033f99e747cb6 to your computer and use it in GitHub Desktop.
Save vb100/be6a46d2338423d1b3b033f99e747cb6 to your computer and use it in GitHub Desktop.
Load Weather Data from URL in CSV, construct this data in Pandas datarame, manipulate data and retrieve data in HTML format. Using Pandas and Bokeh plotting modules.
import pandas
from bokeh.plotting import figure, output_file, show
df=pandas.read_excel("http://pythonhow.com/verlegenhuken.xlsx",sheetname=0)
df["Temperature"]=df["Temperature"]/10
df["Pressure"]=df["Pressure"]/10
p=figure(plot_width=500,plot_height=400)
#p.title="Temperature"
#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="Temperature (°C)"
p.yaxis.axis_label="Pressure (hPa)"
p.circle(df["Temperature"],df["Pressure"],size=0.5)
output_file("Weather.html")
show(p)
print(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment