Ignorar Navegação

Public Holidays

Public Holidays

Dados de feriados nacionais de todo o mundo obtidos com base nos pacotes de férias PyPI e na Wikipedia, abrangendo 38 países ou regiões de 1970 a 2099.

Cada linha indica as informações de feriados para uma data, um país ou uma região específicos e se a maioria das pessoas não vê o ordenado sofrer descontos por esses dias.

Volume e Retenção

Este conjunto de dados é armazenado no formato Parquet. É um instantâneo com informações de feriados que vai desde 01/07/1970 a 01/01/2099. O tamanho dos dados é de aproximadamente 500 KB.

Localização do Armazenamento

Este conjunto de dados é armazenado na região do Azure E.U.A. Leste. A alocação de recursos de computação nos E.U.A. Leste é recomendada por questões de afinidade.

Informações adicionais

Este conjunto de dados combina dados obtidos na Wikipedia (WikiMedia Foundation Inc) e com base nos pacotes de férias PyPI.

O conjunto de dados combinado é fornecido ao abrigo da Licença Attribution-ShareAlike 3.0 Unported da Creative Commons.

Se tiver dúvidas sobre a origem de dados, envie um e-mail para .

Avisos

A MICROSOFT DISPONIBILIZA OS CONJUNTOS DE DADOS ABERTOS DO AZURE TAL COMO ESTÃO. A MICROSOFT NÃO FAZ GARANTIAS, EXPRESSAS OU IMPLÍCITAS, NEM CONDIÇÕES RELATIVAMENTE À SUA UTILIZAÇÃO DOS CONJUNTOS DE DADOS. ATÉ AO LIMITE MÁXIMO PERMITIDO PELA LEGISLAÇÃO LOCAL, A MICROSOFT REJEITA QUALQUER RESPONSABILIDADE POR DANOS OU PERDAS, INCLUINDO DIRETOS, CONSEQUENCIAIS, ESPECIAIS, INDIRETOS, INCIDENTAIS OU PUNITIVOS, QUE RESULTEM DA SUA UTILIZAÇÃO DOS CONJUNTOS DE DADOS.

Este conjunto de dados é disponibilizado de acordo com os termos originais em que a Microsoft recebeu os dados de origem. O conjunto de dados pode incluir dados obtidos junto da Microsoft.

Access

Available inWhen 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

Nome completo do país ou região.

countryRegionCode string 35 SE
NO

O código do país ou região de acordo com o formato que pode encontrar aqui.

date timestamp 20,665 2037-01-01 00:00:00
2032-01-01 00:00:00

A data do feriado.

holidayName string 483 Søndag
Söndag

Nome completo do feriado.

isPaidTimeOff boolean 3 True

Indica se a maioria das pessoas tiveram tempo de descanso pago nesta data (apenas disponível para EUA, Reino Unido e Índia neste momento). Se for nulo, significa “desconhecido”.

normalizeHolidayName string 438 Søndag
Söndag

Nome normalizado do feriado.

Select your preferred service:

Azure Notebooks

Azure Databricks

Azure Synapse

Azure Notebooks

Package: Language: Python Python
In [1]:
# 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()
ActivityStarted, to_pandas_dataframe ActivityStarted, to_pandas_dataframe_in_worker Looking for parquet files... Reading them into Pandas dataframe... Reading Processed/part-00000-tid-8575944798531137721-7b2fbd47-2ae5-45fd-b8b5-daa663d33177-649-c000.snappy.parquet under container holidaydatacontainer Done. ActivityCompleted: Activity=to_pandas_dataframe_in_worker, HowEnded=Success, Duration=955.3 [ms] ActivityCompleted: Activity=to_pandas_dataframe, HowEnded=Success, Duration=958.23 [ms]
In [2]:
hol_df.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 34 entries, 25706 to 25739 Data columns (total 6 columns): countryOrRegion 34 non-null object holidayName 34 non-null object normalizeHolidayName 34 non-null object isPaidTimeOff 1 non-null object countryRegionCode 34 non-null object date 34 non-null datetime64[ns] dtypes: datetime64[ns](1), object(5) memory usage: 1.9+ KB
In [1]:
# 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
In [2]:
# Azure storage access info
azure_storage_account_name = "azureopendatastorage"
azure_storage_sas_token = r""
container_name = "holidaydatacontainer"
folder_name = "Processed"
In [3]:
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)
In [4]:
# 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)
In [5]:
# you can add your filter at below
print('Loaded as a Pandas data frame: ')
df
In [6]:
 

Azure Databricks

Package: Language: Python Python
In [1]:
# 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()
ActivityStarted, to_spark_dataframe ActivityStarted, to_spark_dataframe_in_worker ActivityCompleted: Activity=to_spark_dataframe_in_worker, HowEnded=Success, Duration=2221.62 [ms] ActivityCompleted: Activity=to_spark_dataframe, HowEnded=Success, Duration=2223.36 [ms]
In [2]:
display(hol_df.limit(5))
countryOrRegionholidayNamenormalizeHolidayNameisPaidTimeOffcountryRegionCodedate
NorwaySøndagSøndagnullNO2019-06-16T00:00:00.000+0000
South AfricaYouth DayYouth DaynullZA2019-06-16T00:00:00.000+0000
SwedenSöndagSöndagnullSE2019-06-16T00:00:00.000+0000
UkraineТрійцяТрійцяnullUA2019-06-16T00:00:00.000+0000
ArgentinaDía Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]Día Pase a la Inmortalidad del General Martín Miguel de Güemes [Day Pass to the Immortality of General Martín Miguel de Güemes]nullAR2019-06-17T00:00:00.000+0000
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "holidaydatacontainer"
blob_relative_path = "Processed"
blob_sas_token = r""
In [2]:
# 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)
In [3]:
# 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')
In [4]:
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))

Azure Synapse

Package: Language: Python Python
In [33]:
# 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()
In [34]:
# Display top 5 rows
display(hol_df.limit(5))
Out[34]:
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "holidaydatacontainer"
blob_relative_path = "Processed"
blob_sas_token = r""
In [2]:
# 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)
In [3]:
# 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')
In [4]:
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))