This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT company, STRING_AGG(employee, ', ') AS employee | |
FROM your_table | |
GROUP BY company; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_random_location_within_ROI(num_pt, polygon): | |
""" | |
Generate num_pt random location coordinates . | |
:param num_pt INT number of random location coordinates | |
:param polygon geopandas.geoseries.GeoSeries the polygon of the region | |
:return x, y lists of location coordinates, longetude and latitude | |
""" | |
# define boundaries | |
bounds_all = polygon.bounds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geopandas as gpd | |
import pandas as pd | |
import numpy as np | |
from shapely.geometry import Polygon | |
from shapely.geometry import box | |
import matplotlib.patches as patches | |
import random | |
from shapely.geometry import Point | |
import matplotlib.pyplot as plt | |
from copy import copy |