Using code to open a dataset, either one you have downloaded or inputted manually, in Stata is rather easy. Once you have the data downloaded onto your computer the next step is to tell Stata the location of the data, so it knows where to pull it from. You can find the path of a file by left clicking on the file, going to properties, and copying/pasting the path into the Stata .do file.
Below is code for opening a data file in Stata. Note: Stata data files are saved as a ".dta" file.
In the code above we are telling Stata to use the data from a file that can be found along the path "C:\Users\Username\Stata\SLID.dta" on a computer.
If you have collected data and need to begin manually inputting it into Stata, you can click on the icon highlighted in red below on the main Stata page and a blank dataset window will appear.
In Stata you can directly type data in and Stata will automatically produce a new observation for each row.