Skip to main content

!RefLibrary_qmdDocs

QMD Documentation Quick Reference Library

QMD Documentation Quick Reference Library

Creating .qmd Documentation

This is intended to serve as a basic reference for .qmd documents

Most start with a YAML (that is the title at the top of this page in between two sets of three dahes).

Code Chunks - FYI

When creating .qmd documents you can use the following to create code chunks. Eval (evaluation) means you want the code chunk to actually run and display its results in the final document, while include means that you want to display the code chunk (false would mean to hide it) in the final document.

```{r eval=TRUE, include=TRUE} code goes between this and the three end quotes, but each on it's own line.```
```{SQL eval=TRUE, include=TRUE} code ```
```{python eval=TRUE, include=TRUE} code ```

Sample Section Header

This is text, usually with a space between this and the header

SampleSubHeader

This is text, usually with a space between this and the header

  • List
  • List
    • SubList indented
    • SubList indented

SampleSubSubHeader

This is text, usually with a space between this and the header

SampleSubSubSubHeader

This is text, usually with a space between this and the header

This is a code chuck

# THIS IS THE COMMENT

# if you haven't already, open a Terminal and 
# pip install datetime

import datetime

# THIS IS ALSO A COMMENT

the_month = datetime.datetime.now().month
the_day = datetime.datetime.now().day
the_year = datetime.datetime.now().year


# Get the current and next year
current_year = datetime.datetime.now().year
next_year = current_year + 1


print(the_month)


print(the_day)


print(the_year)


print(current_year)


print(next_year)


print(datetime.datetime.now())


print(the_month,the_day,the_year)


print(f"{the_month}/{the_day}/{the_year}")
8
15
2024
2024
2025
2024-08-15 13:24:46.933700
8 15 2024
8/15/2024

Popular posts from this blog

I can't find my Blogger.com DNS record?! Here's how to find it. It took me a long time because Google's own instructions fail.

I use Blogger.com for my websites. I find it easier to use without having to know a lot of technical things.  However, I bought my domain names from a third-party website, and I host them on Blogger.com.  After years of this, I tried a hosted Word Press site, I found the GUI awful and editor even worse. I'm sure it has amazing features and it looked pretty, but it was absolutely useless to me as a writer. So... I went back to Blogger.com, but ran into an odd issue. I needed my personal DNS record to provide to my domain provider.  The Google instructions " Set up a custom domain " say that I should get a pop-up message with my DNS records. There is noplace in the blogger interface to find the DNS record that I can find, neither in the website or elsewhere. That is an odd user interface failure. Others expressed the same issue and even ChatGPT4o Pro couldn't help, it kept taking me back to these instructions.  Finally! I found the answer on this page: Why I'm not g...

Are gas prices affected by the sitting US President (Under Construction, testing html view)

Gas Prices in USA, historical analysis This report is intended to review gas prices in the USA historically for comparison against various claims. One such claim is that the sitting US President has a direct affect on gas prices. Data from the EIA - US Energy Information Administration This dataframe set GasPrices_eia_prices_1970_2022 comes from the EIA website as a downloadable CSV. The EIA provides an FAQ for using the data, which includes instructions to download the CSV and for a reference Excel document that helps with conversion. “To obtain the historical prices from the SEDS data, use the CSV file for All States—Prices. In the file, the code for gasoline prices for the transportation sector, in $/MMBtu , is: State Abbreviation (in column A) and MGACD (in column B). For example, the code for Alaska is AK—MGACD . Those prices, in $/MMBtu, can be converted to approximate dollars per gallon using the heat contents in Table A3 Petroleum consumption and fuel eth...

Goal: Analyze real tangible differences in quality of life for American citizens

Goal: Analyze real tangible differences in quality of life for American citizens QUESTION ONE ChatGPT o1 Prompt: I want to analyze real tangible differences in quality of life for American citizens against government policies, economic conditions, healthcare system, prison system, mental health systems. There are no simple answers. I could also see how an analyze could get so convoluted as to be unhelpful. I have also learned that when it comes to data, we should ask smaller questions and then compiles the results of a lot of smaller questions, rather than trying to grab one sweeping dataset. That being said, before we worry about the status of systems or policies, let's consider what datasets could serve as indicators of quality of life, extrapolating out over decades?    Write this same answer but with links to each of those sites ChatGPT o1 Answer: Analyzing the quality of life over decades requires a multifaceted approach that incorporates various indicators reflecting the...