Skip to content

Commit

Permalink
deleted outdated functions, added more clarity to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
amandaha8 authored and edasmalchi committed Jun 25, 2024
1 parent 69b2507 commit 41aac05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 4 additions & 2 deletions docs/publishing/sections/10_deploy_to_portfolio.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ After your Jupyter Notebook, README.md, and `.yml` files are setup properly, it'

**Note:** The build command must be run from the root of the repo at `~/data-analyses`!

1. Navigate back to the repo data-analyses and install the portfolio requirements with
1. Navigate back to the `~/data-analyses` and install the portfolio requirements with
`pip install -r portfolio/requirements.txt`
2. Then run `python portfolio/portfolio.py build my_report` to build your report
- **Note:** `my_report.yml` will be replaced by the name of your `.yml` file in [data-analyses/portfolio/sites](https://github.com/cal-itp/data-analyses/tree/main/portfolio/sites).
Expand Down Expand Up @@ -44,14 +44,16 @@ After your Jupyter Notebook, README.md, and `.yml` files are setup properly, it'
- Pass-through flag to papermill; if true, papermill will not actually execute cells.
- `--execute-papermill / --no-execute-papermill`
- If false, will skip calls to papermill
- For example, if only the `README.md` is updated but the notebooks have remained the same, you would run
`python portfolio/portfolio.py build my_report --no-execute-papermill --deploy`.
- `--no-stderr / --no-no-stderr`
- If true, will clear stderr stream for cell outputs
- `--continue-on-error / --no-continue-on-error`
- Default: no-continue-on-error

## Adding to the Makefile

Another way to write to the Analytics Portfolio is to use the Makefile and run
Another and more efficient way to write to the Analytics Portfolio is to use the Makefile and run
`make build_my_report -f Makefile` in data-analyses

Example makefile in [`cal-itp/data-analyses`](https://github.com/cal-itp/data-analyses/blob/main/Makefile):
Expand Down
11 changes: 1 addition & 10 deletions docs/publishing/sections/5_notebooks_styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ These are a set of principles to adhere to when writing the narrative content in
- A good rule of thumb is to start with 1 extra decimal place than what is present in the other columns when deriving statistics (averages, percentiles), and decide from there if you want to round up.
- An average of `$100,000.0` can simply be rounded to `$100,000`.
- An average of 5.2 mi might be left as is.
- National Institutes of Health [Rounding Rules](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4483789/table/ARCHDISCHILD2014) (full [article](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4483789/#:~:text=Ideally%20data%20should%20be%20rounded,might%20call%20it%20Goldilocks%20rounding.&text=The%20European%20Association%20of%20Science,2%E2%80%933%20effective%20digits%E2%80%9D.))
- National Institutes of Health [Rounding Rules](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4483789/#:~:text=Ideally%20data%20should%20be%20rounded,might%20call%20it%20Goldilocks%20rounding.&text=The%20European%20Association%20of%20Science,2%E2%80%933%20effective%20digits%E2%80%9D.)

- Additional references: [American Psychological Association (APA) style](https://apastyle.apa.org/instructional-aids/numbers-statistics-guide.pdf), and [Purdue](https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/apa_numbers_statistics.html)

Expand All @@ -89,13 +89,4 @@ These are a set of principles to adhere to when writing the narrative content in
route_names,
on = ["calitp_itp_id", "route_id"]
)
agency_names = portfolio_utils.add_agency_name()
# Merge in the operator's name using calitp_itp_id
df = pd.merge(df,
agency_names,
on = "calitp_itp_id"
)
```

0 comments on commit 41aac05

Please sign in to comment.