Michiah Hugi <mhugijr@outlook.com>
This module provides an interface to a handufl of NASA’s Open APIs.
Note: It is recommended that you sign up for a NASA API Key. By default, "DEMO_KEY" is used and is limited in requests.
More information can be found at api.nasa.gov
1 APOD (Astronomy Picture of the Day)🔗ℹ
(get-apod date [#:api_key api_key]) → (listof apod?)
|
| date : string? |
| api_key : string? = "DEMO_KEY" |
Returns data for APOD of specified date
(Date must be in format YYYY-MM-DD).
| (struct | | apod | ( | title | | | | | | date | | | | | | explanation | | | | | | copyright | | | | | | service-version | | | | | | media-type | | | | | | url | | | | | | hdurl) |
|
| #:extra-constructor-name make-apod) |
| title : string? |
| date : string? |
| explanation : string? |
| copyright : (or/c string? null?) |
| service-version : string? |
| media-type : string? |
| url : string? |
| hdurl : string? |
APOD data. Returned by get-apod.
2 SSD/CNEOS Fireball🔗ℹ
(get-fireballs dates) → (listof fireball)
|
| dates : pair? |
Returns a list of fireball within specified date range.
Dates must be in the form of YYYY-MM-DD, YYYY-MM-DDThh:mm:ss, YYYY-MM-DD_hh:mm:ss or YYYY-MM-DD hh:mm:ss.
If the date range is left blank, all events will be returned
Examples:
| (get-fireballs) |
| (get-fireballs (list "2020-01-01" "2020-02-02")) |
| (struct | | fireball | ( | date | | | | | | lat | | | | | | lon | | | | | | lat-dir | | | | | | lon-dir | | | | | | alt | | | | | | vel | | | | | | energy | | | | | | impact-e) |
|
| #:extra-constructor-name make-fireball) |
| date : (or/c string? null) |
| lat : (or/c string? null) |
| lon : (or/c string? null) |
| lat-dir : (or/c string? null) |
| lon-dir : (or/c string? null) |
| alt : (or/c number? null) |
| vel : (or/c number? null) |
| energy : (or/c number? null) |
| impact-e : (or/c number? null) |
Fireball event data returned from get-fireballs.
3 NEO (Near Earth Objects)🔗ℹ
| (get-neos | | dates | | | | | | | [ | #:api_key api_key | | | | | | | | #:diameter_unit diameter_unit | | | | | | | | #:distance_unit distance_unit | | | | | | | | #:velocity_unit velocity_unit]) | | → | | (listof neo?) |
|
| dates : pair? |
| api_key : string? = "DEMO_KEY" |
| | diameter_unit | | : | | (one-of/c 'kilometers 'meters 'miles 'feet) | | | | | = | | 'kilometers |
|
| | distance_unit | | : | | (one-of/c 'astronomical 'lunar 'kilometers 'miles) | | | | | = | | 'kilometers |
|
| | velocity_unit | | : | | (one-of/c 'kilometers_per_second 'kilometers_per_hour 'miles_per_hour) | | | | | = | | 'kilometers_per_hour |
|
Returns list of neo within specified date range.
Dates must be in the form of YYYY-MM-DD.
(endDate is default 7 days after startDate)
Examples:
| (get-neos) |
| (get-neos (list "2020-01-01" "")) |
| (get-neos (list "2020-01-01" "2020-05-05") #:api_key "DEMO_KEY" |
| #:diameter_unit 'feet |
| #:distance_unit 'miles |
| #:velocity_unit 'miles_per_hour) |
| (get-neo | | asteroid_id | | | | | | | [ | #:api_key api_key | | | | | | | | #:diameter_unit diameter_unit | | | | | | | | #:distance_unit distance_unit | | | | | | | | #:velocity_unit velocity_unit]) | | → | | (detiled-neo?) |
|
| asteroid_id : string? |
| api_key : string? = "DEMO_KEY" |
| | diameter_unit | | : | | (one-of/c 'kilometers 'meters 'miles 'feet) | | | | | = | | 'kilometers |
|
| | distance_unit | | : | | (one-of/c 'astronomical 'lunar 'kilometers 'miles) | | | | | = | | 'kilometers |
|
| | velocity_unit | | : | | (one-of/c 'kilometers_per_second 'kilometers_per_hour 'miles_per_hour) | | | | | = | | 'kilometers_per_hour |
|
Returns detailed-neo for a specific asteroid ID.
Examples:
| (get-neo "3542519") |
| (get-neo "3542519" #:api_key "DEMO_KEY" |
| #:diameter_unit 'feet |
| #:distance_unit 'miles |
| #:velocity_unit 'miles_per_hour) |
| (struct | | neo | ( | id | | | | | | name | | | | | | absolute-magnitude-h | | | | | | estimated-diameter-min | | | | | | estimated-diameter-max | | | | | | potentially-hazardous | | | | | | closest-approach) |
|
| #:extra-constructor-name make-neo) |
| id : string? |
| name : string? |
| absolute-magnitude-h : number? |
| estimated-diameter-min : number? |
| estimated-diameter-max : number? |
| potentially-hazardous : bool? |
| closest-approach : approach? |
Simplified NEO data returned from get-neos.
| (struct | | detailed-neo | ( | id | | | | | | name | | | | | | absolute-magnitude-h | | | | | | estimated-diameter-min | | | | | | estimated-diameter-max | | | | | | potentially-hazardous | | | | | | orbital-information | | | | | | approaches) |
|
| #:extra-constructor-name make-detailed-neo) |
| id : string? |
| name : string? |
| absolute-magnitude-h : number? |
| estimated-diameter-min : number? |
| estimated-diameter-max : number?? |
| potentially-hazardous : bool? |
| orbital-information : orbit? |
| approaches : (listof approach?) |
A more detailed form of neo returned by get-neo.
Contains a list of approach and an orbital information struct orbit.
| (struct | | orbit | ( | orbit-id | | | | | | orbit-determination-date | | | | | | first-observation-date | | | | | | last-observation-date | | | | | | data-arc-in-days | | | | | | observations-used | | | | | | orbit-uncertainty | | | | | | minimum-orbit-intersection | | | | | | jupiter-tisserand-invariant | | | | | | epoch-osculation | | | | | | eccentricity | | | | | | semi-major-axis | | | | | | inclination | | | | | | ascending-node-longitude | | | | | | orbital-period | | | | | | perihelion-distance | | | | | | perihelion-argument | | | | | | aphelion-distance | | | | | | perihelion-time | | | | | | mean-anomaly | | | | | | mean-motion | | | | | | equinox | | | | | | orbit-class-type | | | | | | orbit-class-description | | | | | | orbit-class-range) |
|
| #:extra-constructor-name make-orbit) |
| orbit-id : string? |
| orbit-determination-date : string? |
| first-observation-date : string? |
| last-observation-date : string? |
| data-arc-in-days : number? |
| observations-used : number? |
| orbit-uncertainty : number? |
| minimum-orbit-intersection : number? |
| jupiter-tisserand-invariant : number? |
| epoch-osculation : number? |
| eccentricity : number? |
| semi-major-axis : number? |
| inclination : number? |
| ascending-node-longitude : number? |
| orbital-period : number? |
| perihelion-distance : number? |
| perihelion-argument : number? |
| aphelion-distance : number? |
| perihelion-time : number? |
| mean-anomaly : number? |
| mean-motion : number? |
| equinox : string? |
| orbit-class-type : string? |
| orbit-class-description : string? |
| orbit-class-range : string? |
Contains extensive orbital information data. Only occurs in detailed-neo.
| (struct | | approach | ( | close-approach-date | | | | | | relative-velocity | | | | | | miss-distance | | | | | | orbiting-body) |
|
| #:extra-constructor-name make-approach) |
| close-approach-date : string? |
| relative-velocity : number? |
| miss-distance : number? |
| orbiting-body : string? |
Contains close approach data. Occurs in detailed-neo and neo.
4 DONKI CME (Coronal Mass Ejections)🔗ℹ
(get-cmes dates [#:api_key api_key]) → (listof cme?)
|
| dates : pair? |
| api_key : string? = "DEMO_KEY" |
Returns list of cmeAnalysis within specified date range.
Dates must be in the form of YYYY-MM-DD.
(By default, startDate is 30 days ago and endDate is the current date)
Examples:
| (get-cmes) |
| (get-cmes (list "2020-01-01" "")) |
| (get-cmes #:api_key "DEMO_KEY") |
| (struct | | cme | ( | activityID | | | | | | catalog | | | | | | startTime | | | | | | sourceLocation | | | | | | activeRegionNum | | | | | | link | | | | | | note | | | | | | instruments | | | | | | cmeAnalyse) |
|
| #:extra-constructor-name make-cme) |
| activityID : string? |
| catalog : string? |
| startTime : string? |
| sourceLocation : string? |
| activeRegionNum : (or/c number? null?) |
| link : string? |
| note : string? |
| instruments : (listof cme-instrument?) |
| cmeAnalyse : (or/c (listof cmeAnalysis?) null?) |
CME event data returned from get-cmes. Contains lists of cme-instrument and cmeAnalysis.
| (struct | | cme-instrument (id displayName) |
|
| #:extra-constructor-name make-cme-instrument) |
| id : number? |
| displayName : string? |
Instrument used to record CME data. Found in cme.
| (struct | | cmeAnalysis | ( | time21-5 | | | | | | latitude | | | | | | longitude | | | | | | halfAngle | | | | | | speed | | | | | | type | | | | | | isMostAccurate | | | | | | note | | | | | | levelofData | | | | | | link | | | | | | enlilList) |
|
| #:extra-constructor-name make-cmeAnalysis) |
| time21-5 : string? |
| latitude : number? |
| longitude : number? |
| halfAngle : number? |
| speed : number? |
| type : string? |
| isMostAccurate : boolean? |
| note : string? |
| levelofData : number? |
| link : string? |
| enlilList : (or/c (listof enlil?) null?) |
CME Analysis data. Found in cme.
| (struct | | enlil | ( | modelCompletionTime | | | | | | au | | | | | | estimatedShockArrivalTime | | | | | | estimatedDuration | | | | | | rmin-re | | | | | | kp-18 | | | | | | kp-90 | | | | | | kp-135 | | | | | | kp-180 | | | | | | isEarthGB | | | | | | link | | | | | | cmeIDs | | | | | | impactList) |
|
| #:extra-constructor-name make-enlil) |
| modelCompletionTime : string? |
| au : number? |
| estimatedShockArrivalTime : (or/c string? null?) |
| estimatedDuration : (or/c number? null?) |
| rmin-re : (or/c number? null?) |
| kp-18 : (or/c number? null?) |
| kp-90 : (or/c number? null?) |
| kp-135 : (or/c number? null?) |
| kp-180 : (or/c number? null?) |
| isEarthGB : boolean? |
| link : string? |
| cmeIDs : (listof string?) |
| impactList : (or/c (listof impact?) null?) |
Enlil data. Found in cmeAnalysis.
| (struct | | impact (isGlancingBlow location arrivalTime) |
|
| #:extra-constructor-name make-impact) |
| isGlancingBlow : boolean? |
| location : string? |
| arrivalTime : string? |
Instrument used to record impact data. Found in enlil.
5 DONKI Notification System🔗ℹ
(get-notifications dates [#:api_key api_key])
|
| → (listof notification?) |
| dates : pair? |
| api_key : string? = "DEMO_KEY" |
Returns list of notification within specified date range
Dates must be in the form of YYYY-MM-DD.
(By default, startDate is 7 days ago and endDate is the current date)
| (struct | | notification | ( | messageType | | | | | | messageID | | | | | | messageURL | | | | | | messageIssueTime | | | | | | messageBody) |
|
| #:extra-constructor-name make-notification) |
| messageType : string? |
| messageID : string? |
| messageURL : string? |
| messageIssueTime : string? |
| messageBody : string? |
DONKI Notification contents. Returned from get-notifications
6 DONKI Solar Flares🔗ℹ
(get-solar-flare dates [#:api_key api_key]) → (listof flr?)
|
| dates : pair? |
| api_key : string? = "DEMO_KEY" |
Returns list of flr within specified date range.
Dates must be in the form of YYYY-MM-DD.
(By default, startDate is 30 days ago and endDate is the current date)
| (struct | | flr | ( | flrID | | | | | | instruments | | | | | | beginTime | | | | | | peakTime | | | | | | endTime | | | | | | classType | | | | | | sourceLocation | | | | | | activeRegionNum | | | | | | linkedEvents | | | | | | link) |
|
| #:extra-constructor-name make-flr) |
| flrID : string? |
| instruments : (listof flr-instrument?) |
| beginTime : string? |
| peakTime : string? |
| endTime : string? |
| classType : string? |
| sourceLocation : string? |
| activeRegionNum : (or/c number? null?) |
| linkedEvents : (listof string?) |
| link : string? |
Solar Flare data returned from get-solar-flare.
| (struct | | flr-instrument (id displayName) |
|
| #:extra-constructor-name make-flr-instrument) |
| id : number? |
| displayName : string? |
Instrument used to record Solar Flare data. Found in flr.