GithubHelp home page GithubHelp logo

andhikaprttp / tik-analisis-data Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dhikaweb7/tik-analisis-data

0.0 0.0 0.0 30 KB

Bab Analisis data

License: GNU General Public License v3.0

Python 100.00%

tik-analisis-data's Introduction

TIK-ANALISIS-DATA

Bab Analisis data Teknik Informatika Kelas X TKJ SMK RADEN PAKU

Array

data = [10, 9, 7, 8, 10, 8]
print(data[1])
data[2] = 10
print(data)
data.append(9)
print(data)

Pandas DataFrame

import pandas

data = [10, 9, 7, 9, 10]
siswa = ["Ragil", "Andhika", "Dafa", "Habib", "Rendy"]

nilai = pandas.DataFrame({
"Nama": siswa,
"Nilai": data
})
nilai

Scraping Web

import requests
import pandas as pd
from bs4 import BeautifulSoup

# link dalam th = bisa diubah sesuai ke inginan
th = "https://www.jobs.id/lowongan-kerja?kata-kunci=part time"
halaman = requests.get(th)
hasil = BeautifulSoup(halaman.content, 'html.parser')
print(hasil)

Proses data scrapping menjadi diagram

import requests
import pandas as pd
from bs4 import BeautifulSoup


# Mata Pelajaran TIK | ANALISIS DATA
# X TKJ 1
# SMK RADEN PAKU
# 2022

th = "https://www.jobs.id/lowongan-kerja?kata-kunci=part time"
halaman = requests.get(th)
hasil = BeautifulSoup(halaman.content, 'html.parser')
lowkers = hasil.find_all(class_="single-job-ads")

posisi = []
instansi = []
gaji = []

for p in lowkers:
 t1 = p.select("h3")
 t2 = t1[0].select("a")
 posisi.append(t2[0].get_text())

 t1 = p.select("p")
 t2 = t1[0].select("a")
 try:
   instansi.append(t2[0].get_text())
 except:
  instansi.append("-")

 t2 = t1[1].select("span")
 try:
   xgaji = t2[1].get_text()
 except:
   xgaji = t2[0].get_text()
 xgaji = xgaji.replace(".","")
 if (xgaji=="Gaji Dirahasiakan") :
  xgaji = 0
 gaji.append(xgaji);

import plotly.express as px

lowker = pd.DataFrame({
  "Posisi": posisi,
  "Instansi": instansi,
  "Gaji":gaji
})

fig = px.bar(lowker, x='Instansi', y='Gaji')
fig.show()

tik-analisis-data's People

Contributors

dhikaweb7 avatar andhikaprttp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.