Giter Site home page Giter Site logo

Comments (9)

jakewmeyer avatar jakewmeyer commented on April 28, 2024

I changed it in #21 for consistency's sake

Potential solution would be to have two options

"launch_site_id": "kwajalein_atoll",
"launch_site": "Kwajalein Atoll"

from spacex-api.

waterskier2007 avatar waterskier2007 commented on April 28, 2024

That makes sense. Would it be possible to do a join when fetching the data and then actually return a full launch site object for each launch in the launches endpoint

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 28, 2024

Working on that currently for launch sites, payloads, and links for each launch

from spacex-api.

waterskier2007 avatar waterskier2007 commented on April 28, 2024

nice

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 28, 2024

Update

So I've decided to transition the data over to MongoDB for flexibility going forward. The joins weren't giving me what I wanted, and it makes more sense with dynamic data like this.

This should give better flexibility in regards to multiple payloads, links, launch sites, etc... Instead of jumping through lots of SQL joins in order to achieve similar results. This should allow for more agile modeling as new ideas + data come forward.

So the new schema for launches will look similar to the following:

{
    "flight_number": 1,
    "launch_year": "2006",
    "launch_date_utc": "2006-03-24T22:30:00Z",
    "launch_date_local": "2006-03-25T10:30:00+12:00",
    "rocket": "Falcon 1",
    "rocket_type": "Merlin A",
    "core_serial": "Merlin 1A",
    "cap_serial": null,
    "launch_site": {
      "site_id": "kwajalein_atoll",
      "site_name": "Kwajalein Atoll"
    },
    "payloads": [
      {
        "payload_id": "FalconSAT-2",
        "customer": "DARPA",
        "payload_type": "Satelite",
        "payload_mass_kg": 20,
        "payload_mass_lbs": 43,
        "orbit": "LEO"
      }
    ],
    "launch_success": false,
    "reused": false,
    "land_success": false,
    "landing_type": null,
    "landing_vehicle": null,
    "links": {
      "mission_patch": "http://spacexpatchlist.space/images/thumbs/falcon_1_flight_1.png",
      "article_link": "https://www.space.com/2196-spacex-inaugural-falcon-1-rocket-lost-launch.html",
      "video_link": "https://www.youtube.com/watch?v=0a_00nJ_Y88"
    },
    "details": "Engine failure at 33 seconds and loss of vehicle"
  },

Hoping to make the transition in the next day or so, all the new code is written and tested, just have a few more things to double check before it merges. πŸ‘

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 28, 2024

Production server is officially switched over to Mongo, working on updating all the launches to the new schema

from spacex-api.

waterskier2007 avatar waterskier2007 commented on April 28, 2024

That all looks good, but one thing that has changes is that https://api.spacexdata.com/launchpads now returns an array as the base object. It's an array, with one dictionary that has launchpads and test_locations... How come the root object is an array, it should just be a dictionary.

from spacex-api.

jakewmeyer avatar jakewmeyer commented on April 28, 2024

Should be corrected now πŸ‘

from spacex-api.

waterskier2007 avatar waterskier2007 commented on April 28, 2024

All good. Nice work man!

from spacex-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.