@@ -2485,6 +2485,115 @@ df.head(1)
2485
2485
| 1899 | Triple descent and the two kinds of overfittin... | [ NeurIPS] | 2020 |
2486
2486
</details >
2487
2487
2488
+ #### [ NASA] ( api-connectors/nasa ) -- Collect NASA Data.
2489
+ <details >
2490
+ <summary >What are the title of Astronomy Picture of the Day from 2020-01-01 to 2020-01-10?</summary >
2491
+
2492
+ ``` python
2493
+ from dataprep.connector import connect
2494
+
2495
+ # You can get ”nasa_access_key“ by following https://api.nasa.gov/
2496
+ conn_nasa = connect(" api-connectors/nasa" , _auth = {' access_token' : nasa_access_key})
2497
+
2498
+ df = await conn_nasa.query(" apod" , start_date = ' 2020-01-01' , end_date = ' 2020-01-10' )
2499
+ df[' title' ]
2500
+ ```
2501
+ | id | title |
2502
+ | ---:| :--------------------------------|
2503
+ | 0 | Betelgeuse Imagined |
2504
+ | 1 | The Fainting of Betelgeuse |
2505
+ | 2 | Quadrantids over the Great Wall |
2506
+ | ... | ... |
2507
+ | 9 | Nacreous Clouds over Sweden |
2508
+ </details >
2509
+
2510
+ <details >
2511
+ <summary >What are Coronal Mass Ejection(CME) data from 2020-01-01 to 2020-02-01?</summary >
2512
+
2513
+ ``` python
2514
+ from dataprep.connector import connect
2515
+
2516
+ # You can get ”nasa_access_key“ by following https://api.nasa.gov/
2517
+ conn_nasa = connect(" api-connectors/nasa" , _auth = {' access_token' : nasa_access_key})
2518
+
2519
+ df = await conn_nasa.query(' cme' , startDate = ' 2020-01-01' , endDate = ' 2020-02-01' )
2520
+ df
2521
+ ```
2522
+
2523
+ | id | activity_id | catalog | start_time | ... | link |
2524
+ | ---:| :----------------------------| :------------| :------------------| :----| :---------------------------------------------------------|
2525
+ | 0 | 2020-01-05T16:45:00-CME-001 | M2M_CATALOG | 2020-01-05T16:45Z | ... | https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/CME/15256/-1 |
2526
+ | 1 | 2020-01-14T11:09:00-CME-001 | M2M_CATALOG | 2020-01-14T11:09Z | ... | https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/CME/15271/-1 |
2527
+ | .. | ... | ... | ... | ... | ... |
2528
+ | 4 | 2020-01-25T18:54:00-CME-001 | M2M_CATALOG | 2020-01-25T18:54Z | ... | https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/CME/15296/-1 |
2529
+ </details >
2530
+
2531
+ <details >
2532
+ <summary >How many Geomagnetic Storms(GST) have occurred from 2020-01-01 to 2021-01-01? When is it?</summary >
2533
+
2534
+ ``` python
2535
+ from dataprep.connector import connect
2536
+
2537
+ # You can get ”nasa_access_key“ by following https://api.nasa.gov/
2538
+ conn_nasa = connect(" api-connectors/nasa" , _auth = {' access_token' : nasa_access_key})
2539
+
2540
+ df = await conn_nasa.query(' gst' , startDate = ' 2020-01-01' , endDate = ' 2021-01-01' )
2541
+ print (" Geomagnetic Storms have occurred %s times from 2020-01-01 to 2021-01-01." % len (df))
2542
+ df[' start_time' ]
2543
+ ```
2544
+ Geomagnetic Storms have occurred 1 times from 2020-01-01 to 2021-01-01.
2545
+
2546
+ | id | start_time |
2547
+ | ---:| :--------------------------------|
2548
+ | 0 | 2020-09-27T21:00Z |
2549
+ </details >
2550
+
2551
+ <details >
2552
+ <summary >How many Solar Flare(FLR) have occurred and completed from 2020-01-01 to 2021-01-01? How long did they last?</summary >
2553
+
2554
+ ``` python
2555
+ import pandas as pd
2556
+ from dataprep.connector import connect
2557
+
2558
+ # You can get ”nasa_access_key“ by following https://api.nasa.gov/
2559
+ conn_nasa = connect(" api-connectors/nasa" , _auth = {' access_token' : nasa_access_key})
2560
+
2561
+ df = await conn_nasa.query(' flr' , startDate = ' 2020-01-01' , endDate = ' 2021-01-01' )
2562
+ df = df.dropna(subset = [' end_time' ]).reset_index(drop = True )
2563
+ df[' duration' ] = pd.to_datetime(df[' end_time' ]) - pd.to_datetime(df[' begin_time' ])
2564
+ print (' Solar Flare have occurred %s times from 2020-01-01 to 2021-01-01.' % len (df))
2565
+ print (df[' duration' ])
2566
+ ```
2567
+ There are 1 times Geomagnetic Storms(GST) have occurred from 2020-01-01 to 2021-01-01.
2568
+
2569
+ | id | duration |
2570
+ | ---:| :------------------------------|
2571
+ | 0 | 0 days 01:07:00 |
2572
+ | 1 | 0 days 00:23:00 |
2573
+ | 2 | 0 days 00:47:00 |
2574
+
2575
+ </details >
2576
+
2577
+ <details >
2578
+ <summary >What are Solar Energetic Particle(SEP) data from 2019-01-01 to 2021-01-01?</summary >
2579
+
2580
+ ``` python
2581
+ import pandas as pd
2582
+ from dataprep.connector import connect
2583
+
2584
+ # You can get ”nasa_access_key“ by following https://api.nasa.gov/
2585
+ conn_nasa = connect(" api-connectors/nasa" , _auth = {' access_token' : nasa_access_key})
2586
+
2587
+ df = await conn_nasa.query(' sep' , startDate = ' 2019-01-01' , endDate = ' 2021-01-01' )
2588
+ df
2589
+ ```
2590
+
2591
+ | id | sep_id | event_time | instruments | ... | link |
2592
+ | ---:| :----------------------------| :------------------| :--------------------------------| :----| :-------------------------------------------------------- |
2593
+ | 0 | 2020-11-30T04:26:00-SEP-001 | 2020-11-30T04:26Z | [ 'STEREO A: IMPACT 13-100 MeV'] | ... | https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/SEP/16166/-1 |
2594
+ | 1 | 2020-11-30T14:16:00-SEP-001 | 2020-11-30T14:16Z | [ 'STEREO A: IMPACT 13-100 MeV'] | ... | https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/SEP/16169/-1 |
2595
+
2596
+ </details >
2488
2597
2489
2598
### Shopping
2490
2599
0 commit comments