Weather condition and forecasting using weather cloud on Raspberry Pi

Call for Price

Weather condition and forecasting using weather cloud on Raspberry Pi

SKU: Weather condition and forecasting using cloud on Raspberry Pi Category:

Description

ABSTRACT

IoT technology went to the next level by having Cloud-based applications, which the process can be done on cloud itself to result the output and also some clouds are like providing information about weather, providing the object recognition from the cloud. Likewise, here by this Raspberry Pi projects, you will able to learn how to work on cloud-based projects using python programming and to work on JSON file to decoding the weather value from the weather cloud. There are an enormous amount of weather parameters from the weather cloud mainly the current weather as well as the upcoming weather conditions. Additionally, this project explains you to how to store the weather parameter in the excel sheet which has the format of .csv which is used to visualize the weather parameter as logs.

HARDWARE REQUIRED

  • Raspberry Pi
  • SD card
  • Power supply
  • VGA to HDMI converter (Optional)

SOFTWARE REQUIRED

  • Raspbian Stretch OS      
  • SD card Formatter
  • Win32DiskImager (or) Etcher

PYTHON LIBRARIES USED

  • JSON library
  • urllib2 library

CODE

import urllib2
import json
csv = open("Logger.csv", "a")
columnTitleRow = "Temp, Humid, Wind\n"
csv.write(columnTitleRow)
csv.close()
while True:
    f = urllib2.urlopen('http://api.wunderground.com/api/paste ur API key here/conditions/q/CA/chennai.json') #For current weather condition
    g = urllib2.urlopen('http://api.wunderground.com/api/paste ur API key here/forecast/q/CA/chennai.json') #use this g variable for obtaining upcoming weather condition
    json_string = f.read()
    parsed_json = json.loads(json_string)

    temp = "Temperature is"+str(parsed_json['current_observation']['temp_c'])
    humid = "humidity is"+str(parsed_json['current_observation']['relative_humidity'])
    wind = "wind is"+str(parsed_json['current_observation']['wind_string'])
    csv = open("Logger.csv", "a")
    row = str(temp)+','+str(humid)+','+str(wind)
    csv.write(row)
    csv.close()

Additional information

Weight 0.000000 kg

Reviews

There are no reviews yet.

Be the first to review “Weather condition and forecasting using weather cloud on Raspberry Pi”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.