AtsushiSakai / googleearthplot

Python library for plotting on google earth
MIT License
34 stars 16 forks source link

Multiple data sources #3

Open JRoth9125 opened 3 years ago

JRoth9125 commented 3 years ago

Can you ingest multiple data sources into this program? Particularly CSV files that are scatter plots and not connected.

VolutionLabs commented 3 years ago

I also try to get the csv but get an error when importing the library

googleearthplot/googleearthplot.py", line 26

print "[PlotLineChartFromCSV] plotting a line chart from csv file:"+filepath SyntaxError: Missing parentheses in call to 'print'. Did you mean print("[PlotLineChartFromCSV] plotting a line chart from csv file:"+filepath)?

JRoth9125 commented 3 years ago

I actually figured that issue out; however having issues with creating a string for vmax below..... within my code.

for i in range(len(namelist)): stn=namelist[i] storm = hurdat_atl.get_storm((stn,yrr))

print(stn)
print(max(storm.vmax))
print('')

lat = list(storm.lat)
lon = list(storm.lon)
vmax = list(storm.vmax)
HCAT = list(storm.type)

#Plot line chart
gep2=googleearthplot()

fname=stn+'_'+str(yrr)+'.kml'
#lat=[-77.6192,-77.6192,-77.6195,-77.6198,-77.6208,-77.6216,-77.6216,-77.6216]
#lon=[43.1725,43.1725,43.1728,43.173,43.1725,43.1719,43.1719,43.1719,43.1719]
gep2.PlotLineChart(lat, lon, name=stn, color="pink")
gep2.GenerateKMLFile(filepath=fname)
mohammedshafeeqet commented 3 years ago

@VolutionLabs This is python2 vs Python3 issue. If you are using python3, it won't work out of the box because this is not compatible with the same (Python3 needs () for print) As a temporary solution you can download the googleearthplot.py into your project and add paranthesis for all print statements. and use from googleearthplot import googleearthplot