본문 바로가기

분류 전체보기139

데이터 시각화(data visualization)를 위한 오픈소스 비교 BI라는 관점에서 그리고 기꺼이 유료로 사용할 수 있다면, 구글의 데이터 스튜디오(Data Studio)와 태블로(Tableau)라는 강력한 소프트웨어가 있다. 하지만, 우리는 아직 규모가 작고 가난하기에 오픈 소스에서 몇 가지를 찾아봤었다. 당시 화려한 시각화보다는 database 간 결합하거나, 다양한 데이터 소스를 지원하고, 알람을 쏴주는 그런 부분들이 더 필요했다. 그래서 추려낸 오픈 소스가 grafana, metabase, superset, redash 정도였다. 간략하게 정리해보면 다음과 같다. metabase 장점 Tableau의 대체제로 많이 언급되고 있음 SQL Editor가 강력해서 사용성이 좋음 superset보다 dashboard 속도가 빠르다는 의견이 있음 다른 툴에서는 안되는 G.. 2023. 1. 24.
HackerRank SQL - Top Competitors Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges in which the hacker earned a full score. If more than one hacker received full scores in same number of.. 2023. 1. 24.
유난한 도전 - 잘 정제되어 있는 날것(raw) 내가 토스를 알게 된 건, 2015년 쯤, 페이스북에서 활동하던 '리뷰왕 김리뷰'의 콘텐츠였다. 지금 생각해보면 김리뷰의 구독층이나 콘텐츠 스타일 등이 토스와도 잘 어울렸다고 생각한다. 김리뷰의 뭔가 간결하면서 핵심을 찌리는 특유의 문체가 토스의 서비스와도 닮았기 때문이다. 그게 토스다. 내가 인식하는 토스의 서비스는 항상 군더더기를 뺀 간결하고 명쾌한 핵심만 남긴다. 그래서 스타트업에서 일하면서 늘 궁금했다. '도대체 저 팀은 어떻게 일할까?' '어떻게 의사결정을 할까?' '어떻게 위기를 극복할까?' ... 이번에 나온 토스팀의 그동안의 여정을 담은 '유난한 도전'은 이러한 질문에 답을 하는 책이다.. 책은 토스 앱처럼 매우 잘 정제되어 있어 읽기는 편하지만, 그 과정에 있어 숨기거나 보태지 않았다는 .. 2023. 1. 24.
[Python] json 파일 읽어서 csv로 저장하기 아래는 json 파일로 되어 있는 파일을 파이썬으로 읽어 엑셀로 저장하기 위한 코드이다. 우선 json은 파이썬의 딕셔너리처럼 키와 값, 두 쌍으로 이루어진 자료형식이다. 오픈 API를 사용하거나 크롤링을 진행할 때 자주 만나게 되고 아래 방법을 알기 전에는 엑셀로 전처리하기도 했는데 상당히 비효율적이고 휴먼에러가 발생한 여지가 있다. 그래서 아래와 같이 json파일을 읽어오면 휠씬 빠르게 가공하여 활용할 수 있다. import requests import pandas as pd import json url = '' #json URL response = requests.get(url) contents = response.text json_ob = json.loads(contents) body = json.. 2023. 1. 24.
[Python] 두 좌표사이의 거리 구하기 - Haversine distance 두 좌표(위도, 경도) 사이의 거리를 구할 때, 거리 측정 함수인 허버사인 거리(Haversine distance)을 사용하는데 지구의 지름을 6,371km로 두고 킬로미터 단위로 두 지점의 사이의 거리를 구해준다. 파이썬으로 나타내면 다음과 같다. from math import sin, cos, sqrt, atan2 def haversine_distance(lat1, lon1, lat2, lon2): R = 6371 # radius of Earth in kilometers dlat = lat2 - lat1 dlon = lon2 - lon1 a = sin(dlat / 2)**2 + cos(lat1) * cos(lat2) * sin(dlon / 2)**2 c = 2 * atan2(sqrt(a), sqrt(.. 2023. 1. 19.
HackerRank SQL - The Report You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks. Grades contains the following data: Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. .. 2023. 1. 18.
HackerRank SQL - Weather Observation Station 19 Consider and to be two points on a 2D plane where are the respective minimum and maximum values of Northern Latitude (LAT_N) and are the respective minimum and maximum values of Western Longitude (LONG_W) in STATION. Query the Euclidean Distance between points and and format your answer to display decimal digits. Input Format The STATION table is described as follows: where LAT_N is the northern.. 2023. 1. 12.
HackerRank SQL - New Companies Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of employees. Order your output by ascending company_code. Note: The tables may contain dupl.. 2023. 1. 9.