datapunt_processing.transform.enrichment package¶
Submodules¶
datapunt_processing.transform.enrichment.add_knmi_data module¶
-
class
datapunt_processing.transform.enrichment.add_knmi_data.
Station
(number, longitude, latitude, altitude, name)¶ Bases:
tuple
-
altitude
¶ Alias for field number 3
-
latitude
¶ Alias for field number 2
-
longitude
¶ Alias for field number 1
-
name
¶ Alias for field number 4
-
number
¶ Alias for field number 0
-
-
datapunt_processing.transform.enrichment.add_knmi_data.
chunk_splitter
(raw)¶ Generator to read a raw file and yield chunks that are separated by ‘empty lines’: “# ” Args:
raw : str
-
datapunt_processing.transform.enrichment.add_knmi_data.
get_day_data_dataframe
(stations, start=None, end=None, inseason=False, variables=None)¶ Get daily weather data from KNMI as a Pandas DataFrame args:
- stations : [int]
- list of KNMI station numbers
- start : datetime.datetime | str
- date (optional, default is begin of current month) can be a datetime object, or a string in format “%Y%m%d”
- end : datetime.datetime | str
- date (optional, default is today) can be a datetime object, or a string in format “%Y%m%d”
- inseason : bool (optional, default False)
- see http://www.knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script for the full explanation
variables : list of variables to fetch (optional, default is ALL)
- Returns
- daily weather data in a Pandas DataFrame. Parts included: disclaimer, stations, legend, data
-
datapunt_processing.transform.enrichment.add_knmi_data.
get_day_data_raw
(stations, start=None, end=None, inseason=False, variables=None)¶ Get daily weather data from KNMI args:
- stations : [int]
- list of KNMI station numbers
- start : datetime.datetime | str
- date (optional, default is begin of current month) can be a datetime object, or a string in format “%Y%m%d”
- end : datetime.datetime | str
- date (optional, default is today) can be a datetime object, or a string in format “%Y%m%d”
- inseason : bool (optional, default False)
- see http://www.knmi.nl/kennis-en-datacentrum/achtergrond/data-ophalen-vanuit-een-script for the full explanation
- variables : list of variables to fetch (optional, default is ALL)
- WIND = DDVEC:FG:FHX:FHX:FX wind TEMP = TG:TN:TX:T10N temperatuur SUNR = SQ:SP:Q Zonneschijnduur en globale straling PRCP = DR:RH:EV24 neerslag en potentiële verdamping PRES = PG:PGX:PGN druk op zeeniveau VICL = VVN:VVX:NG zicht en bewolking MSTR = UG:UX:UN luchtvochtigheid
- Returns:
- raw daily weather data generated by the specified weather stations. Parts included: disclaimer, stations, legend, data
-
datapunt_processing.transform.enrichment.add_knmi_data.
main
()¶
-
datapunt_processing.transform.enrichment.add_knmi_data.
parse_dataframe
(data)¶
-
datapunt_processing.transform.enrichment.add_knmi_data.
parse_day_data
(raw)¶ Parse the raw csv response of KNMI into relevant pieces. Args:
raw : strReturns
-
datapunt_processing.transform.enrichment.add_knmi_data.
parser
()¶ Parser function to run arguments from the command line and to add description to sphinx.
datapunt_processing.transform.enrichment.add_public_events module¶
-
datapunt_processing.transform.enrichment.add_public_events.
get_event_json
()¶ parse public event data from json at amsterdam.data.nl Args:
None- Returns:
- pd.DataFrame: data frame with events in Amsterdam
-
datapunt_processing.transform.enrichment.add_public_events.
main
()¶
-
datapunt_processing.transform.enrichment.add_public_events.
parser
()¶ Parser function to run arguments from the command line and to add description to sphinx.
datapunt_processing.transform.enrichment.knmi_metadata module¶
datapunt_processing.transform.enrichment.official_dutch_traffic_signs module¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
get_item
(parent, parent_name, child_name, namespaces)¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
get_items
(parent, parent_name, namespaces)¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
get_latest_xml_data
(meta_url, namespaces)¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
get_traffic_signs
(xml_toestand, namespaces)¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
get_xml
(url)¶
-
datapunt_processing.transform.enrichment.official_dutch_traffic_signs.
main
()¶ Docs for using the SRU service:
Examples using the SRU service:
Readable url:
Final XML which is used: