weather position updates

This commit is contained in:
Neythen 2021-06-14 19:17:07 +01:00
parent 544b4cd2aa
commit c4ecc041a4
10 changed files with 27 additions and 27 deletions

View File

@ -1,3 +1,3 @@
symbol,name,base,current,24hr change
BTC,bitcoin,usd,36641,1.548252293106038
ETH,ethereum,gbp,1741.05,-4.066730026417772
BTC,bitcoin,usd,36800,1.9889872710237515
ETH,ethereum,gbp,1747.56,-3.706294583596982

1 symbol name base current 24hr change
2 BTC bitcoin usd 36641 36800 1.548252293106038 1.9889872710237515
3 ETH ethereum gbp 1741.05 1747.56 -4.066730026417772 -3.706294583596982

View File

@ -1 +1 @@
{"main_weather": "Clouds", "description": "overcast clouds", "temp": 28.7, "min_temp": 27.92, "max_temp": 29.1, "feels_like": 34.95, "humidity": 85, "clouds": 100, "wind_speed": 2.68, "wind_direction": 90, "visibility": 10000, "uv": 0, "rain_chance": 0.35}
{"main_weather": "Clouds", "description": "overcast clouds", "temp": 28.57, "min_temp": 27.92, "max_temp": 29.1, "feels_like": 34.55, "humidity": 85, "clouds": 100, "wind_speed": 2.68, "wind_direction": 90, "visibility": 10000, "uv": 0, "rain_chance": 0}

View File

@ -1 +1 @@
[{"main_weather": "Rain", "description": "light rain", "min_temp": 27.76, "max_temp": 29.54}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.4, "max_temp": 28.37}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.91, "max_temp": 28.47}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.86, "max_temp": 28.26}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.78, "max_temp": 29.6}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.93, "max_temp": 29.71}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.1, "max_temp": 30.27}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.98, "max_temp": 30.1}]
[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.81, "max_temp": 29.53}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.37, "max_temp": 28.25}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.02, "max_temp": 28.42}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.54, "max_temp": 29.06}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.74, "max_temp": 29.65}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.14, "max_temp": 29.86}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.1, "max_temp": 29.89}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.42, "max_temp": 29.49}]

View File

@ -1 +1 @@
10/06/2021 15:01:55
14/06/2021 14:16:14

1 10/06/2021 15:01:55 14/06/2021 14:16:14

View File

@ -1,4 +1,4 @@
name,current,opening
MSFT,256.6901,254.29
NFLX,487.69,487.165
GOOG,2508.77,2494.01
MSFT,258.43,257.9
NFLX,500.5603,489.68
GOOG,2507.77,2513.39

1 name current opening
2 MSFT 256.6901 258.43 254.29 257.9
3 NFLX 487.69 500.5603 487.165 489.68
4 GOOG 2508.77 2507.77 2494.01 2513.39

BIN
final.ppm

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 159 B

View File

@ -590,7 +590,7 @@ class StockTicker():
finalDisplayImage.save('final1.ppm')
def getTodayWeatherImage(self):
img = Image.new('RGB', (225, 32))
img = Image.new('RGB', (200, 32))
f = open( "csv/weather_location.txt", 'r' )
location = f.read()
@ -621,36 +621,36 @@ class StockTicker():
img.paste(weather_img, (5,9))
temp_img = self.textImage(str("{0:.0f}".format(current_weather['temp'])), large_font)
img.paste(temp_img, (50,9))
img.paste(temp_img, (36,9))
deg_img = self.textImage('o', small_font)
print(temp_img.size)
img.paste(deg_img, (70, 8))
img.paste(deg_img, (56, 8))
main = current_weather['main_weather']
main_img = self.textImage(main, small_font)
img.paste(main_img, (48, 26))
img.paste(main_img, (34, 26))
feels_img = self.textImage('Feels like:' + str("{0:.0f}".format(current_weather['feels_like'])), small_font)
img.paste(feels_img, (location_img.size[0] + 10, 0))
min_img = self.textImage( "{0:.0f}".format(current_weather['min_temp']), small_font, r=0, g=0, b=255)
img.paste(min_img, (80, 12))
img.paste(min_img, (66, 12))
max_img = self.textImage( "{0:.0f}".format(current_weather['max_temp']), small_font, r=255, g=0, b=0)
img.paste(max_img, (80, 22))
img.paste(max_img, (66, 22))
hum_img = Image.open(weather_dir + '/humidity.png')
img.paste(hum_img, ( 107, 8))
img.paste(hum_img, ( 82, 8))
htext_img = self.textImage(str(current_weather['humidity']) + '%', small_font)
img.paste(htext_img, (120, 10))
img.paste(htext_img, (95, 10))
uv_img = Image.open(weather_dir + '/uv.png')
img.paste(uv_img, ( 107, 20))
img.paste(uv_img, ( 82, 22))
utext_img = self.textImage(str(current_weather['uv']) , small_font)
img.paste(utext_img, (119, 23))
img.paste(utext_img, (95, 23))
weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
months =['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
@ -666,32 +666,32 @@ class StockTicker():
img.paste(date_img, (132, 0))
rain_img = Image.open(weather_dir + '/rain-chance.png')
img.paste(rain_img, (143,8))
img.paste(rain_img, (118,8))
rtext_img = self.textImage(str(int(current_weather['rain_chance']*100)) + '%', small_font)
img.paste(rtext_img, (156, 10))
img.paste(rtext_img, (131, 10))
cloud_img = Image.open(weather_dir + '/clouds.png')
img.paste(cloud_img, (143,20))
img.paste(cloud_img, (118,20))
ctext_img = self.textImage(str(current_weather['clouds']) + '%', small_font)
img.paste(ctext_img, (156, 22))
img.paste(ctext_img, (131, 22))
wind_img = Image.open(weather_dir + '/wind.png')
img.paste(wind_img, (179,8))
img.paste(wind_img, (154,8))
wtext_img = self.textImage("{0:.0f}".format(current_weather['wind_speed']) + 'm/s', small_font)
img.paste(wtext_img, (192, 10))
img.paste(wtext_img, (168, 10))
wdir_img = self.textImage(self.degreesToCompass(current_weather['wind_direction']), small_font)
img.paste(wdir_img, (212, 10))
img.paste(wdir_img, (183, 10))
vis_img = Image.open(weather_dir + '/visibility.png')
img.paste(vis_img, (179,20))
img.paste(vis_img, (154,20))
vtext_img = self.textImage(str(current_weather['visibility']/1000) + 'km', small_font)
img.paste(vtext_img, (192, 22))
img.paste(vtext_img, (168, 22))

Binary file not shown.