Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new /prototype endpoint #220

Merged
merged 12 commits into from Jul 3, 2023
Merged

Add new /prototype endpoint #220

merged 12 commits into from Jul 3, 2023

Conversation

juliasilge
Copy link
Member

Closes #197

@juliasilge
Copy link
Member Author

This is working well, I think! I put a model deployed with this PR here:
https://colorado.posit.co/rsc/chicago-ridership/

This means we can finally resolve #116 like this:

url <- "https://colorado.posit.co/rsc/chicago-ridership/prototype"
r <- httr::GET(url)
prototype <- httr::content(r, as = "text", encoding = "UTF-8")
cereal::cereal_from_json(prototype)
#> # A tibble: 0 × 49
#> # ℹ 49 variables: Austin <dbl>, Quincy_Wells <dbl>, Belmont <dbl>,
#> #   Archer_35th <dbl>, Oak_Park <dbl>, Western <dbl>, Clark_Lake <dbl>,
#> #   Clinton <dbl>, Merchandise_Mart <dbl>, Irving_Park <dbl>,
#> #   Washington_Wells <dbl>, Harlem <dbl>, Monroe <dbl>, Polk <dbl>,
#> #   Ashland <dbl>, Kedzie <dbl>, Addison <dbl>, Jefferson_Park <dbl>,
#> #   Montrose <dbl>, California <dbl>, temp_min <dbl>, temp <dbl>,
#> #   temp_max <dbl>, temp_change <dbl>, dew <dbl>, humidity <dbl>, …

Created on 2023-06-09 with reprex v2.0.2

@juliasilge juliasilge marked this pull request as ready for review June 9, 2023 21:40
@juliasilge
Copy link
Member Author

When you get a chance @isabelizimm, I redeployed this model as well and you can see the /prototype endpoint here:
Screenshot 2023-06-09 at 3 50 54 PM

Could you try out what it would look like to use that from Python to determine what data needs to look like to make predictions? I'll do the same the other way around.

@isabelizimm isabelizimm self-assigned this Jun 20, 2023
Copy link

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When pulling the information given at the /prototype endpoint into a pandas DataFrame in Python, this is what the result looks like. All of the columns have the type object.

Screenshot 2023-06-20 at 12 55 28 PM

@juliasilge juliasilge merged commit 380b4e2 into main Jul 3, 2023
9 checks passed
@juliasilge juliasilge deleted the prototype-endpoint branch July 3, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new GET endpoint for /prototype
2 participants