Jupyter Notebook을 HTML 웹 페이지로 배포
여기에서 최종 출력을 확인할 수 있습니다 👇🏻
프로덕션 애플리케이션 테스트 - 프로젝트 웹페이지
문제 설명 📄 (출처: Intercom )
We have some customer records in a text file, one customer per line, JSON formatted lines. We want to invite any customer within 100km of our Dublin office for some food and drinks on us. Write a program that will read the full list of customers and output the names and user ids of matching customers (within 100km), sorted by User ID (ascending).
- You must use the first formula from this Wikipedia article to calculate distance. Don't forget, you'll need to convert degrees to radians.
- The GPS coordinates for our Dublin office are 53.339428 and -6.257664.
- You can find the Customer list here.
구현 🏗
Google Colaboratory ⚗️ Python 스크립트 구현
Folium 🗺 사무실 및 고객 위치에 대한 지도 및 마커 렌더링
URLlib Module 📁 고객 데이터 가져오기 및 처리
Pandas 📊 처리된 고객 데이터
GitHub Pages 💻 생성된 웹 페이지 호스팅용
배포 🚀
주피터 노트북을 HTML로
나는 jupyter nbconvert을 사용하여 ipynb 스크립트를 html로 변환했습니다.
jupyter nbconvert <input-file> --to <output-format>
Supported output formats은 HTML, PDF, LaTeX 등입니다.
추가Configuration Options를 사용하여 노트북을 다른 형태로 변환하는 경험을 풍부하게 할 수 있습니다. 내가 사용한 한 가지 옵션은 기본적으로 Light로 설정된 노트북의 테마를 변경하는 것이었습니다. HTMLExporter.theme CLI 플래그를 사용하여 수행할 수 있습니다.
사용법 예시:
jupyter nbconvert script.ipynb --to html --HTMLExporter.theme=dark
HTML 파일을 생성한 후 섹션으로 이동하기 위한 탐색 모음을 추가하고 배경색 jp-Notebook 클래스를 검정색에서 Grey20 색상(#333333)으로 변경하는 등 HTML 코드를 변경했습니다. GitHub 리포지토리에서 직접 GitHub 페이지를 사용하여 호스팅했습니다.
GitHub 리포지토리 📥
ParthKetanDoshi / 프로덕션-애플리케이션-테스트
Reference
이 문제에 관하여(Jupyter Notebook을 HTML 웹 페이지로 배포), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/parthketandoshi/deploying-jupyter-notebook-as-a-web-page-44jp텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)