jacobbieker commited on
Commit
15bf5b8
1 Parent(s): b5ef642

Add OSGB version

Browse files
Files changed (2) hide show
  1. dataset_infos.json +3 -2
  2. eumetsat_uk_hrv.py +20 -2
dataset_infos.json CHANGED
@@ -1,2 +1,3 @@
1
- {"uk_video": {"description": "The EUMETSAT Spinning Enhanced Visible and InfraRed Imager (SEVIRI) rapid scanning service (RSS) takes an image of the northern third of the Meteosat disc every five minutes (see the EUMETSAT website for more information on SEVIRI RSS ). The original EUMETSAT dataset contains data from 2008 to the present day from 12 channels, and for a wide geographical extent covering North Africa, Saudi Arabia, all of Europe, and Western Russia. In contrast, this dataset on Google Cloud is a small subset of the entire SEVIRI RSS dataset: This Google Cloud dataset is from a single channel: the \"high resolution visible\" (HRV) channel; and contains data from January 2020 to November 2021. The geographical extent of this dataset on Google Cloud is a small subset of the total SEVIRI RSS extent: This Google Cloud dataset includes data over the United Kingdom and over North Western Europe.\n\nThis dataset is slightly transformed: It does not contain the original numerical values. \n\nThe original data is copyright EUMETSAT. EUMETSAT has given permission to redistribute this transformed data. The data was transformed by Open Climate Fix using satip.\n\nThis public dataset is hosted in Google Cloud Storage and available free to use. \n", "citation": "@InProceedings{eumetsat:ocf_uk_hrv,\ntitle = {EUMETSAT SEVIRI RSS UK HRV},\nauthor={EUMETSAT, with preparation by Open Climate Fix\n},\nyear={2022}\n}\n", "homepage": "https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss-hrv-uk?project=tactile-acrobat-249716", "license": "Cite EUMETSAT as the data source. This data is redistributed with permission from EUMETSAT under the terms of the EUMETSAT Data Policy for SEVIRI data with a latency of >3 hours . This redistributed dataset is released under the CC BY 4.0 open data license & is provided \"AS IS\" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"timestamps": {"feature": {"dtype": "time64[ns]", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "video": {"shape": [36, 891, 1843], "dtype": "int16", "id": null, "_type": "Array3D"}, "x_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "y_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "eumetsat_uk_hrv_dataset", "config_name": "uk_video", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": null, "download_checksums": null, "download_size": null, "post_processing_size": null, "dataset_size": null, "size_in_bytes": null},
2
- "uk": {"description": "The EUMETSAT Spinning Enhanced Visible and InfraRed Imager (SEVIRI) rapid scanning service (RSS) takes an image of the northern third of the Meteosat disc every five minutes (see the EUMETSAT website for more information on SEVIRI RSS ). The original EUMETSAT dataset contains data from 2008 to the present day from 12 channels, and for a wide geographical extent covering North Africa, Saudi Arabia, all of Europe, and Western Russia. In contrast, this dataset on Google Cloud is a small subset of the entire SEVIRI RSS dataset: This Google Cloud dataset is from a single channel: the \"high resolution visible\" (HRV) channel; and contains data from January 2020 to November 2021. The geographical extent of this dataset on Google Cloud is a small subset of the total SEVIRI RSS extent: This Google Cloud dataset includes data over the United Kingdom and over North Western Europe.\n\nThis dataset is slightly transformed: It does not contain the original numerical values. \n\nThe original data is copyright EUMETSAT. EUMETSAT has given permission to redistribute this transformed data. The data was transformed by Open Climate Fix using satip.\n\nThis public dataset is hosted in Google Cloud Storage and available free to use. \n", "citation": "@InProceedings{eumetsat:ocf_uk_hrv,\ntitle = {EUMETSAT SEVIRI RSS UK HRV},\nauthor={EUMETSAT, with preparation by Open Climate Fix\n},\nyear={2022}\n}\n", "homepage": "https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss-hrv-uk?project=tactile-acrobat-249716", "license": "Cite EUMETSAT as the data source. This data is redistributed with permission from EUMETSAT under the terms of the EUMETSAT Data Policy for SEVIRI data with a latency of >3 hours . This redistributed dataset is released under the CC BY 4.0 open data license & is provided \"AS IS\" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"timestamp": {"dtype": "time64[ns]", "id": null, "_type": "Value"}, "image": {"shape": [891, 1843], "dtype": "int16", "id": null, "_type": "Array2D"}, "x_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "y_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "eumetsat_uk_hrv_dataset", "config_name": "uk", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": null, "download_checksums": null, "download_size": null, "post_processing_size": null, "dataset_size": null, "size_in_bytes": null}}
 
 
1
+ {"uk_video": {"description": "The EUMETSAT Spinning Enhanced Visible and InfraRed Imager (SEVIRI) rapid scanning service (RSS) takes an image of the northern third of the Meteosat disc every five minutes (see the EUMETSAT website for more information on SEVIRI RSS ). The original EUMETSAT dataset contains data from 2008 to the present day from 12 channels, and for a wide geographical extent covering North Africa, Saudi Arabia, all of Europe, and Western Russia. In contrast, this dataset on Google Cloud is a small subset of the entire SEVIRI RSS dataset: This Google Cloud dataset is from a single channel: the \"high resolution visible\" (HRV) channel; and contains data from January 2020 to November 2021. The geographical extent of this dataset on Google Cloud is a small subset of the total SEVIRI RSS extent: This Google Cloud dataset includes data over the United Kingdom and over North Western Europe.\n\nThis dataset is slightly transformed: It does not contain the original numerical values. \n\nThe original data is copyright EUMETSAT. EUMETSAT has given permission to redistribute this transformed data. The data was transformed by Open Climate Fix using satip.\n\nThis public dataset is hosted in Google Cloud Storage and available free to use. \n", "citation": "@InProceedings{eumetsat:ocf_uk_hrv,\ntitle = {EUMETSAT SEVIRI RSS UK HRV},\nauthor={EUMETSAT, with preparation by Open Climate Fix\n},\nyear={2022}\n}\n", "homepage": "https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss-hrv-uk?project=tactile-acrobat-249716", "license": "Cite EUMETSAT as the data source. This data is redistributed with permission from EUMETSAT under the terms of the EUMETSAT Data Policy for SEVIRI data with a latency of >3 hours . This redistributed dataset is released under the CC BY 4.0 open data license & is provided \"AS IS\" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"timestamps": {"feature": {"dtype": "time64[ns]", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "video": {"shape": [36, 891, 1843], "dtype": "int16", "id": null, "_type": "Array3D"}, "x_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "y_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "eumetsat_uk_hrv_dataset", "config_name": "uk_video", "version": {"version_str": "1.2.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": null, "download_checksums": null, "download_size": null, "post_processing_size": null, "dataset_size": null, "size_in_bytes": null},
2
+ "uk": {"description": "The EUMETSAT Spinning Enhanced Visible and InfraRed Imager (SEVIRI) rapid scanning service (RSS) takes an image of the northern third of the Meteosat disc every five minutes (see the EUMETSAT website for more information on SEVIRI RSS ). The original EUMETSAT dataset contains data from 2008 to the present day from 12 channels, and for a wide geographical extent covering North Africa, Saudi Arabia, all of Europe, and Western Russia. In contrast, this dataset on Google Cloud is a small subset of the entire SEVIRI RSS dataset: This Google Cloud dataset is from a single channel: the \"high resolution visible\" (HRV) channel; and contains data from January 2020 to November 2021. The geographical extent of this dataset on Google Cloud is a small subset of the total SEVIRI RSS extent: This Google Cloud dataset includes data over the United Kingdom and over North Western Europe.\n\nThis dataset is slightly transformed: It does not contain the original numerical values. \n\nThe original data is copyright EUMETSAT. EUMETSAT has given permission to redistribute this transformed data. The data was transformed by Open Climate Fix using satip.\n\nThis public dataset is hosted in Google Cloud Storage and available free to use. \n", "citation": "@InProceedings{eumetsat:ocf_uk_hrv,\ntitle = {EUMETSAT SEVIRI RSS UK HRV},\nauthor={EUMETSAT, with preparation by Open Climate Fix\n},\nyear={2022}\n}\n", "homepage": "https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss-hrv-uk?project=tactile-acrobat-249716", "license": "Cite EUMETSAT as the data source. This data is redistributed with permission from EUMETSAT under the terms of the EUMETSAT Data Policy for SEVIRI data with a latency of >3 hours . This redistributed dataset is released under the CC BY 4.0 open data license & is provided \"AS IS\" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"timestamp": {"dtype": "time64[ns]", "id": null, "_type": "Value"}, "image": {"shape": [891, 1843], "dtype": "int16", "id": null, "_type": "Array2D"}, "x_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "y_coordinates": {"feature": {"dtype": "float64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "eumetsat_uk_hrv_dataset", "config_name": "uk", "version": {"version_str": "1.2.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": null, "download_checksums": null, "download_size": null, "post_processing_size": null, "dataset_size": null, "size_in_bytes": null},
3
+ "uk_osgb": {"description": "The EUMETSAT Spinning Enhanced Visible and InfraRed Imager (SEVIRI) rapid scanning service (RSS) takes an image of the northern third of the Meteosat disc every five minutes (see the EUMETSAT website for more information on SEVIRI RSS ). The original EUMETSAT dataset contains data from 2008 to the present day from 12 channels, and for a wide geographical extent covering North Africa, Saudi Arabia, all of Europe, and Western Russia. In contrast, this dataset on Google Cloud is a small subset of the entire SEVIRI RSS dataset: This Google Cloud dataset is from a single channel: the \"high resolution visible\" (HRV) channel; and contains data from January 2020 to November 2021. The geographical extent of this dataset on Google Cloud is a small subset of the total SEVIRI RSS extent: This Google Cloud dataset includes data over the United Kingdom and over North Western Europe.\n\nThis dataset is slightly transformed: It does not contain the original numerical values. \n\nThe original data is copyright EUMETSAT. EUMETSAT has given permission to redistribute this transformed data. The data was transformed by Open Climate Fix using satip.\n\nThis public dataset is hosted in Google Cloud Storage and available free to use. \n", "citation": "@InProceedings{eumetsat:ocf_uk_hrv,\ntitle = {EUMETSAT SEVIRI RSS UK HRV},\nauthor={EUMETSAT, with preparation by Open Climate Fix\n},\nyear={2022}\n}\n", "homepage": "https://console.cloud.google.com/marketplace/product/bigquery-public-data/eumetsat-seviri-rss-hrv-uk?project=tactile-acrobat-249716", "license": "Cite EUMETSAT as the data source. This data is redistributed with permission from EUMETSAT under the terms of the EUMETSAT Data Policy for SEVIRI data with a latency of >3 hours . This redistributed dataset is released under the CC BY 4.0 open data license & is provided \"AS IS\" without any warranty, express or implied, from Google. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"timestamp": {"dtype": "time64[ns]", "id": null, "_type": "Value"}, "image": {"shape": [891, 1843], "dtype": "int16", "id": null, "_type": "Array2D"}, "x_coordinates": {"shape": [891, 1843], "dtype": "float64", "id": null, "_type": "Array2D"}, "y_coordinates": {"shape": [891, 1843], "dtype": "float64", "id": null, "_type": "Array2D"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "eumetsat_uk_hrv_dataset", "config_name": "uk_osgb", "version": {"version_str": "1.2.0", "description": null, "major": 1, "minor": 2, "patch": 0}, "splits": null, "download_checksums": null, "download_size": null, "post_processing_size": null, "dataset_size": null, "size_in_bytes": null}}
eumetsat_uk_hrv.py CHANGED
@@ -47,13 +47,14 @@ _URL = "gs://public-datasets-eumetsat-solar-forecasting/satellite/EUMETSAT/SEVIR
47
  class EumetsatUkHrvDataset(datasets.GeneratorBasedBuilder):
48
  """This dataset consists of the HRV channel from the EUMETSAT SEVIRI RSS service covering the UK from 2020 to 2021."""
49
 
50
- VERSION = datasets.Version("1.1.0")
51
  BUILDER_CONFIGS = [
52
  datasets.BuilderConfig(name="uk", version=VERSION, description="This part of the dataset covers the UK"),
 
53
  datasets.BuilderConfig(name="uk_video", version=VERSION, description="This dataset is for video prediction")
54
  ]
55
 
56
- DEFAULT_CONFIG_NAME = "uk" # It's not mandatory to have a default configuration. Just use one if it make sense.
57
 
58
  def _info(self):
59
  if self.config.name == "uk":
@@ -65,6 +66,15 @@ class EumetsatUkHrvDataset(datasets.GeneratorBasedBuilder):
65
  "y_coordinates": datasets.Sequence(datasets.Value("float64"))
66
  }
67
  )
 
 
 
 
 
 
 
 
 
68
  else:
69
  features = datasets.Features(
70
  {
@@ -126,6 +136,14 @@ class EumetsatUkHrvDataset(datasets.GeneratorBasedBuilder):
126
  "y_coordinates": entry.y.values,
127
  "image": entry.values,
128
  }
 
 
 
 
 
 
 
 
129
  else:
130
  # Get current time and go backwards an hour and forward 2 hours
131
  start_time = timestamp - pd.Timedelta("55 minutes")
 
47
  class EumetsatUkHrvDataset(datasets.GeneratorBasedBuilder):
48
  """This dataset consists of the HRV channel from the EUMETSAT SEVIRI RSS service covering the UK from 2020 to 2021."""
49
 
50
+ VERSION = datasets.Version("1.2.0")
51
  BUILDER_CONFIGS = [
52
  datasets.BuilderConfig(name="uk", version=VERSION, description="This part of the dataset covers the UK"),
53
+ datasets.BuilderConfig(name="uk_osgb", version=VERSION, description="This part of the dataset covers the UK in OSGB coordinates"),
54
  datasets.BuilderConfig(name="uk_video", version=VERSION, description="This dataset is for video prediction")
55
  ]
56
 
57
+ DEFAULT_CONFIG_NAME = "uk_osgb" # It's not mandatory to have a default configuration. Just use one if it make sense.
58
 
59
  def _info(self):
60
  if self.config.name == "uk":
 
66
  "y_coordinates": datasets.Sequence(datasets.Value("float64"))
67
  }
68
  )
69
+ elif self.config.name == "uk_osgb":
70
+ features = datasets.Features(
71
+ {
72
+ "timestamp": datasets.Value("time64[ns]"),
73
+ "image": datasets.Array2D(shape=(891,1843), dtype="int16"),
74
+ "x_coordinates": datasets.Array2D(shape=(891,1843), dtype="float64"),
75
+ "y_coordinates": datasets.Array2D(shape=(891,1843), dtype="float64")
76
+ }
77
+ )
78
  else:
79
  features = datasets.Features(
80
  {
 
136
  "y_coordinates": entry.y.values,
137
  "image": entry.values,
138
  }
139
+ elif self.config.name == "uk_osgb":
140
+ entry = sat_data.sel(time=timestamp)
141
+ yield key, {
142
+ "timestamp": entry.time.values,
143
+ "x_coordinates": entry.x_osgb.values,
144
+ "y_coordinates": entry.y_osgb.values,
145
+ "image": entry.values,
146
+ }
147
  else:
148
  # Get current time and go backwards an hour and forward 2 hours
149
  start_time = timestamp - pd.Timedelta("55 minutes")