Last active
June 12, 2020 21:42
-
-
Save andybell/528d3abed51a8e9248e2c8229c029a03 to your computer and use it in GitHub Desktop.
SentinelSat 5P methane
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[source]] | |
name = "pypi" | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
[dev-packages] | |
[packages] | |
sentinelsat = "*" | |
pandas = "*" | |
[requires] | |
python_version = "3.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_meta": { | |
"hash": { | |
"sha256": "44a9ae4e4a3aa6fbc0bb5be80d137ce987fa5e2de266b1912e765cfff59c465f" | |
}, | |
"pipfile-spec": 6, | |
"requires": { | |
"python_version": "3.8" | |
}, | |
"sources": [ | |
{ | |
"name": "pypi", | |
"url": "https://pypi.org/simple", | |
"verify_ssl": true | |
} | |
] | |
}, | |
"default": { | |
"certifi": { | |
"hashes": [ | |
"sha256:5ad7e9a056d25ffa5082862e36f119f7f7cec6457fa07ee2f8c339814b80c9b1", | |
"sha256:9cd41137dc19af6a5e03b630eefe7d1f458d964d406342dd3edf625839b944cc" | |
], | |
"version": "==2020.4.5.2" | |
}, | |
"chardet": { | |
"hashes": [ | |
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", | |
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" | |
], | |
"version": "==3.0.4" | |
}, | |
"click": { | |
"hashes": [ | |
"sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", | |
"sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" | |
], | |
"version": "==7.1.2" | |
}, | |
"geojson": { | |
"hashes": [ | |
"sha256:6e4bb7ace4226a45d9c8c8b1348b3fc43540658359f93c3f7e03efa9f15f658a", | |
"sha256:ccbd13368dd728f4e4f13ffe6aaf725b6e802c692ba0dde628be475040c534ba" | |
], | |
"version": "==2.5.0" | |
}, | |
"geomet": { | |
"hashes": [ | |
"sha256:91d754f7c298cbfcabd3befdb69c641c27fe75e808b27aa55028605761d17e95", | |
"sha256:a41a1e336b381416d6cbed7f1745c848e91defaa4d4c1bdc1312732e46ffad2b" | |
], | |
"version": "==0.2.1.post1" | |
}, | |
"html2text": { | |
"hashes": [ | |
"sha256:c7c629882da0cf377d66f073329ccf34a12ed2adf0169b9285ae4e63ef54c82b", | |
"sha256:e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb" | |
], | |
"version": "==2020.1.16" | |
}, | |
"idna": { | |
"hashes": [ | |
"sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb", | |
"sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa" | |
], | |
"version": "==2.9" | |
}, | |
"numpy": { | |
"hashes": [ | |
"sha256:0172304e7d8d40e9e49553901903dc5f5a49a703363ed756796f5808a06fc233", | |
"sha256:34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b", | |
"sha256:3676abe3d621fc467c4c1469ee11e395c82b2d6b5463a9454e37fe9da07cd0d7", | |
"sha256:3dd6823d3e04b5f223e3e265b4a1eae15f104f4366edd409e5a5e413a98f911f", | |
"sha256:4064f53d4cce69e9ac613256dc2162e56f20a4e2d2086b1956dd2fcf77b7fac5", | |
"sha256:4674f7d27a6c1c52a4d1aa5f0881f1eff840d2206989bae6acb1c7668c02ebfb", | |
"sha256:7d42ab8cedd175b5ebcb39b5208b25ba104842489ed59fbb29356f671ac93583", | |
"sha256:965df25449305092b23d5145b9bdaeb0149b6e41a77a7d728b1644b3c99277c1", | |
"sha256:9c9d6531bc1886454f44aa8f809268bc481295cf9740827254f53c30104f074a", | |
"sha256:a78e438db8ec26d5d9d0e584b27ef25c7afa5a182d1bf4d05e313d2d6d515271", | |
"sha256:a7acefddf994af1aeba05bbbafe4ba983a187079f125146dc5859e6d817df824", | |
"sha256:a87f59508c2b7ceb8631c20630118cc546f1f815e034193dc72390db038a5cb3", | |
"sha256:ac792b385d81151bae2a5a8adb2b88261ceb4976dbfaaad9ce3a200e036753dc", | |
"sha256:b03b2c0badeb606d1232e5f78852c102c0a7989d3a534b3129e7856a52f3d161", | |
"sha256:b39321f1a74d1f9183bf1638a745b4fd6fe80efbb1f6b32b932a588b4bc7695f", | |
"sha256:cae14a01a159b1ed91a324722d746523ec757357260c6804d11d6147a9e53e3f", | |
"sha256:cd49930af1d1e49a812d987c2620ee63965b619257bd76eaaa95870ca08837cf", | |
"sha256:e15b382603c58f24265c9c931c9a45eebf44fe2e6b4eaedbb0d025ab3255228b", | |
"sha256:e91d31b34fc7c2c8f756b4e902f901f856ae53a93399368d9a0dc7be17ed2ca0", | |
"sha256:ef627986941b5edd1ed74ba89ca43196ed197f1a206a3f18cc9faf2fb84fd675", | |
"sha256:f718a7949d1c4f622ff548c572e0c03440b49b9531ff00e4ed5738b459f011e8" | |
], | |
"version": "==1.18.5" | |
}, | |
"pandas": { | |
"hashes": [ | |
"sha256:034185bb615dc96d08fa13aacba8862949db19d5e7804d6ee242d086f07bcc46", | |
"sha256:0c9b7f1933e3226cc16129cf2093338d63ace5c85db7c9588e3e1ac5c1937ad5", | |
"sha256:1f6fcf0404626ca0475715da045a878c7062ed39bc859afc4ccf0ba0a586a0aa", | |
"sha256:1fc963ba33c299973e92d45466e576d11f28611f3549469aec4a35658ef9f4cc", | |
"sha256:29b4cfee5df2bc885607b8f016e901e63df7ffc8f00209000471778f46cc6678", | |
"sha256:2a8b6c28607e3f3c344fe3e9b3cd76d2bf9f59bc8c0f2e582e3728b80e1786dc", | |
"sha256:2bc2ff52091a6ac481cc75d514f06227dc1b10887df1eb72d535475e7b825e31", | |
"sha256:415e4d52fcfd68c3d8f1851cef4d947399232741cc994c8f6aa5e6a9f2e4b1d8", | |
"sha256:519678882fd0587410ece91e3ff7f73ad6ded60f6fcb8aa7bcc85c1dc20ecac6", | |
"sha256:51e0abe6e9f5096d246232b461649b0aa627f46de8f6344597ca908f2240cbaa", | |
"sha256:698e26372dba93f3aeb09cd7da2bb6dd6ade248338cfe423792c07116297f8f4", | |
"sha256:83af85c8e539a7876d23b78433d90f6a0e8aa913e37320785cf3888c946ee874", | |
"sha256:982cda36d1773076a415ec62766b3c0a21cdbae84525135bdb8f460c489bb5dd", | |
"sha256:a647e44ba1b3344ebc5991c8aafeb7cca2b930010923657a273b41d86ae225c4", | |
"sha256:b35d625282baa7b51e82e52622c300a1ca9f786711b2af7cbe64f1e6831f4126", | |
"sha256:bab51855f8b318ef39c2af2c11095f45a10b74cbab4e3c8199efcc5af314c648" | |
], | |
"index": "pypi", | |
"version": "==1.0.4" | |
}, | |
"python-dateutil": { | |
"hashes": [ | |
"sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", | |
"sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" | |
], | |
"version": "==2.8.1" | |
}, | |
"pytz": { | |
"hashes": [ | |
"sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed", | |
"sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" | |
], | |
"version": "==2020.1" | |
}, | |
"requests": { | |
"hashes": [ | |
"sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee", | |
"sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" | |
], | |
"version": "==2.23.0" | |
}, | |
"sentinelsat": { | |
"hashes": [ | |
"sha256:2fd50e8c6e45da59be4226c7ff2c76e193cf3ff28b28dd51b86229b130ba265d", | |
"sha256:beba1351575415eda071e479a114a0086c294c2cf36b7dcd3fa243098f58b6b9" | |
], | |
"index": "pypi", | |
"version": "==0.14" | |
}, | |
"six": { | |
"hashes": [ | |
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", | |
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" | |
], | |
"version": "==1.15.0" | |
}, | |
"tqdm": { | |
"hashes": [ | |
"sha256:07c06493f1403c1380b630ae3dcbe5ae62abcf369a93bbc052502279f189ab8c", | |
"sha256:cd140979c2bebd2311dfb14781d8f19bd5a9debb92dcab9f6ef899c987fcf71f" | |
], | |
"version": "==4.46.1" | |
}, | |
"urllib3": { | |
"hashes": [ | |
"sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527", | |
"sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115" | |
], | |
"version": "==1.25.9" | |
} | |
}, | |
"develop": {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Feature", | |
"properties": { | |
"name": "Saudi Arabia", | |
"code": "SAU", | |
"group": "Countries" | |
}, | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ | |
[ | |
42.779332, | |
16.347891 | |
], | |
[ | |
42.649573, | |
16.774635 | |
], | |
[ | |
42.347989, | |
17.075806 | |
], | |
[ | |
42.270888, | |
17.474722 | |
], | |
[ | |
41.754382, | |
17.833046 | |
], | |
[ | |
41.221391, | |
18.6716 | |
], | |
[ | |
40.939341, | |
19.486485 | |
], | |
[ | |
40.247652, | |
20.174635 | |
], | |
[ | |
39.801685, | |
20.338862 | |
], | |
[ | |
39.139399, | |
21.291905 | |
], | |
[ | |
39.023696, | |
21.986875 | |
], | |
[ | |
39.066329, | |
22.579656 | |
], | |
[ | |
38.492772, | |
23.688451 | |
], | |
[ | |
38.02386, | |
24.078686 | |
], | |
[ | |
37.483635, | |
24.285495 | |
], | |
[ | |
37.154818, | |
24.858483 | |
], | |
[ | |
37.209491, | |
25.084542 | |
], | |
[ | |
36.931627, | |
25.602959 | |
], | |
[ | |
36.639604, | |
25.826228 | |
], | |
[ | |
36.249137, | |
26.570136 | |
], | |
[ | |
35.640182, | |
27.37652 | |
], | |
[ | |
35.130187, | |
28.063352 | |
], | |
[ | |
34.632336, | |
28.058546 | |
], | |
[ | |
34.787779, | |
28.607427 | |
], | |
[ | |
34.83222, | |
28.957483 | |
], | |
[ | |
34.956037, | |
29.356555 | |
], | |
[ | |
36.068941, | |
29.197495 | |
], | |
[ | |
36.501214, | |
29.505254 | |
], | |
[ | |
36.740528, | |
29.865283 | |
], | |
[ | |
37.503582, | |
30.003776 | |
], | |
[ | |
37.66812, | |
30.338665 | |
], | |
[ | |
37.998849, | |
30.5085 | |
], | |
[ | |
37.002166, | |
31.508413 | |
], | |
[ | |
39.004886, | |
32.010217 | |
], | |
[ | |
39.195468, | |
32.161009 | |
], | |
[ | |
40.399994, | |
31.889992 | |
], | |
[ | |
41.889981, | |
31.190009 | |
], | |
[ | |
44.709499, | |
29.178891 | |
], | |
[ | |
46.568713, | |
29.099025 | |
], | |
[ | |
47.459822, | |
29.002519 | |
], | |
[ | |
47.708851, | |
28.526063 | |
], | |
[ | |
48.416094, | |
28.552004 | |
], | |
[ | |
48.807595, | |
27.689628 | |
], | |
[ | |
49.299554, | |
27.461218 | |
], | |
[ | |
49.470914, | |
27.109999 | |
], | |
[ | |
50.152422, | |
26.689663 | |
], | |
[ | |
50.212935, | |
26.277027 | |
], | |
[ | |
50.113303, | |
25.943972 | |
], | |
[ | |
50.239859, | |
25.60805 | |
], | |
[ | |
50.527387, | |
25.327808 | |
], | |
[ | |
50.660557, | |
24.999896 | |
], | |
[ | |
50.810108, | |
24.754743 | |
], | |
[ | |
51.112415, | |
24.556331 | |
], | |
[ | |
51.389608, | |
24.627386 | |
], | |
[ | |
51.579519, | |
24.245497 | |
], | |
[ | |
51.617708, | |
24.014219 | |
], | |
[ | |
52.000733, | |
23.001154 | |
], | |
[ | |
55.006803, | |
22.496948 | |
], | |
[ | |
55.208341, | |
22.70833 | |
], | |
[ | |
55.666659, | |
22.000001 | |
], | |
[ | |
54.999982, | |
19.999994 | |
], | |
[ | |
52.00001, | |
19.000003 | |
], | |
[ | |
49.116672, | |
18.616668 | |
], | |
[ | |
48.183344, | |
18.166669 | |
], | |
[ | |
47.466695, | |
17.116682 | |
], | |
[ | |
47.000005, | |
16.949999 | |
], | |
[ | |
46.749994, | |
17.283338 | |
], | |
[ | |
46.366659, | |
17.233315 | |
], | |
[ | |
45.399999, | |
17.333335 | |
], | |
[ | |
45.216651, | |
17.433329 | |
], | |
[ | |
44.062613, | |
17.410359 | |
], | |
[ | |
43.791519, | |
17.319977 | |
], | |
[ | |
43.380794, | |
17.579987 | |
], | |
[ | |
43.115798, | |
17.08844 | |
], | |
[ | |
43.218375, | |
16.66689 | |
], | |
[ | |
42.779332, | |
16.347891 | |
] | |
] | |
] | |
}, | |
"_id": "saudi arabia" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt | |
wd = os.getcwd() | |
# query the 5P API | |
api = SentinelAPI(user='s5pguest', password='s5pguest', api_url='https://s5phub.copernicus.eu/dhus') | |
footprint = geojson_to_wkt(read_geojson(os.path.join(wd, 'saudiarabia.geojson'))) # Area of interest | |
products = api.query(area = footprint, date =("NOW-5DAY", "NOW"), area_relation="Contains") | |
# convert to Pandas DataFrame | |
products_df = api.to_dataframe(products) | |
# filter to just methane products | |
methane_df = products_df[products_df["producttypedescription"]=="Methane"] | |
print(methane_df.head()) | |
# download sorted and reduced products | |
api.download_all(methane_df.index) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment