ocf-data-sampler 0.0.28__py3-none-any.whl → 0.0.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ocf-data-sampler might be problematic. Click here for more details.
- {ocf_data_sampler-0.0.28.dist-info → ocf_data_sampler-0.0.30.dist-info}/METADATA +67 -7
- {ocf_data_sampler-0.0.28.dist-info → ocf_data_sampler-0.0.30.dist-info}/RECORD +5 -5
- {ocf_data_sampler-0.0.28.dist-info → ocf_data_sampler-0.0.30.dist-info}/WHEEL +1 -1
- {ocf_data_sampler-0.0.28.dist-info → ocf_data_sampler-0.0.30.dist-info}/LICENSE +0 -0
- {ocf_data_sampler-0.0.28.dist-info → ocf_data_sampler-0.0.30.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ocf_data_sampler
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.30
|
|
4
4
|
Summary: Sample from weather data for renewable energy prediction
|
|
5
5
|
Author: James Fulton, Peter Dudfield, and the Open Climate Fix team
|
|
6
6
|
Author-email: info@openclimatefix.org
|
|
@@ -42,26 +42,79 @@ Requires-Dist: pandas
|
|
|
42
42
|
Requires-Dist: xarray
|
|
43
43
|
Requires-Dist: zarr
|
|
44
44
|
Requires-Dist: dask
|
|
45
|
-
Requires-Dist:
|
|
45
|
+
Requires-Dist: ocf_blosc2
|
|
46
46
|
Requires-Dist: pvlib
|
|
47
47
|
Requires-Dist: pydantic
|
|
48
48
|
Requires-Dist: pyproj
|
|
49
49
|
Requires-Dist: pathy
|
|
50
|
-
Requires-Dist:
|
|
50
|
+
Requires-Dist: pyaml_env
|
|
51
51
|
Requires-Dist: pyresample
|
|
52
52
|
Provides-Extra: docs
|
|
53
53
|
Requires-Dist: mkdocs>=1.2; extra == "docs"
|
|
54
54
|
Requires-Dist: mkdocs-material>=8.0; extra == "docs"
|
|
55
55
|
|
|
56
|
-
#
|
|
56
|
+
# ocf-data-sampler
|
|
57
|
+
|
|
57
58
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
58
59
|
[](#contributors-)
|
|
59
60
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
60
|
-
[](https://github.com/openclimatefix/ocf-meta-repo?tab=readme-ov-file#overview-of-ocfs-nowcasting-repositories)
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
[](https://github.com/openclimatefix/ocf-data-sampler/tags)
|
|
63
|
+
[](https://github.com/openclimatefix#how-easy-is-it-to-get-involved)
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
**ocf-data-sampler** contains all the tools needed to create batches and feed them to our models, such as [PVNet](https://github.com/openclimatefix/PVNet/). The data we work with—typically energy data, satellite imagery, and numerical weather predictions (NWPs)—is usually too heavy to do this on the fly, so that's where this repo comes in: handling steps like opening the data, selecting the right samples, normalising and reshaping, and saving to and reading from disk.
|
|
66
|
+
|
|
67
|
+
We are currently migrating to this repo from [ocf_datapipes](https://github.com/openclimatefix/ocf_datapipes/), which performs the same functions but is built around `PyTorch DataPipes`, which are quite cumbersome to work with and are no longer maintained by PyTorch. **ocf-data-sampler** uses `PyTorch Datasets`, and we've taken the opportunity to make the code much cleaner and more manageable.
|
|
68
|
+
|
|
69
|
+
> [!Note]
|
|
70
|
+
> This repository is still in development and does not yet have the full
|
|
71
|
+
> functionality of its predecessor, [ocf_datapipes](https://github.com/openclimatefix/ocf_datapipes/).
|
|
72
|
+
> It might not be ready for use out of the box! We would really appreciate any help to let us make the transition faster.
|
|
73
|
+
|
|
74
|
+
## Documentation
|
|
75
|
+
|
|
76
|
+
**ocf-data-sampler** doesn't have external documentation _yet_; you can read a bit about how our torch datasets work in the Readme [here]([torch datasets documentation](ocf_data_sampler/torch_datasets/README.md)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## FAQ
|
|
81
|
+
|
|
82
|
+
If you have any questions about this or any other of our repos, don't hesitate to hop to our [Discussions Page](https://github.com/orgs/openclimatefix/discussions)!
|
|
83
|
+
|
|
84
|
+
### How does ocf-data-sampler deal with data sources that use different projections (e.g. some are in latitude-longitude, and some in OSGB)?
|
|
85
|
+
|
|
86
|
+
When creating samples, we make a spatial crop of a preset size centred around a point of interest (POI, usually a solar or wind farm). The size of the crop is set not in miles or kilometres, but in 'pixels', which would be different for different data sources, depending on their spatial resolution, projections they use, and where the POI is. For example, a latitude-longitude source with a 1° resolution will have pixel sizes corresponding to very different 'surface' distances (that you might measure in, e.g., kilometres) from a source with 0.1° resolution. The pixel size will even be different for the same source depending on how close the POI is to the equator!
|
|
87
|
+
|
|
88
|
+
Instead of trying to accommodate for all these differences and make all the sources use the same spatial grid, we translate the POI's position into the corresponding coordinate system and select the crop using the source's original grid. This 'snapshot' is then passed to the model with no additional information on what specific coordinates it represents; instead, since the size is always the same and the POI is always in the centre, the model gets consistent information on the measurements at a location near the POI and how it affects the target, without any explicit knowledge of where that location is in coordinate system terms.
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
You can install **ocf-data-sampler** for development as follows:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
pip install git+https://github.com/openclimatefix/ocf-data-sampler.git
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Running the test suite
|
|
99
|
+
|
|
100
|
+
The tests in this project use `pytest`. Once you have it installed, you can run it from the project's directory:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
cd ocf-data-sampler
|
|
104
|
+
pytest
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Contributing and community
|
|
108
|
+
|
|
109
|
+
[](https://github.com/openclimatefix/ocf-data-sampler/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
|
|
110
|
+
|
|
111
|
+
- PR's are welcome! See the [Organisation Profile](https://github.com/openclimatefix) for details on contributing
|
|
112
|
+
- Find out about our other projects in the [OCF Meta Repo](https://github.com/openclimatefix/ocf-meta-repo)
|
|
113
|
+
- Check out the [OCF blog](https://openclimatefix.org/blog) for updates
|
|
114
|
+
- Follow OCF on [LinkedIn](https://uk.linkedin.com/company/open-climate-fix)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Contributors
|
|
65
118
|
|
|
66
119
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
67
120
|
|
|
@@ -86,3 +139,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
86
139
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
87
140
|
|
|
88
141
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
*Part of the [Open Climate Fix](https://github.com/orgs/openclimatefix/people) community.*
|
|
146
|
+
|
|
147
|
+
[](https://openclimatefix.org)
|
|
148
|
+
|
|
@@ -59,8 +59,8 @@ tests/select/test_select_spatial_slice.py,sha256=7EX9b6g-pMdACQx3yefjs5do2s-Rho2
|
|
|
59
59
|
tests/select/test_select_time_slice.py,sha256=QOhoR3qsr7RBGze4yohcViZ-ad1zYQzIKzxlnf0ymnU,9603
|
|
60
60
|
tests/torch_datasets/test_pvnet_uk_regional.py,sha256=8gxjJO8FhY-ImX6eGnihDFsa8fhU2Zb4bVJaToJwuwo,2653
|
|
61
61
|
tests/torch_datasets/test_site.py,sha256=yTv6tAT6lha5yLYJiC8DNms1dct8o_ObPV97dHZyT7I,2719
|
|
62
|
-
ocf_data_sampler-0.0.
|
|
63
|
-
ocf_data_sampler-0.0.
|
|
64
|
-
ocf_data_sampler-0.0.
|
|
65
|
-
ocf_data_sampler-0.0.
|
|
66
|
-
ocf_data_sampler-0.0.
|
|
62
|
+
ocf_data_sampler-0.0.30.dist-info/LICENSE,sha256=F-Q3UFCR-BECSocV55BFDpn4YKxve9PKrm-lTt6o_Tg,1073
|
|
63
|
+
ocf_data_sampler-0.0.30.dist-info/METADATA,sha256=_sEqiiKsSKus0oV95-j_DC8tnRlWDBwpNTAK_96YAHc,9590
|
|
64
|
+
ocf_data_sampler-0.0.30.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
65
|
+
ocf_data_sampler-0.0.30.dist-info/top_level.txt,sha256=Faob6N6cFdPc5eUpCTYcXgCaNhi4XLLteUL5W5ayYmg,31
|
|
66
|
+
ocf_data_sampler-0.0.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|