Package 'ROpenWeatherMap'

Title: R Interface to OpenWeatherMap API
Description: OpenWeatherMap (OWM) <http://openweathermap.org/api> is a service providing weather related data. This package can be used to access current weather data for one location or several locations. It can also be used to forecast weather for 5 days with data for every 3 hours.
Authors: Mukul Chaware[aut,cre]
Maintainer: Mukul Chaware <[email protected]>
License: MIT + file LICENSE
Version: 1.1
Built: 2024-11-04 03:32:56 UTC
Source: https://github.com/mukul13/ropenweathermap

Help Index


get current weather data for one location

Description

get current weather data for one location

Usage

get_current_weather(api_key, cityID = NA, city = "", country = "",
  coordinates = NA, zip_code = NA)

Arguments

api_key

Open weather map API key

cityID

city ID

city

name of city

country

name of country

coordinates

(lat,lon) coordinates of the location of your interest

zip_code

zip code

Value

data frame giving current weather data for one location

Examples

## Not run: 
data=get_current_weather(api_key,city="guwahati")

## End(Not run)

get current weather data for multiple cities

Description

get current weather data for multiple cities

Usage

get_multiple_cities(api_key, bbox = NA, coordinates = NA, count = NA,
  cityIDs = NA, cluster = "yes", units = "metric")

Arguments

api_key

Open weather map API key

bbox

bounding box [lat of the top left point, lon of the top left point, lat of the bottom right point, lon of the bottom right point, map zoom]

coordinates

(lat,lon) coordinates of the location of your interest

count

number of cities around the point that should be returned

cityIDs

city IDs

cluster

use server clustering of points. Possible values are [yes, no]

units

metric units

Value

data frame giving current weather data for several locations

Examples

## Not run: 
data=get_multiple_cities(api_key,cityIDs =c(524901,703448,2643743))

## End(Not run)

get weather forecast data for one location

Description

get weather forecast data for one location

Usage

get_weather_forecast(api_key, cityID = NA, city = "", country = "",
  coordinates = NA)

Arguments

api_key

Open weather map API key

cityID

city ID

city

name of city

country

name of country

coordinates

(lat,lon) coordinates of the location of your interest

Value

data frame giving weather forecast data for one location

Examples

## Not run: 
data=get_weather_forecast(api_key,city="guwahati")

## End(Not run)