Données sur les jours fériés dans le monde provenant du package de jours fériés PyPI et de Wikipédia, couvrant 38 pays ou régions de 1970 à 2099.
Chaque ligne indique les informations de jours fériés pour une date et un pays ou une région spécifiques, et indique si la plupart des gens ont des congés payés.
Volume et rétention
Ce jeu de données est stocké au format Parquet. Il s’agit d’un instantané contenant les informations sur les jours fériés du 01-01-1970 au 01-01-2099. La taille des données est d’environ 500 Ko.
Emplacement de stockage
Ce jeu de données est stocké dans la région Azure USA Est. L’allocation de ressources de calcul dans la région USA Est est recommandée à des fins d’affinité.
Informations supplémentaires
Ce jeu de données combine des données provenant de Wikipédia (WikiMedia Foundation Inc) et du package PyPI Holidays.
Wikipédia : source d’origine, licence d’origine
PyPI Holidays : source d’origine, licence d’origine
Le jeu de données combiné est fourni sous la licence Creative Commons Attribution-ShareAlike 3.0 Unported.
Envoyez un e-mail à aod@microsoft.com si vous avez des questions sur la source de données.
Remarques
MICROSOFT FOURNIT AZURE OPEN DATASETS “EN L’ÉTAT”. MICROSOFT N’OFFRE AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, DE GARANTIE NI DE CONDITIONS RELATIVES À VOTRE UTILISATION DES JEUX DE DONNÉES. DANS LA MESURE AUTORISÉE PAR VOTRE DROIT LOCAL, MICROSOFT DÉCLINE TOUTE RESPONSABILITÉ POUR TOUT DOMMAGE OU PERTES, Y COMPRIS LES DIRECTIVES, CONSEQUENTIELLES, SPÉCIALES, INDIRECTES OU PUNITIVES, RÉSULTANT DE VOTRE UTILISATION DES JEUX DE DONNÉES.
Ce jeu de données est fourni selon les conditions initiales par lesquelles Microsoft a reçu les données sources. Le jeu de données peut inclure des données provenant de Microsoft.
Access
Available in | When to use |
---|---|
Azure Notebooks | Quickly explore the dataset with Jupyter notebooks hosted on Azure or your local machine. |
Azure Databricks | Use this when you need the scale of an Azure managed Spark cluster to process the dataset. |
Azure Synapse | Use this when you need the scale of an Azure managed Spark cluster to process the dataset. |
Preview
countryOrRegion | holidayName | normalizeHolidayName | countryRegionCode | date |
---|---|---|---|---|
Norway | Søndag | Søndag | NO | 12/28/2098 12:00:00 AM |
Sweden | Söndag | Söndag | SE | 12/28/2098 12:00:00 AM |
Australia | Boxing Day | Boxing Day | AU | 12/26/2098 12:00:00 AM |
Hungary | Karácsony másnapja | Karácsony másnapja | HU | 12/26/2098 12:00:00 AM |
Austria | Stefanitag | Stefanitag | AT | 12/26/2098 12:00:00 AM |
Canada | Boxing Day | Boxing Day | CA | 12/26/2098 12:00:00 AM |
Croatia | Sveti Stjepan | Sveti Stjepan | HR | 12/26/2098 12:00:00 AM |
Czech | 2. svátek vánoční | 2. svátek vánoční | CZ | 12/26/2098 12:00:00 AM |
Denmark | Anden juledag | Anden juledag | DK | 12/26/2098 12:00:00 AM |
England | Boxing Day | Boxing Day | null | 12/26/2098 12:00:00 AM |
Name | Data type | Unique | Values (sample) | Description |
---|---|---|---|---|
countryOrRegion | string | 38 | Sweden Norway |
Nom complet du pays ou de la région. |
countryRegionCode | string | 35 | SE NO |
Code de pays ou région suivant le format indiqué ici. |
date | timestamp | 20,665 | 2066-12-25 00:00:00 2035-01-01 00:00:00 |
Date du jour férié. |
holidayName | string | 483 | Søndag Söndag |
Nom complet du jour férié. |
isPaidTimeOff | boolean | 3 | True | Indique si la plupart des gens ont des congés payés à cette date (disponible uniquement pour les États-Unis, la Royaume-Uni et l’Inde). En cas de valeur NULL, cela signifie que cette information est inconnue. |
normalizeHolidayName | string | 438 | Søndag Söndag |
Nom normalisé du jour férié. |
Azure Notebooks
# This is a package in preview.
from azureml.opendatasets import PublicHolidays
from datetime import datetime
from dateutil import parser
from dateutil.relativedelta import relativedelta
end_date = datetime.today()
start_date = datetime.today() - relativedelta(months=1)
hol = PublicHolidays(start_date=start_date, end_date=end_date)
hol_df = hol.to_pandas_dataframe()
hol_df.info()
# Pip install packages
import os, sys
!{sys.executable} -m pip install azure-storage-blob
!{sys.executable} -m pip install pyarrow
!{sys.executable} -m pip install pandas
# Azure storage access info
azure_storage_account_name = "azureopendatastorage"
azure_storage_sas_token = r""
container_name = "holidaydatacontainer"
folder_name = "Processed"
from azure.storage.blob import BlockBlobServicefrom azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient
if azure_storage_account_name is None or azure_storage_sas_token is None:
raise Exception(
"Provide your specific name and key for your Azure Storage account--see the Prerequisites section earlier.")
print('Looking for the first parquet under the folder ' +
folder_name + ' in container "' + container_name + '"...')
container_url = f"https://{azure_storage_account_name}.blob.core.windows.net/"
blob_service_client = BlobServiceClient(
container_url, azure_storage_sas_token if azure_storage_sas_token else None)
container_client = blob_service_client.get_container_client(container_name)
blobs = container_client.list_blobs(folder_name)
sorted_blobs = sorted(list(blobs), key=lambda e: e.name, reverse=True)
targetBlobName = ''
for blob in sorted_blobs:
if blob.name.startswith(folder_name) and blob.name.endswith('.parquet'):
targetBlobName = blob.name
break
print('Target blob to download: ' + targetBlobName)
_, filename = os.path.split(targetBlobName)
blob_client = container_client.get_blob_client(targetBlobName)
with open(filename, 'wb') as local_file:
blob_client.download_blob().download_to_stream(local_file)
# Read the parquet file into Pandas data frame
import pandas as pd
print('Reading the parquet file into Pandas data frame')
df = pd.read_parquet(filename)
# you can add your filter at below
print('Loaded as a Pandas data frame: ')
df
Azure Databricks
# This is a package in preview.
# You need to pip install azureml-opendatasets in Databricks cluster. https://docs.microsoft.com/en-us/azure/data-explorer/connect-from-databricks#install-the-python-library-on-your-azure-databricks-cluster
from azureml.opendatasets import PublicHolidays
from datetime import datetime
from dateutil import parser
from dateutil.relativedelta import relativedelta
end_date = datetime.today()
start_date = datetime.today() - relativedelta(months=1)
hol = PublicHolidays(start_date=start_date, end_date=end_date)
hol_df = hol.to_spark_dataframe()
display(hol_df.limit(5))
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "holidaydatacontainer"
blob_relative_path = "Processed"
blob_sas_token = r""
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
blob_sas_token)
print('Remote blob path: ' + wasbs_path)
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))
Azure Synapse
# This is a package in preview.
from azureml.opendatasets import PublicHolidays
from datetime import datetime
from dateutil import parser
from dateutil.relativedelta import relativedelta
end_date = datetime.today()
start_date = datetime.today() - relativedelta(months=1)
hol = PublicHolidays(start_date=start_date, end_date=end_date)
hol_df = hol.to_spark_dataframe()
# Display top 5 rows
display(hol_df.limit(5))
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "holidaydatacontainer"
blob_relative_path = "Processed"
blob_sas_token = r""
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
blob_sas_token)
print('Remote blob path: ' + wasbs_path)
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))