"# of People" ์ ๋ ฌ ์ต์ ์ ํด๋ฆญํ๋ฉด ํ ํฝ ์นด๋์ ๊ฒ์๋ฌผ ์ ์์ ์์ "-"๊ฐ ํ์๋์ด ๊ฒ์๋ฌผ ์๊ฐ ์์์ธ ๊ฒ์ฒ๋ผ ๋ณด์ ๋๋ค. ์คํฌ๋ฆฐ์ท ์ฐธ์กฐ:
๋น์ ์ ๋น์ ์ด ๋ณด์ง ๋ชปํ ๊ฒ์๋ณด๊ณ ๋ฌด์์ ๊ธฐ๋ ํ์ต๋๊น?
์์ ์ ์๋ฅผ ๋ณผ ๊ฒ์ผ๋ก ์์ํ์ต๋๋ค.
https://publiclab.org/tags?sort=followers&order=asc
์ด๋ ๊ฒ ํ๋ฉด ๋ฌธ์ ๋ฅผ ์ง๋จํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค.
๋ฆฌ์ฆ
์ฌ๊ธฐ์ ์ถ๊ฐํ ์ ์๋ ์ฝ๋ ๋งํฌ๊ฐ ์๋ ์ฌ๋์ด ์์ต๋๊น? ๋ฏธ๋ฆฌ ๊ฐ์ฌ๋๋ฆฝ๋๋ค!
์๋ ํ์ธ์ @ebarry ์ ๋ ์ด๊ฒ์ด ์ค์ ๋ก ๋ ์ฌ๊ฐํ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค :sweat_smile: https://github.com/publiclab/plots2/pull/7609 ์์ ์ด๊ฒ์ ๋ณ๊ฒฝํ์ง๋ง ๋ด๊ฐ ๊ทธ๊ฒ์ ์๋ง์ผ๋ก ๋ง๋ค๊ณ ์๋ชป๋ ์๋ฅผ ๊ณ์ฐํ์ ๊ฒ์ ๋๋ค. ์๊ฐ :disappointed: @jywarren ์์ ๋ฐ๋ณต ์ฃ์กํฉ๋๋ค ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ๋์์ด ํ์ํ ์ ์์ต๋๋ค :sweat_smile:
@Tlazypanda ์๋
ํ์ธ์, Tag.counter
์ ํ ์ฝ๋๊ฐ ์ฌ์ฉ๋๋ ๋ค๋ฅธ ์ฅ์๋ฅผ ์ดํด๋ณด๊ณ ํด๋น ์ฝ๋๋ก ์ ํํด ๋ณผ๊น์ ?
https://github.com/publiclab/plots2/pull/7609/files#diff -8fe92870a7f027a46eed82a51c5c16bcR118
๊ทธ๋ฌ๋ ์นด์ดํธ๋ ๋งค์ฐ ์ฝ๊ฐ ๋จ์ด์ ธ ์์ต๋๋ค. ์ด๊ฒ์ด ์คํธ์ผ๋ก ์ฒ๋ฆฌ๋๊ณ ์ํ์ ์ฝ๊ฐ ์ํฅ์ ์ฃผ๋ ๋ฌธ์ ์ธ์ง ๊ถ๊ธํฉ๋๋ค.
์๋ฅผ ๋ค์ด ๋ค์ ์นด์ดํธ ๊ฐ์ ์ฐจ์ด๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
236 ์นด์ดํธ๊ฐ ๊ณ์ฐ๋๋ ์์น๋ฅผ ์ฐพ์ ๊ทธ ๊ฐ์ผ๋ก ์ ํํ ์ ์์ต๋๋ค.
๋ฐ๋ผ์ ์ปจํธ๋กค๋ฌ ์์ฑ ์ธ์คํด์ค ๋ณ์๋ฅผ ์ฌ์ฉํฉ๋๋ค.
๋๋ ์ด๊ฒ์ด ๊ณ์ฐ๋๋ ๊ณณ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค.
์๋
ํ์ธ์ @jywarren , tag / : id์์ ๋ณผ ์์๋ ๊ฒ, ์ฆ ํ๊ทธ์
๊ทธ๋์, ์ฐ๋ฆฌ๊ฐ ํด์ผ ํ ์ผ์ tag#show ์์ ํ๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ๋ฉ๋ชจ๋ฅผ ๊ฐ์ ธ์์ผ ํ๊ณ ํ ํฝ ์นด๋์ ๋งจ ์๋์ ๊ฐ์๋ฅผ ํ์ํ๊ธฐ ์ํด ๋ค์ ์ํ ํํ์์ ์ฌ์ฉํด์ผ ํ๋ค๋ ๊ฒ์
๋๋ค.
ํ๊ทธ ์ด๋ฆ์ด ์๋ ๋ฉ๋ชจ ์-ํ ํฝ ์นด๋์ ํ์๋ ๋ฉ๋ชจ ์
tag#show์์ ํ๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ๋ฉ๋ชจ๋ฅผ ๊ฐ์ ธ์์ผ ํฉ๋๋ค.
์๋ ํ์ธ์, ๋ง์ต๋๋ค! https://github.com/publiclab/plots2/issues/6855#issuecomment -578331475์์ "๋จ์ผ ์์ค ์์ค"์ ๊ฐ๋ ์ ์ฃผ๋ชฉํ์ญ์์ค.
https://github.com/publiclab/plots2/pull/7476(#6855 ๊ธฐ์ค)์์ ๋์ผํ ๊ณ์ฐ์ ์ฌ์ฉํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.
@urvashigupta7 ์ฐธ์ฌ ํด์ฃผ์ ์
๋ํ https://github.com/publiclab/plots2/pull/7476/ ์์ ์คํธ์ ํํฐ๋งํ์ง ์๋๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋ฐ๋ผ์ ์ด ์ค์ .where(status: 1)
์ถ๊ฐํด์ผ ํฉ๋๋ค.
์ด ์ฝ๋๋ ์คํธ์ ํํฐ๋งํ์ง ์๋ ์ด๊ฒ์๋ ์์กดํฉ๋๋ค.
๋ง์ฐฌ๊ฐ์ง๋ก ์ด ์ฝ๋๋ ๋์ผํ ํํฐ๋ก ์คํธ์ ํํฐ๋งํด์ผ ํฉ๋๋ค.
ํ . /after/ ๋ค์ ํ์ ์คํํ๊ธฐ ๋๋ฌธ์ @total_posts
๊ณ์ฐ์์ ์คํธ์ ํํฐ๋งํ๋ ๊ฒ์ฒ๋ผ ๋ณด์
๋๋ค.
๊ทธ๋ฌ๋ Tag.counter
๋ฐ Node.for_tagname_and_type
ํํฐ๋งํ์ง ์์ต๋๋ค. ๊ทธ๊ฒ ๋ถ๊ท์น์ด ์๋๊น?
์ฌ๊ธฐ์ ๊ณ์ฐ์ ์ฌ์ ํ โโ์ณ์ง ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ์๋ฅผ ๋ค์ด https://stable.publiclab.org/tags๋ ์ด์ balloon-mapping
๋ํ 692๊ฐ์ ๊ฒ์๋ฌผ์ ๋์ดํ์ง๋ง ๋ค์์ ํด๋น ํ๊ทธ์ ๋ํ ํต๊ณ์
๋๋ค(์์ ์ํ).
์ด ์์ ์ฌํญ์ ์์กดํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. https://github.com/publiclab/plots2/pull/8245
๊ทธ๋ฌ๋ฉด ๋ค์ ํ์ธํ ์ ์์ต๋๋ค. ์ ์ ์ฌ๊ฐ๋ด...์๊ฐ๋ฝ ๐ค
์ด์ https://github.com/publiclab/plots2/pull/8245 ๊ฐ ์๋ฃ๋์์ต๋๋ค! ๊ทธ๋ฆฌ๊ณ ๋จ์ ํ ์คํธ๊ฐ ์์ด์ ๋๋ฌด ์ข์ต๋๋ค. ์ด์ ์ด๊ฒ์ด ์๋ํ ์ ์์ต๋๋ค...
์๊ฒ ์ต๋๋ค. 573 posts ยป
-- ํ
์ฐ๊ตฌ๋
ธํธ 469
์ง๋ฌธ 37
์ํค ํ์ด์ง 77
์ฌ๋๋ค 346
๋ด ๋ง์, ๋ฉ๋ชจ + ์ํค = 546...? ๊ทธ๋ฆฌ๊ณ ํ๋ฌ์ค ์ง๋ฌธ์ 583์ ๋๊น?
์ด์ ์์ ์์ tests
ํ๊ทธ๋ฅผ ํ
์คํธํ๊ณ ์๋๋ฐ, ์บ์ฑ์ด ์งํ๋๊ณ ์๋์ง ์์ฌ์ค๋ฝ์ต๋๋ค. ํด๋น ํ๊ทธ๋ฅผ ์ ๋ฉ๋ชจ https://stable.publiclab.org/notes/aidanswope/05-21-2019/angel-s-point-balloon-map-updated ์ ์ถ๊ฐํด๋ ๋ฉ๋ชจ ํญ์ด ์์ฑ๋์ง ์์์ต๋๋ค. 7์์ 8, tag.count
๋ tag.run_count
์ ๊ฒฐ๊ณผ์ ๋ง์ฐฌ๊ฐ์ง๋ก 8์ ๋ฐํํ์ง๋ง
์ข์์, ํญ ์๋ฅผ ์ถ์ ํฉ๋๋ค.
Node.where(status: 1, type: 'note').includes(:revision, :tag).references(:term_data, :node_revisions).where('term_data.name = ? OR term_data.parent = ?', 'balloon-mapping', 'balloon-mapping').where.not(nid: qids).count
=> 470
์ฃผ์ ์นด๋ ์์ ๋น๊ต:
NodeTag.joins(:node).where(tid: 10).where('node.status = 1 AND node.type = "note"').where.not(nid: qids).count
=> 467
๐ญ
์ด ์ธ ๊ฐ์ง๋ ์ฐจ์ด์ ์
๋๋ค. [6129, 7236, 7414]
--
[#
,
,
]
์์ฃผ ์ด์ํ! 2๊ฐ์ง ์ด์ ๊ฐ ์์ต๋๋ค. 3๊ฐ์ ๋ฉ๋ชจ๋ 10๊ฐ์ ๋๋ฝ๋ ๋ฉ๋ชจ์ ๋์ผํ์ง ์์ผ๋ฉฐ(์์ง ์ง๋ฌธ์ ์ดํด๋ณด์ง ์์๋ค๊ณ ์๊ฐํจ), ์ด 3๊ฐ์ ๋ฉ๋ชจ๋ 2013๋ 2์์ ํ๋๊ฐ ์๊ณ 2013๋ 5์์ 2๊ฐ๊ฐ ์๋ค๋ ์ ์ ์ ์ธํ๊ณ ๋ ์ ์์ธ ๊ฒ ๊ฐ์ต๋๋ค.
(์ ๋ฐ์ดํธ: ์ค๋ณต๋ ํ๊ทธ ์ด๋ฆ์ ์๋ ์ฐธ์กฐ)
๋ํ ํฅ๋ฏธ๋ก์ด ์ :
Node.where(status: 1, type: 'note').includes(:revision, :tag).references(:term_data, :node_revisions).where('term_data.name = ? OR term_data.parent = ?', 'balloon-mapping', 'balloon-mapping').where(nid: qids).count
=> 29
์ด๊ฒ์ ๋ค์์ ๋์ํฉ๋๋ค.
NodeTag.joins(:node).where(tid: 10).where('node.status = 1 AND node.type = "note"').where(nid: qids).count
๋ 37์ ํญ์ ํ์๋ ๋๋ก ๋ค์๊ณผ ๊ฐ์ด ๊ณ์ฐ๋ฉ๋๋ค.
์ํ! ๋ง์ง๋ง ์น์
์ question:balloon-mapping
ํ๊ทธ๊ฐ ์ง์ ๋ ๊ฒ์๋ฌผ์ด ๊ธฐ๋ณธ balloon-mapping
ํ๊ทธ๊ฐ ์๋๋ผ๋ ํด๋น ๊ฐ์์ ํฌํจ๋๋ค๋ ๊ฒ์ ๋ณด์ฌ์ค๋๋ค!!!
๋ค์ 8๊ฐ์ ๊ฒ์๋ฌผ์๋ question:balloon-mapping
์์ง๋ง balloon-mapping
๊ฐ์ต๋๋ค.
[13556, 15762, 16426, 18994, 20694, 11301, 12251, 19625]
์ข์์, 2๊ฐ์ ๋ ธ๋ ๋ด๋ก ์ด๋ํฉ๋๋ค. ์ด์ ์๋์ผ๋ก ๋น๊ตํด ๋ณด๊ฒ ์ต๋๋ค.
irb(main):040:0> NodeTag.joins(:node).where(tid: 10).where('node.status = 1 AND node.type = "note"').count
=> 496
irb(main):041:0> Node.where(status: 1, type: 'note').includes(:tag).references(:term_data).where('term_data.name = ?', 'balloon-mapping').count
=> 499
irb(main):022:0> Node.where(status: 1, type: 'note').includes(:revision, :tag).references(:term_data, :node_revisions).where('term_data.name = ? OR term_data.parent = ?', 'balloon-mapping', 'balloon-mapping').collect(&:nid)
=> [146, 253, 254, 268, 403, 511, 724, 732, 743, 913, 1482, 1489, 1620, 1626, 1627, 1632, 1715, 1849, 1968, 1994, 2126, 2138, 2144, 2476, 2589, 2930, 3115, 3325, 4649, 4952, 5038, 5220, 5250, 5978, 6934, 7050, 7189, 7294, 7314, 7491, 7577, 7593, 7995, 8189, 8907, 8913, 8914, 8950, 9019, 9032, 9042, 9086, 9417, 9434, 9742, 9888, 9977, 10541, 11019, 11100, 11223, 11574, 11582, 11827, 12201, 12240, 12491, 12619, 12708, 13095, 13424, 13945, 14022, 14095, 14183, 14185, 14219, 14515, 14572, 14587, 14597, 14600, 14611, 14620, 14813, 14907, 14909, 14983, 15545, 15568, 16591, 16653, 16746, 16877, 18316, 19153, 19272, 19462, 19558, 19578, 19620, 19762, 20331, 23549, 24101, 24102, 1795, 6635, 347, 369, 439, 444, 792, 861, 1665, 1668, 1962, 2135, 2143, 2152, 2245, 2277, 2783, 2784, 3563, 3635, 3670, 4482, 4516, 4755, 4760, 4923, 4925, 6059, 7641, 10181, 10489, 11101, 11724, 13243, 13880, 13948, 17322, 64, 166, 202, 344, 1666, 1816, 1818, 1819, 2919, 3354, 3736, 3821, 4087, 8020, 8947, 9301, 11199, 11260, 11261, 11755, 12161, 1544, 1739, 1742, 1892, 2006, 5494, 9353, 10705, 828, 1515, 1786, 1877, 1926, 1949, 2121, 2625, 2666, 2677, 2846, 2892, 2961, 4092, 4907, 5394, 5415, 5664, 7132, 7367, 7368, 7717, 7964, 8400, 10243, 6175, 9507, 4636, 6293, 3014, 6624, 9806, 10289, 10554, 11278, 11391, 12104, 12622, 12894, 13143, 9935, 10036, 10196, 10450, 11283, 11719, 11769, 12237, 10246, 10605, 2462, 9497, 1889, 2131, 2443, 3026, 4127, 4252, 4673, 5538, 5893, 6608, 8034, 8902, 8959, 9644, 9707, 10045, 10162, 10335, 10336, 10337, 10373, 10540, 10570, 11107, 11110, 11112, 11124, 11143, 11175, 11298, 11336, 12053, 12203, 12590, 16984, 19515, 19580, 23822, 2163, 3634, 7620, 10166, 11056, 11319, 11589, 1541, 1652, 1676, 1677, 1746, 2154, 2237, 2275, 2311, 2623, 2785, 3454, 3652, 3822, 4014, 4691, 4720, 4950, 5161, 7785, 8866, 8926, 8928, 8937, 8958, 8986, 9759, 9915, 10101, 10230, 10244, 10302, 10311, 10374, 10523, 10602, 11021, 11078, 11103, 11253, 11726, 11988, 12686, 12752, 12757, 13400, 13845, 14116, 14660, 14713, 14756, 1716, 2660, 7191, 7192, 1743, 1636, 1900, 9317, 10651, 1741, 13904, 3096, 2352, 2824, 4091, 2715, 6080, 6082, 2732, 3801, 3908, 4545, 7121, 10284, 13791, 10631, 4921, 6751, 9429, 9743, 11577, 17331, 6073, 9858, 10711, 11118, 6525, 10267, 9034, 11252, 11268, 8033, 8868, 10159, 10214, 9027, 9785, 9033, 9076, 9299, 14501, 14508, 14562, 21733, 10282, 9909, 11178, 11738, 10024, 12667, 11262, 11343, 11978, 11983, 11992, 11826, 11061, 10227, 10428, 11077, 11131, 11137, 11280, 11281, 11518, 11551, 11807, 11812, 11947, 12039, 14158, 14729, 14943, 15641, 16273, 16349, 18560, 19269, 19286, 21547, 10343, 14852, 14901, 15352, 15387, 10612, 10638, 10986, 10994, 20181, 11002, 11127, 11128, 11183, 12166, 11342, 11494, 11955, 11673, 11707, 11711, 12190, 18839, 13802, 14595, 12227, 15912, 14007, 13093, 13096, 12981, 13102, 13160, 13194, 13196, 13227, 13242, 13267, 13278, 13281, 13298, 14168, 15161, 23143, 14058, 14766, 13748, 13839, 15603, 14241, 14179, 14239, 14246, 14240, 14255, 14488, 14487, 14245, 14785, 15160, 14703, 14995, 16571, 15172, 15179, 15424, 15713, 15732, 16141, 16284, 16334, 16382, 17387, 17498, 17499, 18498, 16960, 19689, 17815, 19394, 19464, 19650, 19955, 19476, 19477, 23203, 6129, 7236, 7414]
๋:
irb(main):024:0> NodeTag.joins(:node).where(tid: 10).where('node.status = 1 AND node.type = "note"').collect(&:nid)
=> [146, 253, 254, 268, 403, 511, 724, 732, 743, 913, 1482, 1489, 1620, 1626, 1627, 1632, 1715, 1849, 1968, 1994, 2126, 2138, 2144, 2476, 2589, 2930, 3115, 3325, 4649, 4952, 5038, 5220, 5250, 5978, 6934, 7050, 7189, 7294, 7314, 7491, 7577, 7593, 7995, 8189, 8907, 8913, 8914, 8950, 9019, 9032, 9042, 9086, 9417, 9434, 9742, 9888, 9977, 10541, 11019, 11100, 11223, 11574, 11582, 11827, 12201, 12240, 12491, 12619, 12708, 13095, 13424, 13945, 14022, 14095, 14183, 14185, 14219, 14515, 14572, 14587, 14597, 14600, 14611, 14620, 14813, 14907, 14909, 14983, 15545, 15568, 16591, 16653, 16746, 16877, 18316, 19153, 19272, 19462, 19558, 19578, 19620, 19762, 20331, 23549, 24101, 24102, 1795, 6635, 347, 369, 439, 444, 792, 861, 1665, 1668, 1962, 2135, 2143, 2152, 2245, 2277, 2783, 2784, 3563, 3635, 3670, 4482, 4516, 4755, 4760, 4923, 4925, 6059, 7641, 10181, 10489, 11101, 11724, 13243, 13880, 13948, 17322, 64, 166, 202, 344, 1666, 1816, 1818, 1819, 2919, 3354, 3736, 3821, 4087, 8020, 8947, 9301, 11199, 11260, 11261, 11755, 12161, 1544, 1739, 1742, 1892, 2006, 5494, 9353, 10705, 828, 1515, 1786, 1877, 1926, 1949, 2121, 2625, 2666, 2677, 2846, 2892, 2961, 4092, 4907, 5394, 5415, 5664, 7132, 7367, 7368, 7717, 7964, 8400, 10243, 6175, 9507, 4636, 6293, 3014, 6624, 9806, 10289, 10554, 11278, 11391, 12104, 12622, 12894, 13143, 9935, 10036, 10196, 10450, 11283, 11719, 11769, 12237, 10246, 10605, 2462, 9497, 1889, 2131, 2443, 3026, 4127, 4252, 4673, 5538, 5893, 6608, 8034, 8902, 8959, 9644, 9707, 10045, 10162, 10335, 10336, 10337, 10373, 10540, 10570, 11107, 11110, 11112, 11124, 11143, 11175, 11298, 11336, 12053, 12203, 12590, 16984, 19515, 19580, 23822, 2163, 3634, 7620, 10166, 11056, 11319, 11589, 1541, 1652, 1676, 1677, 1746, 2154, 2237, 2275, 2311, 2623, 2785, 3454, 3652, 3822, 4014, 4691, 4720, 4950, 5161, 7785, 8866, 8926, 8928, 8937, 8958, 8986, 9759, 9915, 10101, 10230, 10244, 10302, 10311, 10374, 10523, 10602, 11021, 11078, 11103, 11253, 11726, 11988, 12686, 12752, 12757, 13400, 13845, 14116, 14660, 14713, 14756, 1716, 2660, 7191, 7192, 1743, 1636, 1900, 9317, 10651, 1741, 13904, 3096, 2352, 2824, 4091, 2715, 6080, 6082, 2732, 3801, 3908, 4545, 7121, 10284, 13791, 10631, 4921, 6751, 9429, 9743, 11577, 17331, 6073, 9858, 10711, 11118, 6525, 10267, 9034, 11252, 11268, 8033, 8868, 10159, 10214, 9027, 9785, 9033, 9076, 9299, 14501, 14508, 14562, 21733, 10282, 9909, 11178, 11738, 10024, 12667, 11262, 11343, 11978, 11983, 11992, 11826, 11061, 10227, 10428, 11077, 11131, 11137, 11280, 11281, 11518, 11551, 11807, 11812, 11947, 12039, 14158, 14729, 14943, 15641, 16273, 16349, 18560, 19269, 19286, 21547, 10343, 14852, 14901, 15352, 15387, 10612, 10638, 10986, 10994, 20181, 11002, 11127, 11128, 11183, 12166, 11342, 11494, 11955, 11673, 11707, 11711, 12190, 18839, 13802, 14595, 12227, 15912, 14007, 13093, 13096, 12981, 13102, 13160, 13194, 13196, 13227, 13242, 13267, 13278, 13281, 13298, 14168, 15161, 23143, 14058, 14766, 13748, 13839, 15603, 14241, 14179, 14239, 14246, 14240, 14255, 14488, 14487, 14245, 14785, 15160, 14703, 14995, 16571, 15172, 15179, 15424, 15713, 15732, 16141, 16284, 16334, 16382, 17387, 17498, 17499, 18498, 16960, 19689, 17815, 19394, 19464, 19650, 19955, 19476, 19477, 23203]
์ํ. ์๋ง๋ ์ด๊ฒ์:
Tag.where(name: 'balloon-mapping').length => 4
Tag.where(name: 'balloon-mapping').collect(&:tid) => [10, 3205, 3591, 4032]
์, ์ด๊ฒ์ด ๋ถ์ผ์น์ ๋๋ค.
irb(main):045:0> NodeTag.joins(:node).where(tid: [10, 3205, 3591, 4032]).where('node.status = 1 AND node.type = "note"').count
=> 499
irb(main):046:0> Node.where(status: 1, type: 'note').includes(:tag).references(:term_data).where('term_data.name = ?', 'balloon-mapping').count
=> 499
irb(main):050:0> Tag.where(name: 'balloon-mapping').collect(&:count)
=> [574, 1, 1, 1]
๊ทธ๋ฌ๋ ํนํ #7334์ method
๋๋ project
๋ฒ๊ทธ๋ ์๋๋๋ค.
irb(main):047:0> Tag.where(name: 'method').collect(&:tid)
=> [14474]
irb(main):048:0> Tag.where(name: 'project').collect(&:tid)
=> [14751]
์, ๋ค์์ ์ฌ์ฉํ์ฌ ์ค๋ณต ํ๊ทธ๋ฅผ ์์ ํ์ต๋๋ค.
irb(main):053:0> NodeTag.where(tid: [3205, 3591, 4032]).each do |nt|
irb(main):054:1* nt.tid = 10
irb(main):055:1> nt.save
irb(main):056:1> end
๊ทธ๋ฌ๋ DB์ ๋ ๋ง์ ๊ฒ์ด ์์ต๋๋ค. ์ฐ๋ฆฌ๋ ์ด๊ฒ์ ํตํฉํ๊ธฐ ์ํด ๋ ํฐ ํ๋ก์ ํธ๋ฅผ ์ํ ์๋ ์์ต๋๋ค.
์ ๋ฐ์ดํธ: ์, 28๊ฐ์ ๋ค๋ฅธ ์ธ์คํด์ค๊ฐ ์์ต๋๋ค.
irb(main):063:0> Tag.count
=> 18532
irb(main):065:0> Tag.all.collect(&:name).uniq.count
=> 18504
irb(main):069:0> (Tag.all - Tag.all.group(:name)).collect(&:name)
=> ["fold-up", "gulf-coast", "kite-mapping", "gulf-coast", "brooklyn", "new-york-city", "balloon-mapping", "spectrometer", "farmhack", "white-balance", "fresh-kills", "balloon-mapping", "balloon-mapping", "kite-mapping", "newsletter", "newsletter", "passenger-pigeon", "jamaica-bay", "mobile-spectrometer", "infragram-sandbox", "mailing-lists", "diy-kite", "water-sensing", "carbon-arc", "diy-kite", "diy-kite", "workplace", "emergencies"]
์ง๊ธ ๋ด ์ถ์ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์ฐ๋ฆฌ๋ ์ด๊ฒ์ ๋ง์ด ์ขํ๊ณ ๋ ๋ถ๋ถ์ผ๋ก ๋๋ฉ๋๋ค.
question:_____
ํ์ ํ๊ทธ๋ /tag/____
ํ์ด์ง์ ์ง๋ฌธ ํญ์์ ๊ณ์ฐ๋์ง๋ง ์์ฒด ๊ธฐ๋ณธ ํ๊ทธ๊ฐ ์๋ ๊ฒฝ์ฐ ์ฃผ์ ์นด๋์๋ ๊ณ์ฐ๋์ง ์์ต๋๋ค. ์: 8๊ฐ์ ๊ฒ์๋ฌผ์๋ question:balloon-mapping
์์ง๋ง balloon-mapping
๊ฐ ์์ผ๋ฏ๋ก 8๋งํผ ์นด์ดํธ๋ฅผ ๋์ง๋๋ค.(2)์ ๋ํ ๋์ ๊ฒฌํด๋ ์ฐ๋ฆฌ๊ฐ ๊ทธ๊ฒ์ ๊ธฐ๋กํ๊ณ ์ธ์ํด์ผ ํ์ง๋ง ๊ทธ๊ฒ์ ํด๊ฒฐํด์๋ ์ ๋๋ค๋ ๊ฒ์ ๋๋ค(์ด์จ๋ ๊นจ๋ํ ํด๊ฒฐ์ฑ ์ด ์๊ฐ๋์ง ์์ต๋๋ค).
๊ทธ๋ฆฌ๊ณ ๊ทธ ๋ชจ๋ ํ๊ธฐ ํ์๋ balloon-mapping
๋ํด ์ฌ์ ํ 1์ ๋ถ์ผ์น๊ฐ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ฐ๋ฆฌ๋ ๊ฐ์ฅ ํฐ ํ๊ทธ ์ค ํ๋์ด๊ณ ํด๋น ๋ฌธ์ ๊ฐ ๋ค๋ฅธ ์ฌ๋๋ค์๊ฒ ์ํฅ์ ๋ฏธ์น ๊ฐ๋ฅ์ฑ์ด ๋ฎ๊ธฐ ๋๋ฌธ์ ์ฐ๋ฆฌ๋ ๋ณธ์ง์ ์ผ๋ก ๊ทธ๊ฒ์ ๋ํด ๊ด์ฐฎ์์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋ค๋ฅธ ์ฌ๋๋ค์ ์๊ฒฌ๋ ๋ฃ๊ณ ์ถ์ต๋๋ค!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์๋ ํ์ธ์ @ebarry ์ ๋ ์ด๊ฒ์ด ์ค์ ๋ก ๋ ์ฌ๊ฐํ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค :sweat_smile: https://github.com/publiclab/plots2/pull/7609 ์์ ์ด๊ฒ์ ๋ณ๊ฒฝํ์ง๋ง ๋ด๊ฐ ๊ทธ๊ฒ์ ์๋ง์ผ๋ก ๋ง๋ค๊ณ ์๋ชป๋ ์๋ฅผ ๊ณ์ฐํ์ ๊ฒ์ ๋๋ค. ์๊ฐ :disappointed: @jywarren ์์ ๋ฐ๋ณต ์ฃ์กํฉ๋๋ค ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ค๋ฉด ๋์์ด ํ์ํ ์ ์์ต๋๋ค :sweat_smile: