Fastapi application that works with parquet files containing meteorological data from different sensors:
- Upload a file, there is a sample in resources folder.
- Request available channels, providing a file identifier and optionally, a type of channel.
- Request statistics for certains channels within a date range.
-
Retrieve available channel identifiers per type.
- Allowed channel types are: vel, std, std_dtr, temp, hum, press, dir, sdir.
- Requesting a channel type outside allowed values will raise an error.
- Duplicated channel types are filtered before processing.
Receives: ChannelRequest model with a file identifier and an optional list of channel_type values.
Returns: Channels model with dictionary of available channels sorted by channel type. - Allowed channel types are: vel, std, std_dtr, temp, hum, press, dir, sdir.
-
Retrieve stats (mean and standard deviation) for requested file identifier and channel identifiers.
- In case no channel is specified, stats for all channels are returned.
- A date range may be provided, otherwise stats are computed for the whole time series.
- Should only start_date be specified, end_date is set to now.
- Providing any nonexistent channel identifier will raise an error
Receives: StatsRequest model with a file identifier and optionally, a list of channels and a date range.
Returns: Dictionary of Stats models including dictionary of dictionaries with stats sorted by channel. -
Upload a parquet file to an object storage backend. Files can only be uploaded once and are assigned an identifier based on the file hash.
Receives: Parquet file.
Returns: FileId model containing file_id and stored values. If an identical file has been uploaded before, stored is false, meaning file was not re-uploaded.
-
docker pull javierjsa/statsapi:latest
-
docker-compose -f docker-compose.yaml up
-
http://0.0.0.0/docs