openskynetwork / opensky-api

Python and Java bindings for the OpenSky Network REST API
GNU General Public License v3.0
339 stars 120 forks source link

Doesn't load data #35

Closed Mohammadreza20 closed 2 years ago

Mohammadreza20 commented 3 years ago

I work with python and need the data, I have two problems 1the download of data is very slow (speed internet = 20 megabits per sec) 2 from yesterday the data doesn't load for me, why?

my code:


request = (
    f"""-q select time,icao24,callsign,baroaltitude,lastposupdate,lat,lon from state_vectors_data4
    where baroaltitude <= 10000 and baroaltitude >= 8000
    and time>={start_time} and time<={end_time}
    and lat>={lat_min} and lat<={lat_max}
    and lon>={lon_min} and lon<={lon_max} limit 100

    """
)

p = paramiko.SSHClient()
p.set_missing_host_key_policy(paramiko.AutoAddPolicy())
p.connect( "data.opensky-network.org", 2230, username = username, password = password, look_for_keys=False, allow_agent=False, compress=True)
stdin, stdout, stderr = p.exec_command(request)
stdout.readlines()
masorx commented 2 years ago

We can't change the download speed - the system is not intended to download large amounts of data. You can do typical calulcations right on the database. Second issue was just temporary hickup.

q-wertz commented 2 years ago

You can maybe also speed up the query by using the hour column as stated here (section 3. Boosting Query Performance)