-
Notifications
You must be signed in to change notification settings - Fork 23
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 cost and time estimates as well #31
Comments
Is it a requirement that I have mongodb installed on my local machine in order to access the data? |
@styoung3 the data is a mongodump, so you do need to have mongodb installed. The instructions ( docker is authorized by IT; you can file a ticket to have it installed on your laptop. |
Attempting to use the load_mongodump.sh helper script. It claims the file doesn't exist, but I can see it exists in my directory. Any idea why this is happening? I am operating in the dark here. em-public-dashboard % ls em-public-dashboard % bash viz_scripts/docker/load_mongodump.sh canbikeco_mongodump_participant_only_jan_31_2021.tar.gz |
The tar error is coming from the container. It looks like the file is not copied correctly? I can take a look, but if you want to debug,
to find the container name, and then
to access the container's shell |
This is because the step to copy the file into the container is commented out!?!? |
I commented it out in 73b9daf but I was wrong. We can pass in the value as an environment variable, but we still need to copy it first!! |
@styoung3 can you restore that line, confirm that it works and then submit a pull request? |
Calculating $/PMT for 'Car, drove alone', 'Car, with others', and 'Taxi/Uber/Lyft' using average fuel economy from here: https://afdc.energy.gov/data/10310 and average gas prices from here: https://gasprices.aaa.com/state-gas-price-averages/. Assuming regular gas type, and divide by two for 'Car, with others'. This is simplified but functional for now. |
@styoung3 there are actually calculators for mileage that take maintenance etc into account in addition to the fuel costs. We should also account for the drivers' salary for taxi/uber/lyft. Given US labor costs, that is likely to be much larger than the fuel costs. I would suggest that you understand the existing code and write the unit tests first and then we can discuss what the actual values for cost and time should be (I have some references). |
How do I run my unit_tests.py script inside the docker environment? I am getting an error when I attempt to run it from visual studio code (see below). Another way of asking this is, is there another way to edit and run code in the docker environment than just Jupyter Notebooks? It looks like I can run a terminal through Jupyter Notebook actually. Nice! Error MessageTraceback (most recent call last): |
@styoung3 If you want to run scripts inside the docker container from outside, you need to use Again, you may want to read up a bit more on what containerization means and how it works. |
For the cost estimates, we want to use the cost to the user. So this should take into account fuel, but also maintenance etc
|
For time estimates, given that we cannot capture wait times, parking times, or times to drop off passengers in the pool (if any), we thought that we could use average speeds for other trips using the replaced mode. So you would calculate the speeds for trips in the dataset labeled Please write a separate function to compute the mean/median speeds. We can then think about whether we should compute these weekly or compute them once and then keep them constant. |
To refactor the existing impact code, I would suggest something like:
There's even more potential fixes to make the
|
How do I import the scaffolding file as a module in the tests files that are in a separate directory?
https://blog.finxter.com/python-how-to-import-modules-from-another-folder/ says I can do dot notation using __init__.py, but I can't get it to work. |
@styoung3 what error do you get? |
We want to add simple cost and time estimates to assess the broader impacts of programs.
We will do so by creating simple distance-based maps for each metric - e.g.
We can then compute the overall impact of the metric by pseudo code similar to:
Of course, we could also use pandas if that works better - e.g. something like:
The text was updated successfully, but these errors were encountered: