Ironhack-data-bcn-january-2023 / project-III-geospatial-data

0 stars 1 forks source link

portada

GeoSpatial Data Project

TODO's

You recently created a new company in the GAMING industry. The company will have the following scheme:

As a data engineer you have asked all the employees to show their preferences on where to place the new office. Your goal is to place the new company offices in the best place for the company to grow. You have to find a place that more or less covers all the following requirements (note that it's impossible to cover all requirements, so you have to prioritize at your glance):

How to approach it

Notice you'll have to do two things:

  1. Query the database
  2. Use an API to get venues (and for this, you'll need a starting point; some coordinates from which you will call the API)
  3. Justify your decision using data, not just visualization. How? Maybe measuring distances, maybe assinging weights depending on the importance of your criteria, maybe calculating the density of schools/Starbucks, etc.

There is a couple of ways you can do this:

Option A

From the existing companies, choose one to steal their current venue 🥷: query and filter the database based on some of your criteria. Then use an API to do queries (from those companies) and check the companies' surroundings to check the other criteria.

Your result will be coordinates.

Option B

Choose three cities that exist in your database. From these cities, query and filter the database according to any other criteria if necessary. Then, make API calls to see if the rest of your criteria are met. Then, compare the three cities. Are any of them better than the other two? Using data, justify why.

Once you chose the city, what would be an approximate location?

Your result will be a city and a neighbourhood/zip code or adress/coordinates.

Option C

Be creative. But remember: always try to follow a general-to-specific approach and base your decisions always using data.

EDIT: Suggested route

Get the data

  1. Filter your database

  2. Find some candidate cities based on amount of companies (or other criteria)

  3. Find the geoJSONS for the neighbourhoods of those cities. Import these polygons into mongoDB as a collection on its own. Eg: berlin-neigh

  4. Set the index of this collection to 2ndsphere

  5. Do API calls to get info for the desired cities

  6. Save each result of the API calls as a document in a specific document: eg.: one collection for schools and each document will be a school in berlin, another school in nyc, etc

# Collections with "type": "Polygon"
munich/   #collection of its neighbourhoods as polygons
london/   #collection of its neighbourhoods as polygons
rotterdam/   #collection of its neighbourhoods as polygons

# Collections with "type": "Point"
schools/  #collection of schools in all three cities
starbucks/    #collection of starbucks in all three cities
restaurants/     #collection of restaurants in all three cities
(...)

Visualize your data

  1. Plot your polygons
  2. Plot your markers (layer for each type?)
  3. Plot heatmap?
  4. Plot circules? Plot lines?
  5. Plot centroids?

Use a data-oriented approach

  1. Amount of things within neighbourhood?: query data points of a collection with neighbourhoogs of another
  2. Amount of things within a given radius?: how many results does the 4s1 API return within a given radius?
  3. Amount of things within a neighbourhood relative to its size (density)? query data points of a collection with neighbourhoogs of another / area
  4. Minimum between company and points of interest?: calculate distance querying the elements of a collection with another elements of another collection

Results

  1. Make decisions based on that:

    • Normalization of your data?
    • Weights for the things you're looking for?
    • Another type of metric?
  2. What is your conclusion? best place: neighbourhood? some other company? a given point?

BONUS

You found a perfect location for your company: but it's either taken by another company or there's too many options in the city you chose. After all, a whole city is not too specific.

Web scrape real state sites 🏠 to get the best prices and choose a neighbourhood, a block or an adress.

Help

How to deliver the project

Links & Resources