Skip to content

Commit

Permalink
format readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nonnontrivial committed Apr 28, 2024
1 parent 27b17e0 commit a7380f1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,32 @@ pip install -r requirements.txt
python -m uvicorn ctts.api:app --reload
```


- artificial sky brightness (light pollution)
- predictive sky brightness

### endpoints

#### `/api/v1/pollution`

Gets the approximate artificial sky brightness map [RGBA pixel value](https://djlorenz.github.io/astronomy/lp2022/colors.html) for a lat and lon (for the year 2022).
Gets the approximate artificial sky brightness
map [RGBA pixel value](https://djlorenz.github.io/astronomy/lp2022/colors.html) for a lat and lon (for the year 2022).

```sh
curl "localhost:8000/api/v1/pollution?lat=40.7277478&lon=-74.0000374"
```

```json
{"r":255,"g":255,"b":255,"a":255}
{
"r": 255,
"g": 255,
"b": 255,
"a": 255
}
```

#### `/api/v1/prediction`

Gets the predicted sky brightness at `lat` and `lon`.
Gets the predicted sky brightness at `lat` and `lon` for the current time.

```sh
curl "http://localhost:8000/api/v1/prediction?lat=-30.2466&lon=-70.7494"
Expand All @@ -49,12 +54,11 @@ curl "http://localhost:8000/api/v1/prediction?lat=-30.2466&lon=-70.7494"

```json
{
"sky_brightness": 22.0388
"sky_brightness": 22.0388
}
```


#### swagger ui
### swagger ui

Open the [ui](http://localhost:8000/docs) in a browser.

0 comments on commit a7380f1

Please sign in to comment.