worldbank / Stata-IE-Visual-Library

This is a repository maintained by DIME Analytics and containing example graphs on how to explore data sets and display results of Impact Evaluations using Stata. For information on how to contribute to the library and download codes and data sets, click on the link to GitHub below.
MIT License
48 stars 23 forks source link

Ado File Cannot be Opened #35

Closed xyc9471 closed 5 years ago

xyc9471 commented 5 years ago

In the session of "Chart of marginal effect with results table (export to excel).ipynb"

The first step - running ado. file - does not work. If you run the code:

qui do "https://raw.githubusercontent.com/worldbank/Stata-IE-Visual-Library/develop/Library/Charts/Chart%20of%20marginal%20effect%20with%20results%20table%20using%20excel/chartable.ado"

and also

use "https://github.com/worldbank/Stata-IE-Visual-Library/raw/develop/Library/Charts/Chart%20of%20marginal%20effect%20with%20results%20table%20using%20excel/data.dta", clear

Stata will show "file not found", so they are probably broken links.

kbjarkefur commented 5 years ago

There might be another way to run the ado-file from an URL and the open the data set from an URL, but I would recommend that you clone the repo or download the content and run the file from your local hard drive.

xyc9471 commented 5 years ago

There might be another way to run the ado-file from an URL and the open the data set from an URL, but I would recommend that you clone the repo or download the content and run the file from your local hard drive.

Yes, I tried to download the file on my local drive, but the ado.file shows "404 not found", and the second link is 404 not found too. So I guess it might be something off with the link/file.

kbjarkefur commented 5 years ago

404 not found is an error specific to the HTTP protocol so that should only be possible to occur if you are using URLs. After downloading the files, are you replacing the URLs with your local file path? Like this:

qui do "C:\Users\username\Documents\GitHub\Stata-IE-Visual-Library\Library\Charts\Chart of marginal effect with results table (export to excel)/chartable.ado"

use "C:\Users\username\Documents\GitHub\Stata-IE-Visual-Library\Library\Charts\Chart of marginal effect with results table (export to excel)/data.dta", clear

Or if you are having problems with the actual downloading of the file itself, are you using the green Clone or download button on the landing page of the repo? Click the code tab to get to the landing page.

xyc9471 commented 5 years ago

404 not found is an error specific to the HTTP protocol so that should only be possible to occur if you are using URLs. After downloading the files, are you replacing the URLs with your local file path? Like this:

qui do "C:\Users\username\Documents\GitHub\Stata-IE-Visual-Library\Library\Charts\Chart of marginal effect with results table (export to excel)/chartable.ado"

use "C:\Users\username\Documents\GitHub\Stata-IE-Visual-Library\Library\Charts\Chart of marginal effect with results table (export to excel)/data.dta", clear

Or if you are having problems with the actual downloading of the file itself, are you using the green Clone or download button on the landing page of the repo? Click the code tab to get to the landing page.

No I do not have problems with downloading the file, but when I open it with my local file path, it shows the following:

. qui do "/Users/orangexx/Documents/Georgetown/WB intern/chartable.ado" 404 is not a valid command name

luizaandrade commented 5 years ago

Thanks for the feedback, Yuchen! I'll close the issue once I add the ado file.

xyc9471 commented 5 years ago

The chartable.ado file was added into the folder.