1 00:00:01,990 --> 00:00:08,930 [Music] 2 00:00:06,220 --> 00:00:12,140 this video shows you how to create a 3 00:00:08,930 --> 00:00:15,410 jupiter notebook let's start by adding a 4 00:00:12,140 --> 00:00:19,220 data asset to the project you can either 5 00:00:15,410 --> 00:00:21,900 browse to select files or drag files 6 00:00:19,220 --> 00:00:25,619 into the panel 7 00:00:21,900 --> 00:00:28,050 great now the data file is uploaded to 8 00:00:25,619 --> 00:00:30,980 object storage and available as a data 9 00:00:28,050 --> 00:00:34,810 asset in this project 10 00:00:30,980 --> 00:00:34,810 next create a notebook 11 00:00:34,859 --> 00:00:40,700 provide a name and a description 12 00:00:38,180 --> 00:00:43,400 and then select the runtime to use when 13 00:00:40,700 --> 00:00:45,860 running this notebook here you see the 14 00:00:43,400 --> 00:00:48,530 environments you could use you'll learn 15 00:00:45,860 --> 00:00:51,230 more about environments later so for now 16 00:00:48,530 --> 00:00:53,720 just select the default spark Python 17 00:00:51,230 --> 00:00:56,629 environment and verify the language and 18 00:00:53,720 --> 00:00:58,460 spark version when you ready create the 19 00:00:56,629 --> 00:01:00,290 notebook 20 00:00:58,460 --> 00:01:04,400 now wait while the runtime environment 21 00:01:00,290 --> 00:01:06,860 is instantiated once the environment is 22 00:01:04,400 --> 00:01:10,310 ready in the notebook access the data 23 00:01:06,860 --> 00:01:12,440 sources and locate the file click insert 24 00:01:10,310 --> 00:01:15,020 to code and choose how you want to 25 00:01:12,440 --> 00:01:17,360 insert the data the choices in this 26 00:01:15,020 --> 00:01:19,550 drop-down box are dependent upon the 27 00:01:17,360 --> 00:01:22,580 language used in this notebook and the 28 00:01:19,550 --> 00:01:24,950 file type notice that the inserted code 29 00:01:22,580 --> 00:01:26,810 includes the credentials you'll need to 30 00:01:24,950 --> 00:01:29,150 read the data file from the object 31 00:01:26,810 --> 00:01:31,610 storage instance 32 00:01:29,150 --> 00:01:34,600 when you run the code the first five 33 00:01:31,610 --> 00:01:34,600 rows display 34 00:01:35,380 --> 00:01:40,270 now let's take a closer look at 35 00:01:37,360 --> 00:01:41,979 environments on the environments tab you 36 00:01:40,270 --> 00:01:44,650 can define the hardware size and 37 00:01:41,979 --> 00:01:47,500 software configuration for the runtime 38 00:01:44,650 --> 00:01:50,080 associated with Watson studio tools such 39 00:01:47,500 --> 00:01:52,869 as notebooks you can see that there is 40 00:01:50,080 --> 00:01:54,909 one active environment runtime namely 41 00:01:52,869 --> 00:01:57,729 the runtime being used by the notebook 42 00:01:54,909 --> 00:02:00,970 you just created and here are the other 43 00:01:57,729 --> 00:02:02,530 default environments you can view any of 44 00:02:00,970 --> 00:02:06,180 the default environments to see a 45 00:02:02,530 --> 00:02:06,180 summary of the configuration 46 00:02:06,710 --> 00:02:10,770 and also create a new environment 47 00:02:08,420 --> 00:02:14,850 definition 48 00:02:10,770 --> 00:02:17,760 first provide a name in a description 49 00:02:14,850 --> 00:02:18,870 if you select spark for the type you'll 50 00:02:17,760 --> 00:02:22,110 see some additional configuration 51 00:02:18,870 --> 00:02:24,270 options in this case just accept the 52 00:02:22,110 --> 00:02:27,030 defaults and choose Scala for the 53 00:02:24,270 --> 00:02:29,510 software version when you ready create 54 00:02:27,030 --> 00:02:31,909 the new environment 55 00:02:29,510 --> 00:02:34,340 the environment is ready for you to use 56 00:02:31,909 --> 00:02:36,530 with a notebook 57 00:02:34,340 --> 00:02:39,230 to switch a notebook to use a different 58 00:02:36,530 --> 00:02:41,620 environment you need to first stop the 59 00:02:39,230 --> 00:02:41,620 colonel 60 00:02:42,890 --> 00:02:48,730 then you can change the environment 61 00:02:46,360 --> 00:02:52,630 and select the custom environment you 62 00:02:48,730 --> 00:02:54,959 just created and associate that with the 63 00:02:52,630 --> 00:02:57,689 notebook 64 00:02:54,959 --> 00:02:59,969 now open the notebook in edit mode and 65 00:02:57,689 --> 00:03:02,069 wait for the new environment to be 66 00:02:59,969 --> 00:03:04,560 instantiated 67 00:03:02,069 --> 00:03:06,749 since this notebook was last saved using 68 00:03:04,560 --> 00:03:09,290 a different kernel you need to set the 69 00:03:06,749 --> 00:03:12,909 new kernel 70 00:03:09,290 --> 00:03:12,909 let's delete the existing cell 71 00:03:13,610 --> 00:03:20,590 locate the source data file and insert a 72 00:03:17,360 --> 00:03:20,590 spark session data frame 73 00:03:21,920 --> 00:03:27,020 when you run the code the first five 74 00:03:24,500 --> 00:03:28,790 rows display 75 00:03:27,020 --> 00:03:30,890 now you're ready to explore the 76 00:03:28,790 --> 00:03:34,920 community and find sample notebooks and 77 00:03:30,890 --> 00:03:39,190 datasets to get started analyzing data 78 00:03:34,920 --> 00:03:39,190 [Music]