์ ํฌ ํ๋ก์ ํธ๋ ์๋ ๋ฐ์ดํฐ ์์ง๊ณผ ์น์ฌ์ดํธ ๊ฐ๋ฐ์ ํตํด ์ง์ญ์ ์น์ ๋ค์์ฑ์ ์๊ฐํํ๊ณ ์ฆ์งํ๋ ๋ฐ ์ฃผ๋ ฅํ๊ณ ์์ต๋๋ค. ๊ฐ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์๋๋ฐฉ์์ ๋ฆฌํฌ์งํ ๋ฆฌ README์์ ํ์ธํ์ค ์ ์์ด์!
์ง์ญ ๋ํ์๋ค์ ์์น๋จ์ฒด ๋ด์์ ์์ฐ, ๊ท์ , ํ์ ๊ฐ๋ ์ ๊ด๋ฆฌํ๋ ์ค์ํ ์ญํ ์ ํฉ๋๋ค. ๋ง์ ์ ์น์ธ๋ค์ ์ ํต์ ์ธ ์ ์น์ ํ์ ๊นจ๊ณ ๋ค์ํ ์ธ๊ตฌ๋ค์ ๋ณต์ง๋ฅผ ์ํด ๋์ ์ ์ผ๋ก ๋ ๋ฆฝ์ ์ผ๋ก ์ด์ํ๊ฑฐ๋ ๊ธฐ์กด์ ์ ์น ๊ตฌ์กฐ์ ๋์ ํ๊ธฐ ์ํด ์ถ๋งํฉ๋๋ค.
๋๋ต 226๊ฐ ์ง๋ฐฉ์์น๋จ์ฒด์ 3,000 ์์๊ณผ 17๊ฐ ๊ด์ญ์์น๋จ์ฒด์ 900 ์์์ ์ฐ๋ฆฌ ์ง์ญ์ ํ์ฑํ๋ ๋ฐ ์ค์ํ ์ํฅ๋ ฅ์ ๊ฐ์ง๊ณ ์์ต๋๋ค. ๋ด์จ์ด์ฆ๋ ์ฌ์ฐ, ํ์ฌ ์ ์น ์์, ๊ณต์ ์ถ์ฅ ๊ธฐ๋ก๊ณผ ๊ฐ์ ์์ญ์ ์ด์ ์ ๋ง์ถ์ด ๋ค์ํ ์๋ฏผ ๋จ์ฒด๋ค์ ์ฃผ๋ชฉ์ ๋๊ณ ์ ํฉ๋๋ค.
๋ด์จ์ด์ฆ์ ๋ชจํ ์ธ "๋ค์ํ ๊ฐ์ธ๋ค์ ๋ค์ํ ์์ฌ๊ฒฐ์ ์ด ์ ์น๋ฅผ ๋ ๋๊ฒ ๋ง๋ ๋ค"๋ ์ฐ๋ฆฌ์ ๋ฏธ์ ์ ์ด๋๊ณ ์์ต๋๋ค. ๊ทธ๋ฌ๋ 2010๋ ๋ถํฐ 2022๋ ๊น์ง์ ๋ค ์ฐจ๋ก์ ์ง๋ฐฉ ์ ๊ฑฐ ๊ฒฐ๊ณผ๋ฅผ ๋ถ์ํด๋ณด๋ฉด ๋น์ ๋ ์ ์น์ธ ์ค 48%๊ฐ 50๋, 72%๊ฐ ๋จ์ฑ์ด๋ฉฐ 88%๊ฐ ๊ฑฐ๋ ์๋น ์์์์ ์ ์ ์์ต๋๋ค. ๋ด์จ์ด์ฆ๋ ํนํ ์ ์ ์ ์น์ธ์ ๋ถ์กฑ์ ์ค์ ์ ๋์ด ์ด๊ฒ์ ํด๊ฒฐํ๊ณ ์๋ฏผ๋ค๊ณผ ์ฐ๊ฒฐํ์ฌ ํ๋ซํผ์ ๊ตฌ์ถํ๊ณ ์ ํฉ๋๋ค.
- BeautifulSoup ๋ฐ Selenium์ ์ฌ์ฉํ ์น ํฌ๋กค๋ง.
- ๊ฐ ์น์ฌ์ดํธ์ ๋ํ ํฌ๋กค๋ง ํจ์ ์์ฑ.
- 5815์ค์ ์ฝ๋.
- BeautifulSoup
- ๊ฐ ์น์ฌ์ดํธ์ ๋ํ ๊ฐ๋ณ ํจ์๋ก ์ฌ์ด ์ ์ง๋ณด์.
- ์ ์ฌํ ์น์ฌ์ดํธ๋ ํ๋์ ํจ์๋ฅผ ์ฌ๋ฌ ํ๊ทธ๋ก ๊ณต์ ํ์ฌ ์ฌ์ด ์ ์ง๋ณด์.
- Selenium
- BeautifulSoup์ด ์ฒ๋ฆฌํ์ง ๋ชปํ๋ ๋ถ๋ถ์ ์ฒ๋ฆฌ.
- ์คํ ๋ฐฉ๋ฒ
- API-scrap-and-analysis ์ธ์ ๋ฆฌํฌ์งํ ๋ฆฌ๋ ๋ชจ๋ ์๋ ์คํ
- 2๊ฐ์ ์ ์คํฌ๋ฆฝํธ:
install.sh,run_scrap_scripts.sh install.sh์คํฌ๋ฆฝํธ๋ฅผ ํตํด ํ์ด์ฌ ๊ฐ์ํ๊ฒฝ, Chromedriver ๋ฑ ์ด๊ธฐ ์ ์ ์งํ- ์ดํ crontab์
run_scrap_scripts.sh๋ฅผ ๋ฑ๋กํด ์คํฌ๋ฉ ๋ฐ DB ์ฐ๋ ์๋ํ - ์์:
0 3 * * 0 ~/API-scrap-and-analysis/run_scrap_scripts.sh
- ๋์ด๋ฅผ ๊ธฐ์ค์ผ๋ก 5๊ฐ์ ๋์ผํ ํฌ๊ธฐ์ ํ์ ๊ทธ๋ฃน์ผ๋ก ๊ทธ๋ฃนํํ๊ณ , ์ฒซ ๋ฒ์งธ ๋ฐ ๋ง์ง๋ง ๋ฐฑ๋ถ์๋ฅผ ๊ณ์ฐํฉ๋๋ค.
React์์ ํธํ์ฑ์ ๋ณด์ฅํ๊ธฐ ์ํด MongoDB ๋ฐ์ดํฐ๋ฅผ ๋ฐฑ์๋์์ ๊ด๋ฆฌ.
- ๋น ๋ฅธ ๋น๊ต ๋ฐ ์ํธ ์์ฉ์ ์ํ ์ง๋.
- ์ฐ๋ ๋ฐ ์ง์ญ์ ๋ํ ๋น ๋ฅธ ํ์์ ์ํ ์ฌ์ฉ์ ์นํ์ ์ธ ๋๋กญ๋ค์ด ๋ฉ๋ด.
- ์ข ํฉ์ ์ธ ์๊ฐํ๋ฅผ ์ํ ์ฐจํธ ๋ฐ ํ ์คํธ์ ๊ฒฐํฉ.
- ์๊ฐ์ ๋ช ํ์ฑ์ ์ํ ์ฐ๋ น ๋ถํ .
์ด ํ๋ซํผ์ ์์ ๋กญ๊ฒ ํํํด ๋ณด์ธ์. ์ฐ๋ฆฌ๋ ์ง์ญ ์ ์น์ ํฌ๋ช ์ฑ๊ณผ ๋ค์์ฑ์ ์ ๊ณตํ๊ธฐ ์ํด ๋ ธ๋ ฅํ๊ณ ์์ต๋๋ค!
- ํ ํ ์คํธ ๋งํฌ : https://diversity.tech4impact.kr/
- ๋ฐฑ์๋ ๋ช ์ธ์ : https://diversity-api.tech4impact.kr/docs
- DB๋ค์ด์ด๊ทธ๋จ
- API ์๋ํฌ์ธํธ ๋ช ์ธ์
- [๋ด์จ์ด์ฆ] ๊ธฐ์ด์ํ ์ฐ๋ น/์ฑ๋ณ ๋ค์์ฑ ์ง์ ํ๊ฐ
- ์์ด๋์ด ๋ฏธ๋ก๋ณด๋
- Figma ํ์ผ
| ๐ Name | ๐ง Email (@kaist) | ๐โโฌ GitHub | ์ญํ |
|---|---|---|---|
| ๋ฐ๊ฑด | geon.park00 | Re-st | ํ์ฅ(ํ ์ธ๋ถ ์ํต), ๊ธฐ์ด์์ ํฌ๋กค๋ง, ์ ๋ถAPI DBํ, ๋์ดํต๊ณ, DB์์ , ์น์ ํํํ ๊ธ ๋ด์ฉ ์ค๊ณ |
| ์์ฑ๋ฏผ | soungmin | happycastle114 | ๋ฐฑ์๋ ์ค๊ณ/ํฌํ , ๊ธฐ์ด์์ ํฌ๋กค๋ง, ์ง์ ํต๊ณ, API ์๋ํฌ์ธํธ ๊ตฌ์, URL ๋ผ์ฐํ , ํ์คํ ๊ทธ๋จ/๋งต์ ๋ ํฐ ์ ์, ์น๋์์ธ |
| ์ก์คํ | songmhrm | songc04 | ํ์คํ ๊ทธ๋จ/๋งต์ ๋ ํฐ ์ ์, ํ๋ก ํธ์๋ ๊ตฌํ ์ ๋ฐ |
| ์ด๊ธฐ์ฐ | keonl | keonly | ๊ธฐ์ด์์ ํฌ๋กค๋ง, ์คํฌ๋ฉ โ MongoDB ์ฐ๋, ๋ค์์ฑ์งํ ์กฐ์ฌ ๋ฐ ์๊ธฐ ํ ์คํธ, ํฌ๋ก ์ก, ์คํ๋ง๋ค ๊ฒฐ๊ณผ ์ ๋ฆฌํด ์นํ ์ผ๋ก ์ฌ๋์ฑ ์๋ฆผ๋๋๋ก ์ ์, ์ฝ๋ ์ ๋ฆฌ |
| ์ดํฌ์ | pingpingy | pingpingy1 | ๊ธฐ์ด/๊ด์ญ/๊ตญํ์์ ํฌ๋กค๋ง, ๋ค์์ฑ์งํ ๋น๊ต, ๋ค์์ฑ์ง์ ๋ฐ ์์ ๊ณ์ฐ, DB ์ค๊ณ ๋ฐ ์์ , ๋ฐฑ์๋์๋ฒ ๊ตฌ์ถ, API ์๋ํฌ์ธํธ ๊ตฌ์ |
| ์ ์ | withsang | withSang | ํ์ด์ฌ ๊ฐ์ํ๊ฒฝ + ๊นํ๊ตฌ์กฐ + ์๋๋ฐฐํฌ ์ค๊ณ, ์๋ฒ + ์น ์ฃผ์ ์ ๊ณต ๋ฐ ๋ฐฐํฌ, API ์๋ํฌ์ธํธ ๊ตฌ์, ์ ํ์๊ตฌ์ฌํญ ์ ์, React ๊ตฌ์กฐ์ค์ , ํ์คํ ๊ทธ๋จ ์ ์, ์น๋์์ธ, ์น์ ํํํ ๊ธ ๋ด์ฉ ์ค๊ณ, ํ์๋ก ์์ฑ |
- JAY (์นด์นด์ค ํฌ๋ฃจ) : ๊ธฐ์ ์ ์กฐ์ธ, ์งํ๋ฐฉ์ ์ง๋, ๋ ํผ๋ฐ์ค ๊ถ์
- ๋ฐํ๋ฏผ ๋ํ๋ (๋ด์จ์ด์ฆ) : ์ ์ ํ๋ฅด์๋ ๊ณต์ , ๋ฐฉํฅ ์ง๋
- ๋ฅ์์ ๊ต์๋ : ๋ฐฉํฅ ์ง๋
diversity-demo.mp4
Our project is dedicated to visualizing and promoting diversity in local politics through automatic data collection and website development. You can find the operation details of each repository in the respective repository README!
Local representatives play a crucial role in managing budgets, regulations, and administrative oversight within their communities. Many politicians run for office to break the mold of traditional politics, advocating for the well-being of diverse populations, running as independents, and challenging established political structures.
With approximately 3,000 council members across 226 local government units and 900 representatives in 17 metropolitan regions, these officials have the power to shape our communities. NewWays seeks to draw attention from various civic organizations by focusing on areas such as property, current political affiliation, and official travel records.
Newways' motto, "Diverse decision-making by diverse individuals improves politics," drives our mission. However, analyzing the results of four local elections from 2010 to 2022 reveals that 48% of elected officials are in their 50s, 72% are male, and 88% belong to two major political parties. NewWays particularly emphasizes addressing the lack of young politicians, connecting them with citizens to bridge the gap and foster a platform where more people can share their concerns.
- Web scraping using BeautifulSoup and Selenium.
- Creation of scraping functions for each website.
- 5815 lines of code.
- BeautifulSoup
- Individual functions created for each website for easy maintenance.
- Similar websites share one function with different tags for easy maintenance.
- Selenium
- Handles what BeautifulSoup can't.
- How to Run
- Repositories other than API-scrap-and-analysis are fully automated.
- Two shell scripts:
install.shandrun_scrap_scripts.sh. - The
install.shscript handles initial setup, including creating a Python virtual environment and installing Chromedriver. - Subsequently,
run_scrap_scripts.shis registered in crontab for automatic scraping and database integration. - Example crontab entry:
0 3 * * 0 ~/API-scrap-and-analysis/run_scrap_scripts.sh
We group the age into 5 same-sized subgroups based on age, and compute the first- and last quantile too.
Backend management of MongoDB data to ensure compatibility with React.
- Map for quick comparison and interactive features.
- User-friendly dropdown menus for quick exploration by year and region.
- Charts and text blended for a comprehensive view.
- Age segmentation for visual clarity.
Feel free to explore this platform, where we strive to bring transparency and diversity to local politics, one visualization at a time!