This file contains hidden or 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
# Author: Randy Runtsch | |
# Date: May 23, 2023 | |
# Title: get_stock_data.py | |
# Description: Create and instance of class c_stock and call its | |
# get_eod_stock_date function to obtain daily closing prices | |
# and get_real_time_stock_quotes to obtain the latest price quote. | |
from c_stock import c_stock | |
from api_secrets import api_token |
This file contains hidden or 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
# | |
# Name: c_who_mortality.py | |
# Date: April 17, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# Obtain WHO Global Observatory (GO) records in JSON format with the GHO Odata API for IndicatorCode: NCDMORT3070, | |
# IndicatorName: Probability (%) of dying between age 30 and exact age 70 from any of | |
# cardiovascular disease, cancer, diabetes, or chronic respiratory disease. |
This file contains hidden or 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
# | |
# Name: c_country_pop.py | |
# Date: November 15, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# Get the mid-year population estimates for a country for the specified year. | |
# Write the data to a CSV file. |
This file contains hidden or 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
# | |
# Name: get_us_debt.py | |
# Date: April 22, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# Use the c_us_debt class to obtain the total debt | |
# owed by the US federal government, by day, for a range | |
# of dates. |
This file contains hidden or 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
# | |
# Name: c_us_debt.py | |
# Date: April 22, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# Obtain all US debt records, for the specified date range, | |
# as JSON structures, from the Treasury Direct Debt Informatin API. | |
# Write each record to the specified output folder and file. |
This file contains hidden or 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
# | |
# Name: c_nasa_fireball_data.py | |
# Date: April 15, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# Obtain all fireball records, as JSON structures, from the NASA Jet Propulsion Lab Fireball API. | |
# Write each record to the specified output folder and file. | |
# |
This file contains hidden or 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
# | |
# Name: c_bls_data.py | |
# Date: April 14, 2022 | |
# Author: Randy Runtsch | |
# | |
# Description: | |
# | |
# The c_bls_data class uses Version 2 of the US Bureau of Labor Statistics (BLS) API | |
# to obtain one of more series of BLS data. It retrieves the data in | |
# JavaScript Object Notation (JSON) format, converts the data to CSV records, |
This file contains hidden or 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
-- File: customer_location_json.sql | |
-- Date: March 31, 2022 | |
-- Author: Randy Runtsch | |
-- Description: Get the names and location (city, state or province, | |
-- postal code, and country or region name | |
-- for all customers in the AdventureWorks2019 database. | |
-- Return the data in JSON format. | |
USE AdventureWorks2019; |
This file contains hidden or 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
-- File: customer_location_csv.sql | |
-- Date: March 31, 2022 | |
-- Author: Randy Runtsch | |
-- Description: Get the names and location (city, state or province, | |
-- postal code, and country or region name | |
-- for all customers in the AdventureWorks2019 database. | |
-- Return the data in plain text format. | |
USE AdventureWorks2019; |
This file contains hidden or 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
# Name: c_usda_quick_stats.py | |
# Author: Randy Runtsch | |
# Date: March 29, 2022 | |
# Project: Query USDA QuickStats API | |
# Author: Randall P. Runtsch | |
# | |
# Description: Query the USDA QuickStats api_GET API with a specified set of | |
# parameters. Write the retrieved data, in CSV format, to a file. | |
# | |
# See Quick Stats (NASS) API user guide: https://quickstats.nass.usda.gov/api |
NewerOlder