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 os | |
import sys | |
class HiddenPrints: | |
def __enter__(self): | |
self._original_stdout = sys.stdout | |
sys.stdout = open(os.devnull, 'w') | |
def __exit__(self, exc_type, exc_val, exc_tb): | |
sys.stdout.close() |
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
from osgeo import ogr | |
import pandas as pd | |
import geopandas as gpd | |
def get_data(file): | |
ds = ogr.Open(file) | |
result = list() | |
for lyr in ds: | |
for feat in lyr: |
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
from pathlib import Path | |
import requests | |
import pandas as pd | |
from tqdm import tqdm | |
def get_locations(base_url: str = "https://api.luchtmeetnet.nl/open_api/stations"): | |
"""Get all locations from the LML API. | |
Parameters: | |
----------- |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer