GithubHelp home page GithubHelp logo

nrel / developer.nrel.gov Goto Github PK

View Code? Open in Web Editor NEW
43.0 23.0 39.0 9.35 MB

An issue tracker for NREL's APIs available at https://developer.nrel.gov

Ruby 0.24% HTML 90.48% JavaScript 8.45% Dockerfile 0.06% Shell 0.03% SCSS 0.74%

developer.nrel.gov's Introduction

developer.nrel.gov

Have questions, feedback, or issues with the APIs available at developer.nrel.gov? Contact us or let us know in the issue tracker.

This repository stores the website content and documentation for developer.nrel.gov. Contributions are welcome. To submit a change, fork this repo, commit your changes, and send us a pull request.

Development

The content files to edit are in ./source. To preview your changes you can use the Middleman preview server. To run Middleman:

  1. Install Docker on your computer.
  2. Checkout the developer.nrel.gov repository on your computer (git clone https://github.com/NREL/developer.nrel.gov.git).
  3. Inside the developer.nrel.gov directory, run docker-compose up.
  4. View your changes at: http://localhost:4480/

Linting

If you're working on Swagger documentation, you can run rake lint locally to check for potential warnings or errors with the Swagger specification files.

Deploy

  • Changes committed to the staging branch will automatically be deployed to the staging site.
  • Changes committed to the master branch will automatically be deployed to the production site.

Deploys may take a few minutes after pushing before they show up. You can check the status via the Actions tab above.

developer.nrel.gov's People

Contributors

amj133 avatar anyaelena avatar dependabot[bot] avatar edatrix avatar enitz avatar erose357 avatar gui avatar gweissman86 avatar haikusky avatar hdunham avatar jasonferrier avatar jeffcappellucci avatar jhheila avatar kandersolar avatar ksk5280 avatar mrahill avatar nreinicke avatar oakley808 avatar pjedwards avatar psusmars avatar razzius avatar reger avatar rock-bautumn avatar t-kwasnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developer.nrel.gov's Issues

Geocoding Questionable Addresses

A downstream user observed that the following returns a result with no less certainty than a search for a valid address: https://developer.nrel.gov/api/utility_rates/v3.xml?api_key=MY_KEY&address=Scientific+Gobbledy+Gook+SC

The documentation says you're using Google Geocode to resolve addresses, but searching for this same bogus address through the Google Geocode API directly does not return a result: https://maps.googleapis.com/maps/api/geocode/xml?address=Scientific%20Gobbledy%20Gook%20SC&key=MY_GOOGLE_KEY

If this API is deprecated, maybe you could just update the documentation to identify the actual Geocoding service in use. If the API is not deprecated, is a certainty param available?

Make our API documentation public in github

We should use this repository to store our API documentation so we can more easily accept edits via pull requests.

Our documentation is already stored in an internal github repo that lends itself to easily opening up, we mainly just need to first figure out some of our internal processes for staging branches of documentation that are currently in progress.

National Solar Radiation Database API (sscapi) Problem

I'm not sure sure if this is a problem with the API or on my part, but the channels of support seem rather limited, so I wanted to ask here in case it helps my chances of getting an answer.

Here is my question.

I get the following error when trying to run a SAM simulation (step 2 here: https://nsrdb.nrel.gov/api-instructions). I'm unsure of what this error actually means, but from what it seems, it says the ssc.dylib is not found, but it is indeed in the directory. I leave the path site.addsitedir('/Applications/sam-sdk-2015-6-30-r3/languages/python/'), because I simply put the SDK in my Applications folder, so this should not be the problem. I have a csv file from Step 1 that I want to perform a simulation on, but I just can't get past this error for some reason. Any ideas?


OSError Traceback (most recent call last)
in ()
4 site.addsitedir('/Applications/sam-sdk-2015-6-30-r3/languages/python/')
5 import sscapi
----> 6 ssc = sscapi.PySSC()
7
8 # Resource inputs for SAM model:

/Applications/sam-sdk-2016-3-14-r3/languages/python/sscapi.pyc in init(self)
21 self.pdll = CDLL("ssc.dll")
22 elif sys.platform == 'darwin':
---> 23 self.pdll = CDLL("ssc.dylib")
24 elif sys.platform == 'linux2':
25 self.pdll = CDLL('ssc.so') # instead of relative path, require user to have on LD_LIBRARY_PATH

/Users/Florin/anaconda2/lib/python2.7/ctypes/init.pyc in init(self, name, mode, handle, use_errno, use_last_error)
360
361 if handle is None:
--> 362 self._handle = _dlopen(self._name, mode)
363 else:
364 self._handle = handle

OSError: dlopen(ssc.dylib, 6): image not found

Thanks,

Florin

Undefined Variable: "$font-family-base"

execute ./bin/middleman server and view http://localhost:4567 and see error:
Error Compiling CSS Asset Sass:SyntaxError: Undefined Variable: "$font-family-base"

execute ./bin/middleman build fails with error:
Undefined variable: "$font-family-base". (Sass::SyntaxError)

I just merged the latest from the home repo into my fork an hour ago.
Seems like a variable needs to be defined somewhere, but where?

CORS header caching problem.

There is a small bug with your API when using CORS. I am using your Transportation, Alternative Fuel Stations API, and I can get the data with no problem the first time. However, if I go to another website that pulls the same API, the API uses the origin from the last website used. It seems to be a caching problem with the headers. Below is the error I see in the console in Chrome (on windows 7).

XMLHttpRequest cannot load https://developer.nrel.gov/api/alt-fuel-stations/v1.json?fuel_type=ELEC&ev_. The 'Access-Control-Allow-Origin' header has a value 'https://www.first-url.com' that is not equal to the supplied origin. Origin 'https://second-url.com' is therefore not allowed access.

Can you please look into the headers to make sure they are not caching?

Alternatively, you could add a JSONP file format. This would be would be much easier, and would eliminate this problem. All that needs to be done is to add the current JSON format into a callback function.

Please let me know if I can help.

View all available APIs on one page

Feedback from our API Usability Testing: Right now, our browsing of documentation and available APIs is very hierarchal, since you have to drill down via technology type (buildings, transportation, etc). One participant suggested it would be nice to have a way to view all the APIs on a single page. We don't really have that many, so while a technology-based approach might make sense to some, it makes it difficult to get a broad overview of the APIs NREL provides.

Wind Toolkit Data API returns ZIP files, not friendly for consuming

Feedback from our API Usability Testing: The Wind Toolkit Data API returns a ZIP file containing a CSV. This makes it inconvenient to deal with for a few reasons:

  • ZIP files aren't immediately consumable. They must first be saved and then decompressed before use, which is not convenient for API consumers.
  • Errors are returned as JSON, making things inconsistent and meaning the client has to account for parsing both JSON and zip files.
  • It's not clear that ZIP files save any sort of bandwidth, since we could gzip the straight CSV response. This would allow any client that supports the more standard gzip compression to transparently receive a compressed response without having to deal with temporary files.

Don't require a website to signup for an API key

On our signup page, we currently require a website to signup. We've had several people confused or put off from registering because this was a required field. With APIs being used by researchers, in mobile apps, etc, it's becoming more common that a developer may not have a website to associate their registration with. I think we should remove this field from the signup, or at least make it optional.

Duplicate dates

I recently accessed the PSM3 API. I noticed that 2-28 hour 0-23 was repeated twice in the set when looking at the tmy series.

Request rejected?

This is a follow up to issue #89, 504 Gateway Timeout Error. I am still having problems with the solar nsrdb_9105 data set. I get a different response now:

Request rejected

An error has occurred. Please consult with your administrator.

Your support ID is: 8236775082270549914

Request rejected? (again)

This is a follow up to Issue #90

#90

The same error is occurring again after 2 months of operational bliss. Here is the specific response I get this time:

Request Rejected

An error has occurred. Please consult with your administrator.

Your support ID is: 9946171700951584224

Wind API: Data Source?

I'd like to know where can I find documentation regarding what is the data source of the wind API.

For instance, does all the sites have anemometers at 100 m? Is there a list that contains all the available Site Ids?

data no longer available for Guam?

I had been using the NSRDB 9105 API download until recently, when I started receiving this message:

"This API has been permanently taken out of service. Please use https://developer.nrel.gov/docs/solar/nsrdb/psm3_data_download/"

I have made the switch and its mostly working fine except for when I attempt to access data for Guam, which had been working with the old API. With the new one, I now receive the message:

"The 'wkt' parameter did not match any known data points."

For this request, the parameter is "wkt":"POINT(144.8 13.48333)"

This is the same wkt parameter I had been using for the old API. Is there a way, either through modifying my request or using a different API, that I can access the data for Guam and other US territories?

Add API changelogs

I think we should start maintaining public CHANGELOGs for our individual APIs. In a variety of cases, we continue to add new features to a specific version of an API (while maintaining backwards compatibility), but we don't necessarily do a good job announcing those enhancements or making the history of the API publicly available. While we could do a lot more to announce changes, a simple CHANGELOG of dates and when things happened for each API would be a good, simple place to start.

PVWatts API doesn't return correct data for international locations that are very close to US border and for which the weather station happens to be in the US

I used the following URL to find station data for a location in Ciudad Juarez, Chihuahua, Mexico:
http://developer.nrel.gov/api/pvwatts/v5.json?api_key=DEMO_KEY&lat=31.7219062&lon=-106.4040952&system_capacity=4&azimuth=180&tilt=40&array_type=1&module_type=1&losses=10&dataset=intl

In response, I got an error (422) suggesting that "No climate data found with dataset=intl for location specified: lat=31.7219062 lon=-106.4040952"

The problem here is that Cd Juarez is very close to the US border and the closest station happens to be in El Paso, TX, which is NOT an international location from US' perspective, therefore dataset=intl returns an error.

Note that invoking the same URL without dataset param altogether OR with dataset=tmy2 OR dataset=tmy3 does return a result and not an error.

Ideally, should not the API take care of returning an appropriate result in scenarios wherein the "international" location is typically served by a "domestic" station?

Missing background images on home page

This is a small issue, but we used to have some background images in the gray boxes on the home page. They went missing in the recent transition of this site over to Middleman.

Actually, they show up in local development mode in Middleman, they're just missing from the production site. So it's likely related to the middleman build/compilation process (I think these background images are sprites, so it might be something funky with the Compass sprite setup).

Use of coded values in the API calls and responses

Feedback from our API Usability Testing: Using less code values or more descriptive code values would make the APIs easier to use. An example of coded values can be seen in the alt fuel stations api. There you would pass in status=E for only open stations, which is not descriptive or intuitive. Something like status=open would be easier to understand. Some of our other code values might be slightly more descriptive, but they could definitely use improving (for example, in fuel types, CNG is a common abbreviation for compressed natural gas, but BD isn't necessarily as obvious for biodiesel).

Internal Error: Cannot Get Data

I can't figure out what exactly i'm doing wrong.
I've made several calls with similarly structure API calls and it has worked: just doesn't work for this case.

API call: "https://developer.nrel.gov/api/pvwatts/v5.xml?api_key=i7f73IZcUPetV8F7q7fUSHIehF7J1QwwIhah1H6b&lat=32.4725&lon=-99.5443&system_capacity=300000&azimuth=180&timeframe=hourly&array_type=0&tilt=40&module_type=0&losses=10&dataset=tmy3&radius=0"

32.4725 -99.5443 300000 180 hourly 0 40 0 10 tmy3 0 An internal error occurred in the pvwattsv5 module. 1.2.0 45 Linux 64 bit GNU/C++ Jul 7 2015 14:24:09

Solar API output does not match GUI output.

GUI (http://pvwatts.nrel.gov/) returns deffirent numbers from the api (https://developer.nrel.gov/docs/solar/pvwatts-v5/)
Am I missing something or is the GUI have some extra math that the API does not?

Example below.

A request for 3400 Rainshore Drive Katy, TX 77449 with

setting value
DC System Size 3.135kW
Module Type Standard
Array Type Fixed (roof mount)
Array Tilt 30°
Array Azimuth
System Losses 14%
Inverter Efficiency 96%
DC to AC Size Ratio 1.1

Returns

Result GUI API force same station API By Home Lat/lng By Home Lat/lng force data set tmy2 By Home Lat/lng force data set tmy3
Solar Radiation (kWh/m2 /day) Annual 3.30 3.303879976272583 3.30550313 3.3055031299591 3.13447737693786
AC Energy (kWh) Annual 2,806 2,868.18798828125 2850.72583 2850.72583007812 2683.48828125
API URL GUI x x x x

Hourly AC system output array dose not give date and time?

Can any one help me to understand while using PVWatts V5 API with timeframe=hourly, how to relate ac output array to the actual time. I have noticed array has 8760 element, dose this means next 8760 hrs or is it for the current year starting from Jan 1st.

Thanks for you support.

I am not getting dataset for some of the locations

I am using this api to get the dataset to calculate the solar system performance . this is the api i am using

developer.nrel.gov/api/pvwatts/v5.json?api_key=***********************8&lat=56.26392&lon=9.50178500000004&system_capacity=4&azimuth=180&tilt=20&array_type=0&module_type=0&losses=12.32&inv_eff=96&dataset=intl&timeframe=hourly

this is not working . response is
{"inputs":{"lat":"56.26392","lon":"9.50178500000004","system_capacity":"4","azimuth":"180","tilt":"20","array_type":"0","module_type":"0","losses":"12.32","inv_eff":"96","dataset":"intl","timeframe":"hourly"},"errors":["No climate data found with dataset=intl for location specified: lat=56.26392 lon=9.50178500000004"],"warnings":[],"version":"1.2.0","ssc_info":{"version":45,"build":"Linux 64 bit GNU/C++ Jul 7 2015 14:24:09"},"outputs":{}}

while this url is showing me the data

``
http://developer.nrel.gov/api/pvwatts/v5.json?api_key=*******************&lat=40.4167754&lon=-3.7037901999999576&system_capacity=4&azimuth=180&tilt=20&array_type=0&module_type=0&losses=12.32&inv_eff=96&dataset=intl&timeframe=hourly

``

how to use file_id in PVWatts v.5

Newbie here. I'd expect the following query to work (using the TMY2 solar file name returned from a previous lat-long-based query):

https://developer.nrel.gov/api/pvwatts/v5.json?api_key=DEMO_KEY&file_id="93738.tm2"&system_capacity=4&azimuth=180&tilt=40&array_type=1&module_type=1&losses=10

but it returns

"errors":["Unable to load data file for file_id specified: "93738.tm2""]

leaving out various combinations of quote marks and the tm2 name extension don't help; can you?

confusion about file download

Hi. I would like to download the weather and also the PV power generation data in a specific location, I can download the first part but I stuck doing the second part. Is this data available? is there any better manual using the data rather than this ? https://nsrdb.nrel.gov/api-instructions ? I could not understand how to make different url for the mentioned datasets. no clear link to the file naming and making the actual url.
I would appreciate it if you make it more clear for a usual user.

Regards

504 Gateway Timeout error

I've started receiving this error on requests to the solar nsrdb_9105 data set after a very long wait period. The code and URL requests generating this error worked as recently as yesterday. Any idea on what the problem might be? here is a sample url generating this (this is the sample url from the documentation)

https://developer.nrel.gov/api/solar/nsrdb_9105_download.json?api_key=DEMO_KEY&full_name=Sample+User&[email protected]&affiliation=Test+Organization&reason=Example&mailing_list=true&wkt=POINT(-104.6777+38.2726)&names=1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005&attributes=dhi,dni,ghi,dew_point,temp_dryb,atm_pres,rel_hum,etr,etrn,precip_wat,aer_opt_dpth,wind_spd&leap_day=true&utc=true

Fix broken JSONP requests

On a couple of our APIs where we still support JSONP (notably PVWatts and the Alt Fuel Stations), it looks like today's system upgrades broke the JSONP functionality. Due to some internal app updates, these specific APIs began returning a X-Content-Type-Options: nosniff header, which then broke JSONP requests in some browsers with this error:

Refused to execute script from '*' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.

I think we can remove this new header to restore our previous JSONP functionality.

Timezone of hourly results

Hi,
When using pvwatts-v5, what is the timezone of the hours in the ac/dc/etc.. array when the timeframe=hourly ?

In other words, does it starts at 2017-01-01T00:00:00-00:00 or 2017-01-01T00:00:00-07:00.

Thanks

Error HTTP: 429

I keep getting Error HTTP: 429 when using python's API (following your guidelines on https://nsrdb.nrel.gov/api-instructions). I've been using a sleep timer between requests of 3.7 seconds to prevent violating the hourly limit of 1,000 requests per hour. However, after 40-50 iterations of coordinate positions, I get error HTTP: 429. Could you please let me know why is this happening?

Returning dates/times as unix timestamps vs ISO strings

Feedback from our API Usability Testing: One of the participants preferred if all times being returned from our APIs would be returned as unix timestamp integers. I think most of our APIs typically return things times as ISO 8601 strings. The preference for unix timestamps is that they can be added and subtracted directly without having to first parse and create date objects in your language based on the ISO 8601 string.

PvWatts Address format

what is appropriate address format for PvWatts API call.

Since i am calling the API for Perth , WA , but it seems API not resolving the input address e.g. "6 Michael Cres, Boya,WA,6056" , in this case API is returning the data of station "Nantes/FRA" rather than WA station. I am using the dataset="intl"

what is wrong in the input / or suggest the proper input format to get the correct data output

Thanks

API is returning Yellowknife as closest station

I have been using the API successfully for obtaining data for the last year. Today I noticed that it is now returning Yellowknife,NT as the closest station, even though I am using a Lat-Long in Calgary, AB. Has something changed to prevent me using this sort of query?

https://developer.nrel.gov/api/pvwatts/v6.json?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxx&lat=51.11&lon=-114.02&radius=0&system_capacity=1&azimuth=180&tilt=51.11&array_type=1&module_type=0&losses=22&dataset=intl

Empty search on High Performance Building Database docs crashes browser

If you want to crash your browser (which you probably don't want to do):

After processing for a while, then your browser will likely crash. I think this is due to the volume of XML data that's coming back and trying to be displayed. While there are use-cases for bulk-downloading all the data, the Swagger docs should probably have some additional default filters so that the default search performed doesn't return so much data.

Reported during our API Usability Testing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.