Skip to content

Instantly share code, notes, and snippets.

@alexbaramilis
Last active April 16, 2019 16:38
Show Gist options
  • Save alexbaramilis/99d7a3416a14cca0bed6aca677437b1c to your computer and use it in GitHub Desktop.
Save alexbaramilis/99d7a3416a14cca0bed6aca677437b1c to your computer and use it in GitHub Desktop.
Breather models sample data extension.
extension CityConditions {
static func sampleData() -> CityConditions {
let weather = Weather(timestamp: "2019-04-16T11:00:00.000Z",
iconCode: "01d",
temperature: 5,
humidity: 36,
pressure: 1015,
windSpeed: 9.8,
windDirection: 300)
let pollution = Pollution(timestamp: "2019-04-16T08:00:00.000Z",
aqiUS: 9,
mainPollutantUS: "p2",
aqiChina: 3,
mainPollutantChina: "p2")
let asthma = Asthma(risk: "medium",
probability: 63)
return CityConditions(city: "New York",
weather: weather,
pollution: pollution,
asthma: asthma)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment