Ignora esplorazione

US Consumer Price Index

labor statistics cpi

Il Consumer Price Index (CPI) è una misura della variazione media nel tempo dei prezzi pagati dai consumatori urbani per un paniere di beni di consumo e servizi.

Il file LEGGIMI contenente informazioni dettagliate su questo set di dati è disponibile nella posizione del set di dati originale

Il set di dati viene generato dai dati del Consumer Price Index pubblicati da US Bureau of Labor Statistics (BLS). Per informazioni sui termini e sulle condizioni per l’utilizzo di questo set di dati, vedi le informazioni sui collegamenti e sul copyright e le informative importanti sul sito Web.

Posizione di archiviazione

Questo set di dati è archiviato nell’area Stati Uniti orientali di Azure. L’allocazione delle risorse di calcolo nell’area Stati Uniti orientali è consigliata per motivi di affinità.

Set di dati correlati

Notifiche

MICROSOFT FORNISCE I SET DI DATI APERTI DI AZURE “COSÌ COME SONO”. MICROSOFT NON OFFRE ALCUNA GARANZIA O CONDIZIONE ESPLICITA O IMPLICITA RELATIVAMENTE ALL’USO DEI SET DI DATI DA PARTE DELL’UTENTE. NELLA MISURA MASSIMA CONSENTITA DALLE LEGGI LOCALI, MICROSOFT NON RICONOSCE ALCUNA RESPONSABILITÀ RELATIVAMENTE A DANNI O PERDITE COMMERCIALI, INCLUSI I DANNI DIRETTI, CONSEQUENZIALI, SPECIALI, INDIRETTI, INCIDENTALI O PUNITIVI DERIVANTI DALL’USO DEI SET DI DATI DA PARTE DELL’UTENTE.

Questo set di dati viene fornito in conformità con le condizioni originali in base alle quali Microsoft ha ricevuto i dati di origine. Il set di dati potrebbe includere dati provenienti 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

area_code item_code series_id year period value footnote_codes seasonal periodicity_code series_title item_name area_name
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2017 M12 279.974 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2018 M01 284.456 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2018 M01 284.456 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2018 M01 284.456 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
S49E SEHF01 CUURS49ESEHF01 2018 M01 284.456 nan U R Electricity in San Diego-Carlsbad, CA, all urban consumers, not seasonally adjusted Electricity San Diego-Carlsbad, CA
Name Data type Unique Values (sample) Description
area_code string 70 0000
0300

Codice univoco usato per identificare un’area geografica specifica. I codici completi per le aree sono disponibili qui: http://download.bls.gov/pub/time.series/cu/cu.area

area_name string 69 U.S. city average
South

Nome dell’area geografica specifica. Vedi https://download.bls.gov/pub/time.series/cu/cu.area per informazioni su tutti i nomi e i codici delle aree.

footnote_codes string 3 nan
U

Identifica la nota a piè di pagina per la serie temporale. La maggior parte dei valori è Null.

item_code string 515 SA0E
SAF11

Identifica l’elemento a cui fanno riferimento le osservazioni di dati. Vedi https://download.bls.gov/pub/time.series/cu/cu.item per informazioni su tutti i nomi e i codici degli elementi.

item_name string 515 Energy
Food at home

Nomi completi degli elementi. Vedi https://download.bls.gov/pub/time.series/cu/cu.txt per informazioni sui nomi e sui codici degli elementi.

period string 16 S01
S02

Identifica il periodo dell’osservazione dei dati. Formato: M01-M13 o S01-S03 (M= mensile, M13= media annuale, S= semestrale). Ad esempio: M06= giugno. Vedi https://download.bls.gov/pub/time.series/cu/cu.period per informazioni sui nomi e sui codici dei periodi.

periodicity_code string 3 R
S

Frequenza dell’osservazione dei dati. S= semestrale; R= regolare.

seasonal string 1,043 U
S

Codice che identifica se i dati vengono modificati in base alla stagione. S= con modifica stagionale; U= senza modifica stagionale.

series_id string 16,683 CUURS300SAD
CUURS300SAF11

Codice che identifica le serie specifiche. Una serie temporale fa riferimento a un set di dati osservato per un periodo esteso di tempo in intervalli di tempo coerenti, ad esempio ogni mese, ogni trimestre, due volte all’anno, ogni anno. I dati delle serie temporali BLS vengono in genere prodotti a intervalli mensili e rappresentano dati che vanno da un bene di consumo specifico in un’area geografica specifica il cui prezzo viene raccolto ogni mese a una categoria di lavoratore in un settore specifico il cui tasso di occupazione viene registrato ogni mese e così via. Per altre informazioni, vedi https://download.bls.gov/pub/time.series/cu/cu.txt.

series_title string 8,336 Shelter in Size Class A, all urban consumers, not seasonally adjusted
Nondurables in New York-Newark-Jersey City, NY-NJ-PA, all urban consumers, not seasonally adjusted

Nome della serie per il valore series_id corrispondente. Vedi https://download.bls.gov/pub/time.series/cu/cu.series per informazioni sugli ID e sui nomi delle serie.

value float 310,603 100.0
101.0999984741211

Indice di prezzo per l’elemento.

year int 25 2018
2017

Identifica l’anno dell’osservazione.

Select your preferred service:

Azure Notebooks

Azure Databricks

Azure Synapse

Azure Notebooks

Package: Language: Python Python
In [2]:
# This is a package in preview.
from azureml.opendatasets import UsLaborCPI

usLaborCPI = UsLaborCPI()
usLaborCPI_df = usLaborCPI.to_pandas_dataframe()
ActivityStarted, to_pandas_dataframe
ActivityStarted, to_pandas_dataframe_in_worker
Looking for parquet files...
Reading them into Pandas dataframe...
Reading cpi/part-00000-tid-8289857611821412231-4ef1bca9-6386-4e12-8c7a-31d3ff5d4bc7-3154-1-c000.snappy.parquet under container laborstatisticscontainer
Done.
ActivityCompleted: Activity=to_pandas_dataframe_in_worker, HowEnded=Success, Duration=29342.59 [ms]
ActivityCompleted: Activity=to_pandas_dataframe, HowEnded=Success, Duration=29374.5 [ms]
In [3]:
usLaborCPI_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 11624937 entries, 0 to 11624936
Data columns (total 12 columns):
area_code           object
item_code           object
series_id           object
year                int32
period              object
value               float32
footnote_codes      object
seasonal            object
periodicity_code    object
series_title        object
item_name           object
area_name           object
dtypes: float32(1), int32(1), object(10)
memory usage: 975.6+ MB
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 = "laborstatisticscontainer"
folder_name = "cpi/"
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.
from azureml.opendatasets import UsLaborCPI

usLaborCPI = UsLaborCPI()
usLaborCPI_df = usLaborCPI.to_spark_dataframe()
ActivityStarted, to_spark_dataframe ActivityStarted, to_spark_dataframe_in_worker ActivityCompleted: Activity=to_spark_dataframe_in_worker, HowEnded=Success, Duration=3007.07 [ms] ActivityCompleted: Activity=to_spark_dataframe, HowEnded=Success, Duration=3011.43 [ms]
In [2]:
display(usLaborCPI_df.limit(5))
area_codeitem_codeseries_idyearperiodvaluefootnote_codesseasonalperiodicity_codeseries_titleitem_namearea_name
S49ESEHF01CWURS49ESEHF01 2017M12279.976nanURElectricity in San Diego-Carlsbad, CA, urban wage earners and clerical workers, not seasonally adjustedElectricitySan Diego-Carlsbad, CA
S49ESEHF01CWURS49ESEHF01 2017M12279.976nanURElectricity in San Diego-Carlsbad, CA, urban wage earners and clerical workers, not seasonally adjustedElectricitySan Diego-Carlsbad, CA
S49ESEHF01CWURS49ESEHF01 2017M12279.976nanURElectricity in San Diego-Carlsbad, CA, urban wage earners and clerical workers, not seasonally adjustedElectricitySan Diego-Carlsbad, CA
S49ESEHF01CWURS49ESEHF01 2017M12279.976nanURElectricity in San Diego-Carlsbad, CA, urban wage earners and clerical workers, not seasonally adjustedElectricitySan Diego-Carlsbad, CA
S49ESEHF01CWURS49ESEHF01 2017M12279.976nanURElectricity in San Diego-Carlsbad, CA, urban wage earners and clerical workers, not seasonally adjustedElectricitySan Diego-Carlsbad, CA
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "laborstatisticscontainer"
blob_relative_path = "cpi/"
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
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "laborstatisticscontainer"
blob_relative_path = "cpi/"
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'))