Skip to content

Sanitize raw skyscraper data & create GraphQL endpoint for it #87

@JessicaChen-48

Description

@JessicaChen-48

Sanitizing Data

Raw skyscraper data has been scraped from WikiData inside the wikidata folder under rawSkyscraper.js. The data needs to be sanitized.

The query used was this one here. At the current time of writing this, the height attribute is very inconsistent

For example:

The larger number (269) is the height in feet while the smaller number (82) is the height in meters.
Screen Shot 2021-05-20 at 1 21 43 PM

However, not all entries with two heights go by this convention. The larger number (450) is the height at the top of the building in feet while the smaller number's (316) unit is still meters, but the height of the top floor.
Screen Shot 2021-05-20 at 1 23 34 PM

One last example of inconsistent data points. The smaller number (442) is the height of the building in meters, but 1098 doesn't seem to be associated with this building, according to the Wikipedia article
Screen Shot 2021-05-20 at 1 31 01 PM


Create function to parse data

Once the data is sanitized, create a function to parse the data out for endpoint usage. Maybe the structure of the return could look something like

[
  {
    name: "Zifeng Tower",
    height: int,
    elevators: int,
    coordinates: string
  },
  ...
]

Create GraphQL endpoint

Create a new type, query, and resolver for the GraphQL endpoint to point to the skyscraper data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions