Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JessicaChen-48 opened this issue May 20, 2021 · 0 comments
Open

Comments

@JessicaChen-48
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant