Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib.request import urlopen
- # Get data as string
- x = urlopen('https://www.nsstc.uah.edu/data/msu/v6.0/tlt/uahncdc_lt_6.0.txt').read().decode('utf-8')
- # Split data by line
- x = x.split('\n')
- # Remove non-data lines
- x = x[1:539]
- # Split data by whitespace
- x = [y.split() for y in x]
- # Enumerate over Jan-Sep in years >= 2015
- x = tuple((i - 433, float(y[2])) for i, y in enumerate(x) if int(y[0]) >= 2015 and int(y[1]) < 10)
- # Now plot this data with your tool of choice
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement