Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Paul van Tilburg | 3451445de1 | |
Paul van Tilburg | b88c7f77a0 | |
Paul van Tilburg | 705ffae249 | |
Paul van Tilburg | bd2344beb6 | |
Paul van Tilburg | bad20b803a | |
Paul van Tilburg | fc4672328f | |
Paul van Tilburg | 769f0745c8 |
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.3] - 2022-05-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Update the examples in `README.md`
|
||||
* Fix tests by adding missing type
|
||||
* Fix map key color code for level 8 used by map sampling
|
||||
|
||||
## [0.2.2] - 2022-05-10
|
||||
|
||||
### Changed
|
||||
|
@ -39,7 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
Initial release.
|
||||
|
||||
[Unreleased]: https://git.luon.net/paul/sinoptik/compare/v0.2.2...HEAD
|
||||
[Unreleased]: https://git.luon.net/paul/sinoptik/compare/v0.2.3...HEAD
|
||||
[0.2.3]: https://git.luon.net/paul/sinoptik/compare/v0.2.2...v0.2.3
|
||||
[0.2.2]: https://git.luon.net/paul/sinoptik/compare/v0.2.1...v0.2.2
|
||||
[0.2.1]: https://git.luon.net/paul/sinoptik/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://git.luon.net/paul/sinoptik/compare/v0.1.0...v0.2.0
|
||||
|
|
|
@ -2218,7 +2218,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sinoptik"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"assert_float_eq",
|
||||
"assert_matches",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sinoptik"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
authors = [
|
||||
"Admar Schoonen <admar@luon.net",
|
||||
"Paul van Tilburg <paul@luon.net>"
|
||||
|
|
42
README.md
42
README.md
|
@ -107,27 +107,27 @@ position:
|
|||
{
|
||||
"lat": 52.0905169,
|
||||
"lon": 5.1109709,
|
||||
"time": 1645800043,
|
||||
"time": 1652188682,
|
||||
"UVI": [
|
||||
{
|
||||
"time": 1645799526,
|
||||
"value": 1
|
||||
"time": 1652140800,
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"time": 1645885926,
|
||||
"value": 2
|
||||
"time": 1652227200,
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"time": 1645972326,
|
||||
"value": 3
|
||||
"time": 1652313600,
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"time": 1646058726,
|
||||
"value": 2
|
||||
"time": 1652400000,
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"time": 1646145126,
|
||||
"value": 1
|
||||
"time": 1652486400,
|
||||
"value": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -138,31 +138,31 @@ position:
|
|||
The PAQI (pollen/air quality index) metric is a special combined metric.
|
||||
If selected, it not only merges items from the AQI and pollen metric into
|
||||
`PAQI` by selecting the maximum value for each hour, but it also yields the
|
||||
24-hour maximum forecast item for air quality index in `AQI_max` and for
|
||||
pollen in `pollen_max` seperately:
|
||||
maximum forecast item for air quality index in `AQI_max` and for
|
||||
pollen in `pollen_max` seperately (out the items that `PAQI` combined):
|
||||
|
||||
``` json
|
||||
{
|
||||
"lat": 52.0905169,
|
||||
"lon": 5.1109709,
|
||||
"time": 1645800043,
|
||||
"time": 1652189065,
|
||||
"AQI_max": {
|
||||
"time": 1652022000,
|
||||
"value": 6.65
|
||||
"time": 1652191200,
|
||||
"value": 6.09
|
||||
},
|
||||
"PAQI": [
|
||||
{
|
||||
"time": 1651951457,
|
||||
"value": 6.04
|
||||
"time": 1652187600,
|
||||
"value": 6.09
|
||||
},
|
||||
{
|
||||
"time": 1651955057,
|
||||
"value": 6.04
|
||||
"time": 1652191200,
|
||||
"value": 6.09
|
||||
},
|
||||
...
|
||||
],
|
||||
"pollen_max": {
|
||||
"time": 1652034257,
|
||||
"time": 1652209200,
|
||||
"value": 6
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ pub(crate) mod position;
|
|||
pub(crate) mod providers;
|
||||
|
||||
#[derive(Responder)]
|
||||
#[response(status = 200, content_type = "image/png")]
|
||||
#[response(content_type = "image/png")]
|
||||
struct PngImageData(Vec<u8>);
|
||||
|
||||
/// Handler for retrieving the forecast for an address.
|
||||
|
@ -110,7 +110,7 @@ mod tests {
|
|||
use assert_float_eq::*;
|
||||
use assert_matches::assert_matches;
|
||||
use image::{DynamicImage, Rgba, RgbaImage};
|
||||
use rocket::http::Status;
|
||||
use rocket::http::{ContentType, Status};
|
||||
use rocket::local::blocking::Client;
|
||||
use rocket::serde::json::Value as JsonValue;
|
||||
|
||||
|
|
20
src/maps.rs
20
src/maps.rs
|
@ -29,16 +29,16 @@ type MapKeyHistogram = HashMap<Rgb<u8>, u32>;
|
|||
/// Note that the actual score starts from 1, not 0 as per this array.
|
||||
#[rustfmt::skip]
|
||||
const MAP_KEY: [[u8; 3]; 10] = [
|
||||
[ 73, 218, 33],
|
||||
[ 48, 210, 0],
|
||||
[255, 248, 139],
|
||||
[255, 246, 66],
|
||||
[253, 187, 49],
|
||||
[253, 142, 36],
|
||||
[252, 16, 62],
|
||||
[150, 10, 51],
|
||||
[166, 109, 188],
|
||||
[179, 48, 161],
|
||||
[0x49, 0xDA, 0x21],
|
||||
[0x30, 0xD2, 0x00],
|
||||
[0xFF, 0xF8, 0x8B],
|
||||
[0xFF, 0xF6, 0x42],
|
||||
[0xFD, 0xBB, 0x31],
|
||||
[0xFD, 0x8E, 0x24],
|
||||
[0xFC, 0x10, 0x3E],
|
||||
[0x97, 0x0A, 0x33],
|
||||
[0xA6, 0x6D, 0xBC],
|
||||
[0xB3, 0x30, 0xA1],
|
||||
];
|
||||
|
||||
/// The Buienradar map sample size.
|
||||
|
|
Loading…
Reference in New Issue