Weather API Web Service Process

Weather widget spec

High priority

Normal priority


● Provide up-to-date, location-based weather details

● Feed data in simple JSON-encoded and JSONP-encoded formats



● System should be able to respond to requests within a maximum of 0.5 seconds (minus

external API calls to WeatherBug API)

● System should respond immediately (less than 0.1 seconds and before it tries to access

external APIs) if user-supplied location info is not usable.

● Data should be cached whenever reasonable. Will need to find out how often both feeds

update, but perhaps we can keep the top 20 stations cached for about 7 minutes.


● Filter XSS attacks

● Only allow GET requests


● French and English

Location support:

● location format should be flexible

○ postal/zip code

○ latlong

○ city

○ address (if unknown, the system should return a list of possible matches)

● if there are multiple locations, provide data for the closest one and provide a list of

nearby weather stations

Request structure:

● We will request data from the system using HTTP from external servers. Sometimes this

will occur on the server (JSON), sometimes on the client (JSONP).

● Requests should be a liberal in terms of what they will accept as input. For example,

address formats should be fairly flexible, postal code should be able to understand all

caps / no caps / no space (r3l0a5) / space (r3l 0a5) / url-encoded space (r3l%200a5)

● The system should return data conservatively, that is, it should only return data that has

been requested.


Request string

The data to be returned is to be selected using a regular HTTP request with GET parameters.

Parameter Values Returns Default

location [postal code]

[zip code]






For a focused location, returns requested weather

data for the nearest station, and a list of 10 closest

stations (if data is set to “all”).

For a general location (city, country, region),

returns the 10 most popular station queries in that

area, based on previous requests to the system.

null returns the 10 most popular station queries to

the system and weather data (if requested) for the

most popular station.


data “wb”






Either data from WeatherBug, data from

Environment Canada, or both.

“all” will return both feeds with list of 10 nearest


“all_wb” and “all_ec” return weather data for that

feed, and list of 10 nearest stations.


type “lr”




“lr” -- Long-range forecast (7-day)

“c” -- current weather conditions

“s” -- a list of 10 closest stations if possible, or a list

of 10 popular stations in the region.

“s_info” -- location info for a station


page [int] Used with type=s to get the next 10 results 1

format “json”


“json” -- returns pure JSON data

“jsonp” -- returns JSONP


callback [string] Used with jsonp requests to determine the name of

the wrapper for the JSON data


dataset “all”


Return either all data provided by the two sources,

or just basic weather info.


Basic: temp, high, low, wind, windchill, humidity,


temp_units “c”


celsius or farrenheit “c”

distance_units “ft”



feet, km, or miles “km”

Return Values

(items surrounded by “__” are placeholders)

// ======================================================

// = [url removed, login to view] =

// ======================================================

//data=all -- all data (wb and ec, and list of nearby stations),

//location=r3l0a5 -- a specific location, so a single station is returned

//type=lr -- long-range forecast


"data_segment": "long_range_station_data",

"station_name": "__name of the station__",

"data": {

//If there is only a station available for one of the feeds, the other will be


//For example, "ec": false (see below)

"wb": [

//array should have 7 members, 1 for each day in the forecast


"__unix datestamp__": {

"temp": "__temperature in C__",



A summarized description of the project.

Process data from 2 web services and return a normalized set of JSON or JSONP data
Normalize location handling between two separate location-based APIs
Provide up-to-date, location-based weather details

Source One:
RSS from Environment Canada

Source Two:
WeatherBug API
(see attached guide)

See attached specifications.

Note that this project does include a requirement to design the widget only to provide the JSON feed.

The feed will ultimately drive the weather widget found on this site.

Skills: MySQL, PHP

See more: php weather location json, weather api mysql, environment canada weather api, what is.json, what is data in data structure, web service postal code, web server languages, web languages list, web based languages, weatherbug com, weatherbug, weather apis, type of data structure, tries data structure in c, tries data structure, tries com, temp service, string in data structure, string data structure, results focused, process data structure, php client of canada, matches list, list of web languages, list matches

About the Employer:
( 0 reviews ) Winnipeg, Canada

Project ID: #1265233

9 freelancers are bidding on average $980 for this job


Check your PMB for details!!!

$1385 USD in 22 days
(63 Reviews)

Hi! I m highly interested in it

$750 USD in 10 days
(49 Reviews)

Hello, i can do this in a timely manner look to work with you At your disposal for any query. Regards softwarevamp

$1199 USD in 14 days
(23 Reviews)

Please check PMB to see our previous works Thanks

$1200 USD in 45 days
(6 Reviews)

Hello, please see the PMB for details.

$1200 USD in 30 days
(2 Reviews)

Bonjour je peux realiser ce project.

$755 USD in 25 days
(3 Reviews)

Hello, Please view PM.

$750 USD in 5 days
(0 Reviews)

Hello, We believe we can assist you with your project. Please visit our site ([url removed, login to view]) to learn more about our skills and qualifications.

$830 USD in 10 days
(0 Reviews)

Hiee I am Vishakha Gadhavi from Gujarat Technologies PVT LTD. And My Designation is Branch Development Manager. Company Introduction - Gujarat Technologies PVT LTD was incorporated in the year 2006. In th More

$750 USD in 25 days
(0 Reviews)