Skip to content

Commit

Permalink
#1085 pandoc! + update readme pagebreaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielwol committed Dec 20, 2024
1 parent d00e15a commit 3b9dd0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 6 additions & 8 deletions dags/ecocounter_open_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,11 @@ def download_locations_open_data()->str:
ORDER BY location_dir_id;" \
--csv -o "$EXPORT_PATH/cycling_permanent_counts_locations.csv"'''

#@task.bash()
#def output_readme()->str:
# return f'''
# pandoc -V geometry:margin=1in \
# -o "{EXPORT_PATH}/cycling_permanent_counts_readme.pdf" \
# volumes/open_data/sql/cycling_permanent_counts_readme.md
# '''
@task.bash()
def output_readme()->str:
source='/home/airflow/data_scripts/volumes/open_data/sql/cycling_permanent_counts_readme.md'
dest='cycling_permanent_counts_readme.pdf'
return f'''pandoc -V geometry:margin=1in -o "{EXPORT_PATH}/{dest}" "{source}"'''

@task(
retries=0,
Expand All @@ -220,7 +218,7 @@ def status_message(ds = None, **context):
update_locations >> [
insert_and_download_data.expand(yr = yrs),
download_locations_open_data(),
#output_readme()
output_readme()
] >>
status_message()
)
Expand Down
6 changes: 3 additions & 3 deletions volumes/open_data/sql/cycling_permanent_counts_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This table contains the locations and metadata about each permanent bicycle coun
| date_decommissioned | date | 2019-06-13 | Date decommissioned. |
| technology | text | Induction - Other | Technology of permanent sensor. |

<!-- \pagebreak used for pandoc formatting -->
\pagebreak

## cycling_permanent_counts_daily_counts.csv

Daily cycling and micromobility volumes by location and direction.
Expand All @@ -37,9 +40,6 @@ Daily cycling and micromobility volumes by location and direction.
| dt | date | 06/26/1994 | Date of count. |
| daily_volume | integer | 939 | Count of users on date `dt`. |

<!-- \pagebreak used for pandoc formatting -->
\pagebreak

## cycling_permanent_counts_15min_counts_YYYY_YYYY.csv

15 minute cycling and micromobility volumes by location and direction. Where 15 minute volumes are not available, 1 hour volumes are provided. The row counts in these files may exceed the limits for Excel.
Expand Down

0 comments on commit 3b9dd0b

Please sign in to comment.