Skip to content

Commit

Permalink
Examples README (#738)
Browse files Browse the repository at this point in the history
* add examples/README.md, update pmms and python examples titles

* Apply suggestions from code review

Co-authored-by: Philippe Rivière <[email protected]>

* update deploy.yml with new project names

---------

Co-authored-by: Allison Horst <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
  • Loading branch information
3 people authored Feb 9, 2024
1 parent f52bc22 commit a9a12cc
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 18 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,41 @@ jobs:
'examples/*/yarn.lock'
- run: yarn --frozen-lockfile
- run: yarn build
- name: Build example "api"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/api
- name: Build example "chess"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/chess
- name: Build example "eia"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/eia
env:
EIA_KEY: ${{ secrets.EIA_KEY }}
- name: Build example "google-analytics"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/google-analytics
env:
GA_PROPERTY_ID: ${{ vars.GA_PROPERTY_ID }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
- name: Build example "eia"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/eia
env:
EIA_KEY: ${{ secrets.EIA_KEY }}
- name: Build example "hello-world"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/hello-world
- name: Build example "plot"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/plot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build example "pmms"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/pmms
- name: Build example "api"
- name: Build example "mortgage-rates"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/api
- name: Build example "python"
working-directory: examples/mortgage-rates
- name: Build example "penguin-classification"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
yarn --frozen-lockfile && yarn build
working-directory: examples/python
working-directory: examples/penguin-classification
- name: Build example "plot"
run: yarn --frozen-lockfile && yarn build
working-directory: examples/plot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir dist/examples && for i in examples/*; do if [ -d $i/dist ]; then mv -v $i/dist dist/examples/$(basename $i); fi; done
- uses: cloudflare/pages-action@1
with:
Expand Down
14 changes: 14 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Observable Framework examples

*First:* [Get started with Observable Framework](https://observablehq.com/framework/getting-started)

*This repository shows different flavors and features of what you can build with Framework:*

- **API** — Millions of API requests, stored in Arrow format, are analyzed in a report. [[code](./api)] [[live project](https://observablehq.com/framework/examples/api/)]
- **Chess** — A data loader that retrieves several large zip files from the FIDE, extracts information about the top 10 players, and displays a rank chart. [[code](./chess)] [[live project](https://observablehq.com/framework/examples/chess/)]
- **EIA** — JavaScript data loaders retrieve hourly data from the U.S. Energy Information Administration API to produce a map and time series charts. [[code](./eia)] [[live project](https://observablehq.com/framework/examples/eia/)]
- **Google analytics** — Load data from the G.A. API and analyze your website’s traffic. [[code](./google-analytics)] [[live project](https://observablehq.com/framework/examples/google-analytics/)]
- **Hello, world!** — A minimal test. [[code](./hello-world)] [[live project](https://observablehq.com/framework/examples/hello-world/)]
- **Plot** — TypeScript data loaders that access metadata from the Observable Plot Github repo. [[code](./plot)] [[live project](https://observablehq.com/framework/examples/plot/)]
- **Mortgage rates** — A small dashboard reproducing Freddie Mac’s historic mortgage rates dashboard. [[code](./mortgage-rates)] [[live project](https://observablehq.com/framework/examples/mortgage-rates/)]
- **Penguin classification** — In a Python data loader, we use logistic regression to predict penguin species based on body size measurements. [[code](./penguin-classification)] [[live project](https://observablehq.com/framework/examples/penguin-classification/)]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
toc: false
---

# Classification prediction
# Penguin classification

```js
const predictions = FileAttachment("data/predictions.csv").csv({typed: true});
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a9a12cc

Please sign in to comment.