Hey! We are stoked that you are interested in joining the team at Blue Onion Labs.
We have crafted the following test to see how you approach pulling and manipulating of data. We want to get a general idea of how you approach some common types of problems that we encounter here at Blue Onion (we are really proficient at integrations!)
spacexdata.com provides an API to query attributes about SpaceX launches (https://github.com/r-spacex/SpaceX-API/tree/master/docs#rspacex-api-docs). For this exercise we are going to be working with one resource in particular:
- The Starlink Schema
For this exercise, no need to pull directly from the API as we have a pull of historical data here in this repo in the starlink_historical_data.json
We want to be achieve a few goals:
- To import the SpaceX Satellite data as a time series into a database
- To be able to query the data to determine the last known latitude/longitude of the satellite for a given time
Stand up your favorite kind of database (and ideally it would be in a form that would be runnable by us, via something like docker-compose).
Write code (ideally in Python) to import the relevant fields in starlink_historical_data.json as a time series. The relevant fields are: - spaceTrack.creation_date (represents the time that the lat/lon records were recorded) - longitude - latitude - id (this is the starlink satellite id) Again, the goal is that we want to be able to query the database for the last known position for a given starlink satellite. Don't hesitate to use any tools/tricks you know to load data quickly and easily!
Write logic to fetch/query the last known position of a satellite (by id), given a time T. Include this query in your README or somewhere in the project submission
Write some logic (via a combination of query + application logic, most likely) to fetch from the database the closest satellite at a given time T, and a given a position on a globe as a (latitude, longitude) coordinate.
No need to derive any fancy math for distances for a point on the globe to a position above the earth. You can just use the Haversine formula. Example library to help here https://github.com/mapado/haversine
- Run through it one last time to make sure it works!
- Push the code up to your repo one last time (or save your working directory to a 'zip')
- Reach out to us with your solution
If you have any questions at all during the challenge do not hesitate to reach out! Whether it be a question about the requirements, submitting, anything, just send us a note!