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 raw data url #4

Open
wants to merge 2 commits into
base: feature/structure-scooter-rides-weekend-vs-weekday
Choose a base branch
from

Conversation

OTStats
Copy link

@OTStats OTStats commented Oct 8, 2019

instead downloading files locally, using raw data url on github for reproducibility

instead downloading files locally, using raw data url on github for reproducibility
@combinatorist
Copy link
Member

combinatorist commented Dec 19, 2019

Wait, @OTStats, did you actually try running this on the new file location?

I just tried and got the following error:

Warning: 8095 parsing failures.         
 row                   col               expected  actual     
             file        
1111 availability_duration no trailing characters :-35:-2 'https://raw.githubusercontent.com/code-for-nashville/open-data-portal/feature/scooter-2019-09-clean-up/nashville/scooter-data/scooter_extract_2019-07-20_t
o_2019-09-09.csv'

...

@combinatorist
Copy link
Member

I started exploring and noticed that the columns don't match between the code importing the data and the data itself. For example, it looks like the data also includes a columns for company info and scooter ids and it has columns in a different order.

But, maybe I am misreading the R code, does column order not matter in read_csv? It looks like it wouldn't as long as col_names = TRUE by default. https://readr.tidyverse.org/reference/read_delim.html

@combinatorist
Copy link
Member

But, even if the column order is a red-herring, then I am still getting the error above, I just can't explain it as easily.

@combinatorist
Copy link
Member

combinatorist commented Dec 19, 2019

FWIW, I also noticed that the file does not end properly. It looks like it missing a quote on the end of the file name in the last line.

@OTStats
Copy link
Author

OTStats commented Dec 19, 2019

Looks like you noticed the one error, of missing the end quotation for the file name. Fixing this should solve your problems. I don't know what you meant by: ... did you actually try running this on the new file location? I don't know how you're running this code, Ibut noticed you have a renv folder with activate.R -- which I have yet to investigate.

But as aforementioned, after fixing the quotation the gist will run successfully in RStudio. Otherwise, if you delete the last line and the pipe operator the plot will display in the console. (Again, not sure how you're running this)

... at end of script
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.

None yet

2 participants