pv-system-profiler
Estimating PV array location and orientation from real-world power datasets.
Science Score: 20.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 7 committers (14.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Repository
Estimating PV array location and orientation from real-world power datasets.
Basic Info
- Host: GitHub
- Owner: slacgismo
- License: bsd-2-clause
- Language: Jupyter Notebook
- Default Branch: master
- Size: 6.58 MB
Statistics
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 4
- Releases: 0
Metadata Files
README.md
pv-system-profiler
Estimating PV array location and orientation from real-world power datasets.
| Latest Release |
|
| License |
|
| Build Status |
|
| Code Quality |
|
| Publications |
|
| PyPI Downloads |
|
| Conda Downloads |
|
Install & Setup
1) Recommended: Set up conda environment with provided .yml file
We recommend setting up a fresh Python virtual environment in which to use pv-system-profiler. We recommend using the Conda package management system, and creating an environment with the environment configuration file named pvi-user.yml, provided in the top level of this repository. This will install the statistical-clear-sky and solar-data-tools packages as well.
Creating the env:
bash
$ conda env create -f pvi-user.yml
Starting the env:
bash
$ conda activate pvi_user
Stopping the env
bash
$ conda deactivate
Additional documentation on setting up the Conda environment is available here.
2) PIP Package
sh
$ pip install pv-system-profiler
Alternative: Clone repo from GitHub
Mimic the pip package by setting up locally.
bash
$ pip install -e path/to/root/folder
3) Anaconda Package
sh
$ conda install -c slacgismo pv-system-profiler
Solver Dependencies
Refer to solar-data-tools documentation to get more info about solvers being used.
Usage / Run Scripts
Serial run
The parameter_estimation_script.py script creates a report of all systems based on the csv files with the system signals located in a given folder.
The script takes all input parameters as kwargs. The example below illustrates the use of reportscript:
```shell
python 'repository location of run script'/parameterestimationscript.py report None all
s3://s3bucketwithsignals/ 'repeatingpartof label' /home/results.csv True False
False False s3://'s3pathtofilecontainingmetadata/metadata.csv' None s3
``
In the example above the full path toparameterestimationscript.pyis specified to run a
report. The script allows to provide acsvfile with list of sites to be analyzed. In this case no list is provided
and therefore thekwargNoneis entered. The script also allows to run an analysis on the firstnfilescontaining
input signals in thes3repository. In this, case theallkwargspecifies that all input signals are to be analyzed.
In this example, allcsvfiles containing the input signals are located in thes3bucket with the name
s3://s3bucketwithsignals/. Usually thesecsvfiles are of the formIDrepeatingpartoflabel.csv, for example:
1composite10.csv,2composite10.csv, wherecomposite10is the repeating part of the label. The repeating part
of the label is either None or a string as in the example above. Next, an absolute path to the desired location of the
results file is provided, in this case/home/results.csv. The two followingkwargsare type Boolean and are used to set the
values of thecorrecttzandfixshiftspipelinekwargs. The nextkwarg,checkjsonis also Boolean. It
is used to indicate if there is ajsonfile present ins3://s3bucketwithsignals/with additional site information
that is to be analyzed. The next Booleankwargis used to set theconverttotskwargwhen instantiating the data
handler. The nextkawrgcontains the full path to thecsvfile containing site metadata, here calledmetadata.csv.
The information that this file should contain varies depending on theestimationto be performed. This file is
optional and thekwargcan be set toNone. For the case of areport, acsvfile with columns labeledsite,
systemandgmtoffsetand their respective values need to be provided. Alternatively, if thegmtoffsetkwarg,
the nextkwarg(in the example above set toNone), has a numeric
value different toNone, all sites will use that single value when running the report. For the case of thereport
estimation, the metadata file should containsite,systemandgmtoffsetcolumns with the respective
values for each system. For the case of thelongitudeestimation, the metadata file should containsite,system
andlatitudecolumns with the respective values for each system. For the case of thetiltazimuthestimation, the
metadata file should containsite,system,gmtoffset,estimatedlongitudeandestimatedlatitude,tilt,
azimuthcolumns and with the respective values for each system. Additionally, if a manual inspection for time shifts
was performed, another
column labeledtimeshiftmanualhaving a zero for systems with no time shift and ones for systems with time shift
may be included. If atimeshiftmanualcolumn is included, it will be used to determine whether thefixdst()
method is run after instantiating the data handler. The nextkarg isgmtoffsetand in this case it is set to None.
The last kwarg corresponds to thedatasource. In this case the value iss3since files with the input signals are
located in ans3bucket.
## Partitioned run
A script that runs the site report, the longitude, latitude and tilt and azimuth scripts using a number of prescribed
Amazon Web Services (AWS), instances is provided. The script reads the folder containing the system signals and
partitions these signals to run in anuser prescribed AWS instances in parallel. Here is an example shell command
for a partitioned run:
``shell
python 'repository location of run script'/runpartitionscript.py parameterestimationscript.py report None all
s3://s3bucketwithsignals/ 'repeatingpartof label' /home/results.csv True False
False False s3://'s3pathtofilecontainingmetadata/metadata.csv' None s3
'repository location of run script'/parameterestimationscript.py pvi-dev myinstance
``
where the individual value of each kwarg are defined in run_partition_script.py. This script takes the same inputs as
theparameterestimationscript.pyplus three additional parameters. Note that the first kwarg is the partitioning
script repository location of run script/runpartitionscript.py parameterestimationscript.py. The estimation run
script/parameterestimationscript.pis specified as the third to last kwarg. The second to last kwarg is the conda
enviroment to be used to run the estimation, in this casepvi-dev. The last kwarg is the name of the AWS instances to
be used to runrunpartitionscript.py, in this casemyinstance. Previous to running this command it is necessary to createnidentical AWS
instances that correspond to the number of desired partitions. These instances need to have the same
Name='instance name'AWS tag. The simplest way to accomplish this is by parting from an AWS image of a previously
configured instance. This image needs to have all the repositories and conda environments that
would be needed in a serial run. Once each partitioned run is finished, results will be automatically collected in the
local folder whererunpartition_script.py` was run.
Unit tests
In order to run unit tests:
python -m unittest -v
Test Coverage
In order to view the current test coverage metrics:
coverage run --source pvsystemprofiler -m unittest discover && coverage html
open htmlcov/index.html
Versioning
We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details
Owner
- Name: SLAC GISMo
- Login: slacgismo
- Kind: organization
- Email: slacgismo@gmail.com
- Location: SLAC National Accelerator Laboratory, Menlo Park, CA 94025
- Website: https://gismo.slac.stanford.edu/
- Repositories: 65
- Profile: https://github.com/slacgismo
100% Clean Energy for All
GitHub Events
Total
Last Year
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Londono | l****h@p****e | 423 |
| alh | a@a****n | 132 |
| alh | a@a****l | 81 |
| Bennet Meyers | b****m@s****u | 45 |
| elpiniki | e****i@g****m | 36 |
| Derin Serbetcioglu | s****d@g****m | 22 |
| Elpiniki Apostolaki | e****i@s****m | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 4
- Total pull requests: 29
- Average time to close issues: 6 months
- Average time to close pull requests: 14 days
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.25
- Average comments per pull request: 0.38
- Merged pull requests: 26
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- alejandro350 (2)
- derins (1)
- bmeyers (1)
Pull Request Authors
- alejandro350 (15)
- derins (8)
- bmeyers (6)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 209 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: pv-system-profiler
- Homepage: https://github.com/slacgismo/pv-system-profiler
- Documentation: https://pv-system-profiler.readthedocs.io/
- License: BSD License
-
Latest release: 0.1.4
published almost 5 years ago
Rankings
Maintainers (1)
Dependencies
- boto3 *
- cvxpy >=1.1.0
- haversine *
- jupyter *
- matplotlib *
- numpy >=1.19.2
- pandas *
- pykml *
- scikit-learn *
- scipy *
- solar-data-tools *
- urllib3 *
- dependencies *