# Introduction To install this package you can use the code below:

devtools::install_github('fengye0907/LAB5C',build_vignettes = TRUE)

This package calculate the Longitude and Latitude corridnates by using free source API openweathermap.The openweathermap api has weather data for more then 200,000 cities.Data is available in JSON,XML or HTML format.In this package we have use JSON.To make is this package,the RC object orientation has been used and the output is an object with the class named geocode_f.The object return back a data frame consisting of corrdinates like longitude and latitude based on user input.

Import

    library(LAB5C)

Methods

To start with, we can use the initialize the class to input city name to get corridnates.

example <- geocode_f("Stockholm")
example$getCoordinate()

The geocode_f() is an initialize method for this lab assignment we create a package that connect to API and comptute coordinates longitude and latitude form user given input.

The getCoordinate() method can print out the cooridantes like Longitude and Latitude and city name.



fengye0907/LAB5C documentation built on May 17, 2019, 12:02 p.m.